Skip to content
Snippets Groups Projects
Commit 5d144c00 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* Added static VtkWriter::writeFile for simple file writing

parent 18a9b36b
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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;
}
}
......@@ -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.
......
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