FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Space::ExtVtkWriter< Trafo_ > Class Template Reference

Extended VTK writer class template. More...

#include <ext_vtk_writer.hpp>

Public Types

typedef TrafoType::MeshType MeshType
 
typedef Geometry::ConformalMesh< ShapeType > RefMeshType
 
typedef MeshType::ShapeType ShapeType
 
typedef Trafo_ TrafoType
 

Public Member Functions

 ExtVtkWriter (const TrafoType &trafo, Index num_refines=1)
 
void close ()
 Closes the VTK file. More...
 
bool open (String filename)
 Opens a VTK files and writes basic information. More...
 
template<typename Space_ , typename T_ >
void write_gradients (String name, const Space_ &space, const T_ *data)
 Writes a finite element function gradient field to the VTK file. More...
 
template<typename Space_ , typename T_ >
void write_hessians (String name, const Space_ &space, const T_ *data)
 Writes a finite element function Hessian field to the VTK file. More...
 
template<typename Space_ , typename T_ >
void write_values (String name, const Space_ &space, const T_ *data)
 Writes a finite element function to the VTK file. More...
 
template<typename Space_ , typename VectorType_ >
void write_values_blocked (String name, const Space_ &space, const VectorType_ &v)
 Writes a finite element function to the VTK file. More...
 

Protected Types

typedef TrafoType::template Evaluator ::Type TrafoEval
 

Protected Member Functions

void get_dom_point (typename TrafoEval::DomainPointType &dom_point, Index i) const
 
void write_indices ()
 
void write_vertices ()
 

Protected Attributes

std::ofstream _ofs
 
RefMeshType_ref_mesh
 
const TrafoType & _trafo
 

Friends

struct Intern::ExtVtkGradWriter< true >
 
struct Intern::ExtVtkHessWriter< true >
 
struct Intern::ExtVtkValueWriter< true >
 

Detailed Description

template<typename Trafo_>
class FEAT::Space::ExtVtkWriter< Trafo_ >

Extended VTK writer class template.

This class template implements a VTK writer which exports Finite Element functions evaluated on a locally refined mesh instead of a projection in the mesh's vertices or cells.

Author
Peter Zajac

Definition at line 87 of file ext_vtk_writer.hpp.

Member Typedef Documentation

◆ MeshType

template<typename Trafo_ >
typedef TrafoType::MeshType FEAT::Space::ExtVtkWriter< Trafo_ >::MeshType

Definition at line 95 of file ext_vtk_writer.hpp.

◆ RefMeshType

template<typename Trafo_ >
typedef Geometry::ConformalMesh<ShapeType> FEAT::Space::ExtVtkWriter< Trafo_ >::RefMeshType

Definition at line 97 of file ext_vtk_writer.hpp.

◆ ShapeType

template<typename Trafo_ >
typedef MeshType::ShapeType FEAT::Space::ExtVtkWriter< Trafo_ >::ShapeType

Definition at line 96 of file ext_vtk_writer.hpp.

◆ TrafoEval

template<typename Trafo_ >
typedef TrafoType::template Evaluator ::Type FEAT::Space::ExtVtkWriter< Trafo_ >::TrafoEval
protected

Definition at line 100 of file ext_vtk_writer.hpp.

◆ TrafoType

template<typename Trafo_ >
typedef Trafo_ FEAT::Space::ExtVtkWriter< Trafo_ >::TrafoType

Definition at line 94 of file ext_vtk_writer.hpp.

Constructor & Destructor Documentation

◆ ExtVtkWriter()

template<typename Trafo_ >
FEAT::Space::ExtVtkWriter< Trafo_ >::ExtVtkWriter ( const TrafoType &  trafo,
Index  num_refines = 1 
)
inlineexplicit

Definition at line 108 of file ext_vtk_writer.hpp.

◆ ~ExtVtkWriter()

template<typename Trafo_ >
virtual FEAT::Space::ExtVtkWriter< Trafo_ >::~ExtVtkWriter ( )
inlinevirtual

Definition at line 129 of file ext_vtk_writer.hpp.

Member Function Documentation

◆ close()

template<typename Trafo_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::close ( )
inline

Closes the VTK file.

Definition at line 171 of file ext_vtk_writer.hpp.

◆ get_dom_point()

