This class is used to create a Paraview .pvd (collection) file.
A collection is an XML file that contains a list of other files to be opened in Paraview.
Typical usage is
gsParaviewCollection pc(fn); // Initialize collection
// add files ("parts"), make sure that these files exist
pc.addPart(filename1);
pc.addPart(filename2);
pc.save() // finalize and close the file
Or when working with gsExpressions:
gsParaviewCollection pc(fn, &evaluator ); // Initialize collection
// Specify plotting options
pc.options().setInt("numPoints", 100);
pc.options().setInt("precision",5);
pc.options().setSwitch("plotElements",true);
pc.options().setSwitch("plotControlNet",true);
// In your solution loop:
while ( ... )
{
// Create new file(s) for this timestep
pc.newTimestep(&multiPatch)
// Solve here
// Write solution fields ( e.g Pressure, Temperature, Stress )
pc.addField( gsExpression_1, "label_1" );
pc.addField( gsExpression_2, "label_2" );
pc.saveTimeStep(); // Save file(s) for this timestep
} // end solution loop
pc.save() // finalize and close the .pvd file
The above creates a file with extension pvd. When opening this file with Paraview, the contents of all parts in the list are loaded.
|
void | addDataSet (gsParaviewDataSet &dataSet, real_t time=-1) |
| Adds all the files relevant to a gsParaviewDataSet, to the collection.
|
|
template<typename... Rest> |
void | addField (Rest... rest) |
| All arguments are forwarded to gsParaviewDataSet::addField().
|
|
template<typename... Rest> |
void | addFields (Rest... rest) |
| All arguments are forwarded to gsParaviewDataSet::addFields().
|
|
void | addPart (String const &fn, real_t tStep=-1, std::string name="", index_t part=-1) |
| Appends a file to the Paraview collection (.pvd file).
|
|
| gsParaviewCollection (String const &fn, gsExprEvaluator<> *evaluator=nullptr) |
| Constructor using a filename and an (optional) evaluator.
|
|
void | newTimeStep (gsMultiPatch< real_t > *geometry, real_t time=-1) |
| Creates a new time step where all information will be added to.
|
|
gsOptionList & | options () |
| Accessor to the current options.
|
|
void | save () |
|
void | saveTimeStep () |
| The current timestep is saved and files written to disk.
|
|