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

Encode discretization order and grid level number into the output file name

parent 55179901
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -253,12 +253,14 @@ int main (int argc, char *argv[]) try ...@@ -253,12 +253,14 @@ int main (int argc, char *argv[]) try
auto xFunction = Dune::Functions::makeDiscreteGlobalBasisFunction<TargetSpace::CoordinateType>(feBasis,TypeTree::hybridTreePath(),xEmbedded); auto xFunction = Dune::Functions::makeDiscreteGlobalBasisFunction<TargetSpace::CoordinateType>(feBasis,TypeTree::hybridTreePath(),xEmbedded);
std::string baseName = "harmonicmaps-result-" + std::to_string(order) + "-" + std::to_string(numLevels);
SubsamplingVTKWriter<GridType::LeafGridView> vtkWriter(grid->leafGridView(),order-1); SubsamplingVTKWriter<GridType::LeafGridView> vtkWriter(grid->leafGridView(),order-1);
vtkWriter.addVertexData(xFunction, VTK::FieldInfo("orientation", VTK::FieldInfo::Type::vector, xEmbedded[0].size())); vtkWriter.addVertexData(xFunction, VTK::FieldInfo("orientation", VTK::FieldInfo::Type::vector, xEmbedded[0].size()));
vtkWriter.write(resultPath + "_" + energy + "_result"); vtkWriter.write(resultPath + baseName);
// 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(order) + "-" + std::to_string(numLevels) + ".data", std::ios_base::binary); std::ofstream outFile(baseName + ".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