DOLFINx 0.7.3
DOLFINx C++ interface
|
Output of meshes and functions in VTK/ParaView format. More...
#include <VTKFile.h>
Public Member Functions | |
VTKFile (MPI_Comm comm, const std::filesystem::path &filename, const std::string &file_mode) | |
Create VTK file. | |
~VTKFile () | |
Destructor. | |
void | close () |
Close file. | |
void | flush () |
Flushes XML files to disk. | |
template<std::floating_point U> | |
void | write (const mesh::Mesh< U > &mesh, double time=0.0) |
Write a mesh to file. Supports arbitrary order Lagrange isoparametric cells. | |
template<dolfinx::scalar T, std::floating_point U = scalar_value_type_t<T>> | |
void | write (const std::vector< std::reference_wrapper< const fem::Function< T, U > > > &u, double t) |
Write finite elements function with an associated time step. | |
Output of meshes and functions in VTK/ParaView format.
Isoparametric meshes of arbitrary degree are supported. For finite element functions, cell-based (DG0) and Lagrange (point-based) functions can be saved. For vertex-based functions the output must be isoparametic, i.e. the geometry and the finite element functions must be defined using the same basis.
void write | ( | const mesh::Mesh< U > & | mesh, |
double | time = 0.0 |
||
) |
Write a mesh to file. Supports arbitrary order Lagrange isoparametric cells.
[in] | mesh | Mesh to write to file. |
[in] | time | Time parameter to associate with mesh . |
void write | ( | const std::vector< std::reference_wrapper< const fem::Function< T, U > > > & | u, |
double | t | ||
) |
Write finite elements function with an associated time step.
u
cannot be sub-Functions. Extract sub-Functions before output.u
with point-wise data must use the same element type (up to the block size) and the element must be (discontinuous) Lagrange. Interpolate fem::Function before output if required.[in] | u | List of functions to write to file |
[in] | t | Time parameter to associate with u |
u
must share the same mesh