From bff08322ff895a9d638002d0b4e60f41f5c3b0f0 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Sat, 19 Nov 2011 17:31:36 +0000 Subject: [PATCH] Use TargetSpace::CoordinateType to make the code more target-space agnostic [[Imported from SVN: r8235]] --- harmonicmaps-eoc.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/harmonicmaps-eoc.cc b/harmonicmaps-eoc.cc index 6c5d5d6c..91ba6e42 100644 --- a/harmonicmaps-eoc.cc +++ b/harmonicmaps-eoc.cc @@ -44,9 +44,9 @@ using namespace Dune; using std::string; struct DirichletFunction - : public Dune::VirtualFunction<FieldVector<double,dim>, FieldVector<double,3> > + : public Dune::VirtualFunction<FieldVector<double,dim>, TargetSpace::CoordinateType > { - void evaluate(const FieldVector<double, dim>& x, FieldVector<double,3>& out) const { + void evaluate(const FieldVector<double, dim>& x, TargetSpace::CoordinateType& out) const { #if 0 FieldVector<double,3> axis; @@ -104,11 +104,11 @@ void solve (const shared_ptr<GridType>& grid, x.resize(feBasis.size()); - BlockVector<FieldVector<double,3> > dirichletFunctionValues; + BlockVector<TargetSpace::CoordinateType> dirichletFunctionValues; DirichletFunction dirichletFunction; Functions::interpolate(feBasis, dirichletFunctionValues, dirichletFunction); - FieldVector<double,3> innerValue(0); + TargetSpace::CoordinateType innerValue(0); innerValue[0] = 1; innerValue[1] = 0; @@ -198,7 +198,7 @@ int main (int argc, char *argv[]) try SolutionType referenceSolution; solve(referenceGrid, referenceSolution, numLevels, parameterSet); - BlockVector<FieldVector<double,3> > xEmbedded(referenceSolution.size()); + BlockVector<TargetSpace::CoordinateType> xEmbedded(referenceSolution.size()); for (int j=0; j<referenceSolution.size(); j++) xEmbedded[j] = referenceSolution[j].globalCoordinates(); @@ -260,7 +260,7 @@ int main (int argc, char *argv[]) try std::stringstream numberAsAscii; numberAsAscii << i; - BlockVector<FieldVector<double,3> > xEmbedded(solution.size()); + BlockVector<TargetSpace::CoordinateType> xEmbedded(solution.size()); for (int j=0; j<solution.size(); j++) xEmbedded[j] = solution[j].globalCoordinates(); -- GitLab