Skip to content
Snippets Groups Projects
Commit 1282b3d0 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Make the approximation order a compile-time variable, include it in the output file name

parent 67d251bc
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -56,6 +56,8 @@ typedef UnitVector<double,3> TargetSpace; ...@@ -56,6 +56,8 @@ typedef UnitVector<double,3> TargetSpace;
// Tangent vector of the image space // Tangent vector of the image space
const int blocksize = TargetSpace::TangentVector::dimension; const int blocksize = TargetSpace::TangentVector::dimension;
const int order = 1;
#define LAGRANGE #define LAGRANGE
using namespace Dune; using namespace Dune;
...@@ -136,7 +138,7 @@ int main (int argc, char *argv[]) try ...@@ -136,7 +138,7 @@ int main (int argc, char *argv[]) try
// Construct the scalar function space basis corresponding to the GFE space // Construct the scalar function space basis corresponding to the GFE space
////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////
#ifdef LAGRANGE #ifdef LAGRANGE
typedef Dune::Functions::PQkNodalBasis<typename GridType::LeafGridView, 1> FEBasis; typedef Dune::Functions::PQkNodalBasis<typename GridType::LeafGridView, order> FEBasis;
FEBasis feBasis(grid->leafGridView()); FEBasis feBasis(grid->leafGridView());
#else #else
typedef Dune::Functions::BSplineBasis<typename GridType::LeafGridView> FEBasis; typedef Dune::Functions::BSplineBasis<typename GridType::LeafGridView> FEBasis;
...@@ -257,7 +259,7 @@ int main (int argc, char *argv[]) try ...@@ -257,7 +259,7 @@ int main (int argc, char *argv[]) try
vtkWriter.write(resultPath + "_" + energy + "_result"); vtkWriter.write(resultPath + "_" + energy + "_result");
// Write the corresponding coefficient vector: verbatim in binary, to be completely lossless // Write the corresponding coefficient vector: verbatim in binary, to be completely lossless
std::ofstream outFile("harmonicmaps-result-" + std::to_string(numLevels) + ".data", std::ios_base::binary); std::ofstream outFile("harmonicmaps-result-" + std::to_string(order) + "-" + std::to_string(numLevels) + ".data", std::ios_base::binary);
GenericVector::writeBinary(outFile, xEmbedded); GenericVector::writeBinary(outFile, xEmbedded);
outFile.close(); outFile.close();
......
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