template<typename Trafo_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::get_dom_point ( typename TrafoEval::DomainPointType &  dom_point,
Index  i 
) const
inlineprotected

Definition at line 608 of file ext_vtk_writer.hpp.

◆ open()

template<typename Trafo_ >
bool FEAT::Space::ExtVtkWriter< Trafo_ >::open ( String  filename)
inline

◆ write_gradients()

template<typename Trafo_ >
template<typename Space_ , typename T_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::write_gradients ( String  name,
const Space_ &  space,
const T_ *  data 
)
inline

Writes a finite element function gradient field to the VTK file.

Parameters
[in]nameThe name of the variable for the VTK file.
[in]spaceA transient reference to the finite element space.
[in]dataAn transient array representing the coefficient vector of the finite element function.

Definition at line 348 of file ext_vtk_writer.hpp.

References FEAT::dom_point, FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_entities(), FEAT::grad, and XASSERT.

◆ write_hessians()

template<typename Trafo_ >
template<typename Space_ , typename T_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::write_hessians ( String  name,
const Space_ &  space,
const T_ *  data 
)
inline

Writes a finite element function Hessian field to the VTK file.

Parameters
[in]nameThe name of the variable for the VTK file.
[in]spaceA transient reference to the finite element space.
[in]dataAn transient array representing the coefficient vector of the finite element function.

Definition at line 434 of file ext_vtk_writer.hpp.

References FEAT::dom_point, FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_entities(), FEAT::hess, and XASSERT.

◆ write_indices()

template<typename Trafo_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::write_indices ( )
inlineprotected

Definition at line 564 of file ext_vtk_writer.hpp.

◆ write_values()

template<typename Trafo_ >
template<typename Space_ , typename T_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::write_values ( String  name,
const Space_ &  space,
const T_ *  data 
)
inline

Writes a finite element function to the VTK file.

Parameters
[in]nameThe name of the variable for the VTK file.
[in]spaceA transient reference to the finite element space.
[in]dataAn transient array representing the coefficient vector of the finite element function.

Definition at line 270 of file ext_vtk_writer.hpp.

References FEAT::dom_point, FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_entities(), FEAT::value, and XASSERT.

◆ write_values_blocked()

template<typename Trafo_ >
template<typename Space_ , typename VectorType_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::write_values_blocked ( String  name,
const Space_ &  space,
const VectorType_ &  v 
)
inline

Writes a finite element function to the VTK file.

Parameters
[in]nameThe name of the variable for the VTK file.
[in]spaceA transient reference to the finite element space.
[in]vThe transient blocked coefficient vector of the finite element function.

Definition at line 189 of file ext_vtk_writer.hpp.

References FEAT::dom_point, FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_entities(), and FEAT::value.

◆ write_vertices()

template<typename Trafo_ >
void FEAT::Space::ExtVtkWriter< Trafo_ >::write_vertices ( )
inlineprotected

Definition at line 517 of file ext_vtk_writer.hpp.

Friends And Related Function Documentation

◆ Intern::ExtVtkGradWriter< true >

template<typename Trafo_ >
friend struct Intern::ExtVtkGradWriter< true >
friend

Definition at line 1 of file ext_vtk_writer.hpp.

◆ Intern::ExtVtkHessWriter< true >

template<typename Trafo_ >
friend struct Intern::ExtVtkHessWriter< true >
friend

Definition at line 1 of file ext_vtk_writer.hpp.

◆ Intern::ExtVtkValueWriter< true >

template<typename Trafo_ >
friend struct Intern::ExtVtkValueWriter< true >
friend

Definition at line 1 of file ext_vtk_writer.hpp.

Member Data Documentation

◆ _ofs

template<typename Trafo_ >
std::ofstream FEAT::Space::ExtVtkWriter< Trafo_ >::_ofs
protected

Definition at line 104 of file ext_vtk_writer.hpp.

◆ _ref_mesh

template<typename Trafo_ >
RefMeshType* FEAT::Space::ExtVtkWriter< Trafo_ >::_ref_mesh
protected

Definition at line 105 of file ext_vtk_writer.hpp.

◆ _trafo

template<typename Trafo_ >
const TrafoType& FEAT::Space::ExtVtkWriter< Trafo_ >::_trafo
protected

Definition at line 103 of file ext_vtk_writer.hpp.


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