diff --git a/AMDiS/src/ProblemScal.h b/AMDiS/src/ProblemScal.h index e9402da8e2bfd6798cfbe727be281b6d31654cfd..a61a1de1ed00b0b9864bbdf282da33220c63b6e9 100644 --- a/AMDiS/src/ProblemScal.h +++ b/AMDiS/src/ProblemScal.h @@ -177,18 +177,24 @@ namespace AMDiS { /** \brief * Returns number of managed problems */ - virtual int getNumProblems() { return 1; }; + virtual int getNumProblems() { + return 1; + }; /** \brief * Implementation of ProblemStatBase::getNumComponents() */ - virtual int getNumComponents() { return 1; }; + virtual int getNumComponents() { + return 1; + }; /** \brief * Returns the problem with the given number. If only one problem * is managed by this master problem, the number hasn't to be given. */ - virtual ProblemStatBase *getProblem(int number = 0) { return this; }; + virtual ProblemStatBase *getProblem(int number = 0) { + return this; + }; /** \brief * Writes output files. diff --git a/AMDiS/src/VtkWriter.cc b/AMDiS/src/VtkWriter.cc index 0b9799b3dd680a50693d3fa3aa29e674b30fb86b..f0a4a65831afd483ee3b61c6322bca11a0246615 100644 --- a/AMDiS/src/VtkWriter.cc +++ b/AMDiS/src/VtkWriter.cc @@ -414,4 +414,18 @@ namespace AMDiS { } + void VtkWriter::writeFile(DOFVector<double> *values, + const char *filename) + { + DataCollector *dc = NEW DataCollector(values->getFESpace(), values); + std::vector<DataCollector*> dcList(0); + dcList.push_back(dc); + + VtkWriter *writer = NEW VtkWriter(&dcList); + writer->writeFile(filename); + + DELETE writer; + DELETE dc; + } + } diff --git a/AMDiS/src/VtkWriter.h b/AMDiS/src/VtkWriter.h index e974b61e80747cdf7acae6ffc7e49c1b0356f011..3443d993ed45006890031e775953adcd4e107185 100644 --- a/AMDiS/src/VtkWriter.h +++ b/AMDiS/src/VtkWriter.h @@ -45,6 +45,11 @@ namespace AMDiS { */ int writeFile(const char *name); + /** \brief + * May be used to simply write ParaView files. + */ + static void writeFile(DOFVector<double> *values, + const char *filename); /** \brief * Adds a new entry to a ParaView animation file.