DUNE-FEM (unstable)
Classes | |
class | Dune::Fem::DataOutput< GridImp, DataImp > |
Implementation of the Dune::Fem::IOInterface. This class manages data output. Available output formats are GRAPE, VTK and VTK Vertex projected using the VtxProjection operator. Details can be found in DiscFuncIO. More... | |
class | Dune::Fem::DataWriter< GridImp, DataImp > |
Implementation of the Dune::IOInterface. This class manages data output. Available output formats are GRAPE, VTK and VTK Vertex projected using the VtxProjection operator. Details can be found in DiscFuncIO. More... | |
class | Dune::Fem::IOInterface |
IOInterface to write data to hard disk. More... | |
Detailed Description
The package dune-fem provides a number of possibilities to write data to disk either for visualization and debugging purposes or for checkpointing. Visualization output of discrete functions is provided at the moment for
- GraPE
- VTK, e.g., for ParaView, VisIt, or others
- Matlab
In addition data can be visualized in GraPE online during a simulation by setting the parameter fem.io.grapedisplay to one. Except for Matlab output or Dune::Checkpointer (always binary) the format is choosen through the parameter fem.io.outputformat (see below).
Utilities for Matlab output are availabe through the Dune::MatlabHelper.
The checkpointing facility writes both the grid state, a number of discrete function, and other parameters provided by the user. This information can then be read from disc to continue the simulation from the saved state. Using the datadisp programm the checkpoint files can also be used for visualization purposes.
- Remarks
- The interface class for general output of DiscreteFunctions to disc is given by IOInterface. A general purpose data writter is provided by the class Dune::DataWriter.
Since the binary output format is lossless it is also used by the Dune::CheckPointer class which also writes data to files but alternates between to filenames - while the Dune::DataWriter should be used to store data for postprocessing, the Dune::CheckPointer facility should be used to be able to restart computations after a unexpected termination of a simulation.
Data files are generated in the directory given by the fem.prefix parameter and with the file prefix chosen via the parameter fem.io.datafileprefix. The data to be saved to disk is given to the Dune::DataWriter instance through a reference to a std::tuple of discrete function pointer.
For a time series, data can be either written for a fixed time step, or after a fixed number of iterations using the parameters fem.io.savestep or fem.io.savecount, respectivly. If a series of data is to be written without a real time variable available, e.g., a series of refined grids, startTime=0, endTime=100, fem.io.savestep=-1 and fem.io.savecount=1 is a good choice to make; data is then written using datawriter.write(step,step).
The following code snippet demonstrated the general usage of the Dune::DataWriter:
- DUNE-FEM parameter:
fem.prefix
path used for all file output
default:.
fem.io.datafileprefix
prefix used for all data files
no default
fem.io.outputformat
output format
default:vtk-vertex
values are:- vtk-cell = VTK cell data
- vtk-vertex = VTK vertex data (might require interpolation into Lagrange space)
- sub-vtk-cell = VTK cell data including a specified level of subsampling
- binary = write binary data (only available with DataWriter and CheckPointer)
- gnuplot = write gunplot compatible data
- none = no data output
fem.io.grapedisplay
use grape for online visualization; default is false
no default
fem.io.savestep
interval for writting data files
no default
use value <0 to deativatefem.io.savecount
number of time steps between writting file
no default
use value <0 to deactivate