G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsParaviewDataSet Class Reference

Detailed Description

This class represents a group of vtk (Paraview) files that refer to one multiPatch, for one timestep.

This class is used by gsParaviewCollection to manage said files, but can be used by the user explicitly as well.

+ Collaboration diagram for gsParaviewDataSet:

Public Member Functions

template<class E >
void addField (const expr::_expr< E > &expr, std::string label)
 Evaluates an expression, and writes that data to the vtk files.
 
template<class T >
void addField (const gsField< T > field, std::string label)
 Evaluates a gsField ( the function part ), and writes that data to the vtk files.
 
template<class E , typename... Rest>
void addFields (std::vector< std::string > labels, const expr::_expr< E > &expr, Rest... rest)
 Recursive form of addField()
 
template<class T , typename... Rest>
void addFields (std::vector< std::string > labels, const gsField< T > field, Rest... rest)
 Recursive form of addField()
 
const std::vector< std::string > filenames ()
 Returns the names of the files created by this gsParaviewDataSet.
 
 gsParaviewDataSet (std::string basename, gsMultiPatch< real_t > *const geometry, gsExprEvaluator< real_t > *eval=nullptr, gsOptionList options=defaultOptions())
 Basic constructor.
 

Static Public Member Functions

static gsOptionList defaultOptions ()
 Accessor to the current options.
 

Constructor & Destructor Documentation

◆ gsParaviewDataSet()

gsParaviewDataSet ( std::string  basename,
gsMultiPatch< real_t > *const  geometry,
gsExprEvaluator< real_t > *  eval = nullptr,
gsOptionList  options = defaultOptions() 
)

Basic constructor.

Parameters
basenameThe basename that will be used to create all the individual filenames
geometryA gsMultiPatch of the geometry that will be exported and where the fields are defined
evalOptional. A gsExprEvaluator, necessary when working with gsExpressions for evaluation purposes
optionsA set of options, if unspecified, defaultOptions() is called.

Member Function Documentation

◆ addField() [1/2]

template<class E >
void addField ( const expr::_expr< E > &  expr,
std::string  label 
)
inline

Evaluates an expression, and writes that data to the vtk files.

Template Parameters
E
Parameters
exprThe gsExpression to be evaluated
labelThe name that will be displayed in Paraview for this field.

◆ addField() [2/2]

template<class T >
void addField ( const gsField< T >  field,
std::string  label 
)
inline

Evaluates a gsField ( the function part ), and writes that data to the vtk files.

Template Parameters
T
Parameters
fieldThe gsField to be evaluated
labelThe name that will be displayed in Paraview for this field.

◆ addFields() [1/2]

template<class E , typename... Rest>
void addFields ( std::vector< std::string >  labels,
const expr::_expr< E > &  expr,
Rest...  rest 
)
inline

Recursive form of addField()

Template Parameters
E
...Rest
Parameters
labelsVector of strings, containing the names of the fields as they will be shown in ParaView.
exprThe expressions to be evaluated ( arbitrary number of them )
...rest

◆ addFields() [2/2]

template<class T , typename... Rest>
void addFields ( std::vector< std::string >  labels,
const gsField< T >  field,
Rest...  rest 
)
inline

Recursive form of addField()

Template Parameters
T
...Rest
Parameters
labelsVector of strings, containing the names of the fields as they will be shown in ParaView.
fieldThe gsFields to be evaluated ( arbitrary number of them )
...rest

◆ filenames()

const std::vector< std::string > filenames ( )

Returns the names of the files created by this gsParaviewDataSet.

Returns
A vector of strings