GetFEM  5.4.3
getfem::vtk_export Class Reference

VTK/VTU export. More...

#include <getfem_export.h>

Inherited by getfem::vtu_export.

Public Member Functions

void exporting (const mesh &m)
 should be called before write_*_data
 
void set_header (const std::string &s)
 the header is the second line of text in the exported file, you can put whatever you want – call this before any write_dataset or write_mesh
 
template<class VECT >
void write_point_data (const getfem::mesh_fem &mf, const VECT &U0, const std::string &name)
 append a new scalar or vector field defined on mf to the .vtk/.vtu file. More...
 
template<class VECT >
void write_sliced_point_data (const VECT &Uslice, const std::string &name, size_type qdim=1)
 append a new scalar or vector field to .vtk file. More...
 
template<class VECT >
void write_cell_data (const VECT &U, const std::string &name, size_type qdim=1)
 export data which is constant over each element. More...
 
void write_mesh_quality (const mesh &m)
 export a data_set correspounding to measures of quality for each convex of the supplied mesh (which should have the same number of convex than the one used in the vtk_export) More...
 

Detailed Description

VTK/VTU export.

export class to VTK/VTU file format ( http://www.kitware.com/vtk.html, legacy and serial vtkUnstructuredGrid)

A vtk_export can store multiple scalar/vector fields.

Definition at line 68 of file getfem_export.h.

Member Function Documentation

◆ write_point_data()

template<class VECT >
void getfem::vtk_export::write_point_data ( const getfem::mesh_fem mf,
const VECT &  U0,
const std::string &  name 
)

append a new scalar or vector field defined on mf to the .vtk/.vtu file.

If you are exporting a slice, or if mf != get_exported_mesh_fem(), U will be interpolated on the slice, or on get_exported_mesh_fem().

Note that vectors should be written AFTER scalars, and tensors after vectors

NO SPACE ALLOWED in 'name'

Definition at line 201 of file getfem_export.h.

◆ write_sliced_point_data()

template<class VECT >
void getfem::vtk_export::write_sliced_point_data ( const VECT &  Uslice,
const std::string &  name,
size_type  qdim = 1 
)

append a new scalar or vector field to .vtk file.

The Uslice vector is the field interpolated on the exported mesh_slice This function should not be used if you are not exporting a slice! NO SPACE ALLOWED in 'name'

Definition at line 233 of file getfem_export.h.

◆ write_cell_data()

template<class VECT >
void getfem::vtk_export::write_cell_data ( const VECT &  U,
const std::string &  name,
size_type  qdim = 1 
)

export data which is constant over each element.

You should not use this function if you are exporting a slice. U should have convex_index().card() elements.

Definition at line 227 of file getfem_export.h.

◆ write_mesh_quality()

void getfem::vtk_export::write_mesh_quality ( const mesh m)

export a data_set correspounding to measures of quality for each convex of the supplied mesh (which should have the same number of convex than the one used in the vtk_export)

If a slice is being exported, the convex quality is written as point_data (TO IMPROVE ONEDAY), if a mesh/mesh_fem is being exported, it is written as cell_data

Definition at line 636 of file getfem_export.cc.


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