Skip to content
Snippets Groups Projects
Commit fd552d52 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/dirichletBC' into 'develop'

replaced symmetric DBC with unsymmetric one, since this seems to be wrong. Needs…

See merge request spraetor/dune-amdis!23
parents 548784af 4971bbf5
No related branches found
No related tags found
No related merge requests found
dimension of world: 2 dimension of world: 2
stokesMesh->macro file name: ./macro/macro.stand.2d
stokesMesh->global refinements: 0 stokesMesh->global refinements: 0
stokesMesh->dimension: 1.0 1.0
stokesMesh->num cells: 4 4
stokes->mesh: stokesMesh stokes->mesh: stokesMesh
...@@ -14,7 +15,7 @@ stokes->solver->info: 2 ...@@ -14,7 +15,7 @@ stokes->solver->info: 2
stokes->output[0]->filename: stokes_u.2d stokes->output[0]->filename: stokes_u.2d
stokes->output[0]->name: u stokes->output[0]->name: u
stokes->output[0]->subsampling: 0 stokes->output[0]->subsampling: 2
stokes->output[0]->output directory: ./output stokes->output[0]->output directory: ./output
stokes->output[0]->ParaView format: 1 stokes->output[0]->ParaView format: 1
stokes->output[0]->ParaView mode: 1 stokes->output[0]->ParaView mode: 1
...@@ -25,7 +26,7 @@ stokes->output[1]->output directory: ./output ...@@ -25,7 +26,7 @@ stokes->output[1]->output directory: ./output
stokes->output[1]->ParaView format: 1 stokes->output[1]->ParaView format: 1
stokes->output[1]->ParaView mode: 1 stokes->output[1]->ParaView mode: 1
stokes->viscosity: 0.1 stokes->viscosity: 1.0
stokes->density: 1.0 stokes->density: 1.0
stokes->boundary velocity: 10.0 stokes->boundary velocity: 10.0
......
...@@ -78,8 +78,8 @@ namespace AMDiS ...@@ -78,8 +78,8 @@ namespace AMDiS
finishImpl(matrix, rhs, solution, rowBasis, colBasis, ValueCategory_t<Range>{}); finishImpl(matrix, rhs, solution, rowBasis, colBasis, ValueCategory_t<Range>{});
// subtract columns of dirichlet nodes from rhs // subtract columns of dirichlet nodes from rhs
for (auto const& triplet : columns) // for (auto const& triplet : columns)
rhs[triplet.row] -= triplet.value * solution[triplet.col]; // rhs[triplet.row] -= triplet.value * solution[triplet.col];
} }
protected: protected:
......
...@@ -181,6 +181,7 @@ namespace AMDiS ...@@ -181,6 +181,7 @@ namespace AMDiS
auto value = mtl::mat::value_map(*matrix); auto value = mtl::mat::value_map(*matrix);
// iterate over the matrix // iterate over the matrix
#if 0
for (auto r : mtl::major_of(*matrix)) { // rows or columns for (auto r : mtl::major_of(*matrix)) { // rows or columns
for (auto i : mtl::nz_of(r)) { // non-zeros within for (auto i : mtl::nz_of(r)) { // non-zeros within
if (dirichletNodes[row(i)]) { if (dirichletNodes[row(i)]) {
...@@ -193,6 +194,16 @@ namespace AMDiS ...@@ -193,6 +194,16 @@ namespace AMDiS
} }
} }
} }
#endif
for (auto r : mtl::rows_of(*matrix)) { // rows or columns
if (dirichletNodes[r.value()]) {
for (auto i : mtl::nz_of(r)) { // non-zeros within
// set identity row
value(i, (row(i) == col(i) ? value_type(1) : value_type(0)) );
}
}
}
return columns; return columns;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment