From 0b5eeec887047a03f5cdc8f22df96a235bf8d3dc Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Thu, 22 Apr 2010 14:26:59 +0000 Subject: [PATCH] minor fixes and improvements [[Imported from SVN: r5924]] --- harmonicmaps-eoc.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/harmonicmaps-eoc.cc b/harmonicmaps-eoc.cc index 5c3454f5..8fe706fe 100644 --- a/harmonicmaps-eoc.cc +++ b/harmonicmaps-eoc.cc @@ -77,15 +77,18 @@ void solve (const shared_ptr<GridType>& grid, FieldVector<double,2> pos = vIt->geometry().corner(0); FieldVector<double,3> axis; axis[0] = pos[0]; axis[1] = pos[1]; axis[2] = 1; - Rotation<3,double> rotation(axis, pos.two_norm()*M_PI*1.5); + Rotation<3,double> rotation(axis, pos.two_norm()*M_PI*3); if (dirichletNodes[idx][0]) { -// FieldMatrix<double,3,3> rMat; -// rotation.matrix(rMat); -// v = rMat[2]; +#if 1 + FieldMatrix<double,3,3> rMat; + rotation.matrix(rMat); + v = rMat[2]; +#else v[0] = std::sin(pos[0]*M_PI); v[1] = 0; v[2] = std::cos(pos[0]*M_PI); +#endif } else { v[0] = 1; v[1] = 0; @@ -168,7 +171,7 @@ int main (int argc, char *argv[]) try // Create the reference grid array<unsigned int,dim> elements; - elements.fill(4); + elements.fill(numBaseElements); shared_ptr<GridType> referenceGrid = StructuredGridFactory<GridType>::createSimplexGrid(FieldVector<double,dim>(0), FieldVector<double,dim>(1), elements); @@ -178,7 +181,6 @@ int main (int argc, char *argv[]) try SolutionType referenceSolution; solve(referenceGrid, referenceSolution, numLevels, parameterSet); - // ////////////////////////////////////////////////////////////////////// // Compute mass matrix and laplace matrix to emulate L2 and H1 norms // ////////////////////////////////////////////////////////////////////// @@ -232,7 +234,7 @@ int main (int argc, char *argv[]) try geodesicFEFunctionAdaptor(*grid, solution); //assert(referenceSolution.size() == solution.size()); - +#if 0 xEmbedded.resize(solution.size()); for (int j=0; j<solution.size(); j++) xEmbedded[j] = solution[j].globalCoordinates(); @@ -241,7 +243,7 @@ int main (int argc, char *argv[]) try amirameshRefined.addGrid(grid->leafView()); amirameshRefined.addVertexData(xEmbedded, grid->leafView()); amirameshRefined.write("harmonic_result_" + numberAsAscii.str() + "_refined.am"); - +#endif // Interpret TargetSpace as isometrically embedded into an R^m, because this is // how the corresponding Sobolev spaces are defined. -- GitLab