Skip to content
Snippets Groups Projects
Commit f08dc26f authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

slight simplification of the handling of continuum Dirichlet values

[[Imported from SVN: r6839]]
parent 4985809f
No related branches found
No related tags found
No related merge requests found
...@@ -178,10 +178,8 @@ int main (int argc, char *argv[]) try ...@@ -178,10 +178,8 @@ int main (int argc, char *argv[]) try
// ///////////////////////////////////////////////////// // /////////////////////////////////////////////////////
// Determine the Dirichlet nodes // Determine the Dirichlet nodes
// ///////////////////////////////////////////////////// // /////////////////////////////////////////////////////
std::vector<VectorType> dirichletValues; VectorType coarseDirichletValues(complex.continua_["continuum"].grid_->size(0, dim));
dirichletValues.resize(toplevel+1); AmiraMeshReader<int>::readFunction(coarseDirichletValues, path + dirichletValuesFile);
dirichletValues[0].resize(complex.continua_["continuum"].grid_->size(0, dim));
AmiraMeshReader<int>::readFunction(dirichletValues[0], path + dirichletValuesFile);
LevelBoundaryPatch<GridType> coarseDirichletBoundary; LevelBoundaryPatch<GridType> coarseDirichletBoundary;
coarseDirichletBoundary.setup(*complex.continua_["continuum"].grid_, 0); coarseDirichletBoundary.setup(*complex.continua_["continuum"].grid_, 0);
...@@ -197,7 +195,7 @@ int main (int argc, char *argv[]) try ...@@ -197,7 +195,7 @@ int main (int argc, char *argv[]) try
dirichletNodes[i] = dirichletBoundary.containsVertex(i); dirichletNodes[i] = dirichletBoundary.containsVertex(i);
sampleOnBitField(*complex.continua_["continuum"].grid_, sampleOnBitField(*complex.continua_["continuum"].grid_,
dirichletValues[0], coarseDirichletValues,
complex.continua_["continuum"].dirichletValues_, complex.continua_["continuum"].dirichletValues_,
dirichletNodes); dirichletNodes);
...@@ -243,11 +241,12 @@ int main (int argc, char *argv[]) try ...@@ -243,11 +241,12 @@ int main (int argc, char *argv[]) try
rhs3d = 0; rhs3d = 0;
// Set initial solution // Set initial solution
const VectorType& dirichletValues = complex.continua_["continuum"].dirichletValues_;
x3d = 0; x3d = 0;
for (int i=0; i<x3d.size(); i++) for (int i=0; i<x3d.size(); i++)
for (int j=0; j<dim; j++) for (int j=0; j<dim; j++)
if (dirichletNodes[i][j]) if (dirichletNodes[i][j])
x3d[i][j] = dirichletValues[toplevel][i][j]; x3d[i][j] = dirichletValues[i][j];
// /////////////////////////////////////////// // ///////////////////////////////////////////
// Dirichlet nodes for the rod problem // Dirichlet nodes for the rod problem
......
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