Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/v0.1.0/v0.9.0/cpp
DOLFINx  0.1.0
DOLFINx C++ interface
Public Member Functions | List of all members
dolfinx::io::VTKFile Class Reference

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. More...

#include <VTKFile.h>

Public Member Functions

 VTKFile (MPI_Comm comm, const std::string filename, const std::string file_mode)
 Create VTK file.
 
 ~VTKFile ()
 Destructor.
 
void close ()
 Close file.
 
void flush ()
 Flushes XML files to disk.
 
void write (const mesh::Mesh &mesh, double time=0.0)
 Write mesh to file. Supports arbitrary order Lagrange isoparametric cells. More...
 
void write (const std::vector< std::reference_wrapper< const fem::Function< double >>> &u, double t)
 Output fem::Function and timestep. More...
 
void write (const std::vector< std::reference_wrapper< const fem::Function< std::complex< double >>>> &u, double t)
 Output fem::Function and timestep. More...
 

Detailed Description

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.

This format if It is not suitable to checkpointing as it may decimate some data.

Member Function Documentation

◆ write() [1/3]

void io::VTKFile::write ( const mesh::Mesh mesh,
double  time = 0.0 
)

Write mesh to file. Supports arbitrary order Lagrange isoparametric cells.

Parameters
[in]meshThe Mesh to write to file
[in]timeTime parameter to associate with the mesh

◆ write() [2/3]

void io::VTKFile::write ( const std::vector< std::reference_wrapper< const fem::Function< double >>> &  u,
double  t 
)

Output fem::Function and timestep.

Parameters
[in]uList of functions to write to file
[in]tTime parameter to associate with the mesh

◆ write() [3/3]

void io::VTKFile::write ( const std::vector< std::reference_wrapper< const fem::Function< std::complex< double >>>> &  u,
double  t 
)

Output fem::Function and timestep.

Parameters
[in]uList of functions to write to file
[in]tTime parameter to associate with the mesh

The documentation for this class was generated from the following files: