LifeV
|
Exporter - Pure virtual class that describes a generic exporter. More...
#include <Exporter.hpp>
Public typedefs | |
typedef MeshType | mesh_Type |
typedef std::shared_ptr< MeshType > | meshPtr_Type |
typedef Epetra_Comm | comm_Type |
typedef std::shared_ptr< comm_Type > | commPtr_Type |
typedef ExporterData< mesh_Type > | exporterData_Type |
typedef exporterData_Type::vector_Type | vector_Type |
typedef exporterData_Type::vectorPtr_Type | vectorPtr_Type |
typedef exporterData_Type::feSpace_Type | feSpace_Type |
typedef exporterData_Type::feSpacePtr_Type | feSpacePtr_Type |
typedef exporterData_Type::WhereEnum | WhereEnum |
typedef exporterData_Type::FieldTypeEnum | FieldTypeEnum |
typedef exporterData_Type::FieldRegimeEnum | FieldRegimeEnum |
typedef std::vector< exporterData_Type > | dataVector_Type |
typedef dataVector_Type::iterator | dataVectorIterator_Type |
typedef std::multimap< WhereEnum, UInt > | whereToDataIdMap_Type |
typedef std::multimap< FE_TYPE, UInt > | feTypeToDataIdMap_Type |
Constructor & Destructor | |
Exporter () | |
Empty constructor for Exporter. More... | |
Exporter (const GetPot &dfile, const std::string &prefix) | |
Constructor for Exporter without prefix and procID. More... | |
virtual | ~Exporter () |
Destructor. More... | |
Methods | |
void | addVariable (const FieldTypeEnum &type, const std::string &variableName, const feSpacePtr_Type &feSpacePtr, const vectorPtr_Type &vectorPtr, const UInt &start, const FieldRegimeEnum ®ime=exporterData_Type::UnsteadyRegime, const WhereEnum &where=exporterData_Type::Node) |
Adds a new variable to be post-processed. More... | |
virtual void | postProcess (const Real &time)=0 |
Post-process the variables added to the list. More... | |
virtual UInt | importFromTime (const Real &Time)=0 |
Import data from previous simulations at a certain time. More... | |
virtual void | import (const Real &startTime, const Real &dt)=0 |
Import data from previous simulations. More... | |
virtual void | import (const Real &startTime)=0 |
Read only last timestep. More... | |
virtual void | readVariable (exporterData_Type &dvar) |
virtual void | exportPID (meshPtr_Type &mesh, commPtr_Type &comm, const bool binaryFormat=false) |
Export the Processor ID as P0 variable. More... | |
void | exportRegionMarkerID (std::shared_ptr< MeshType > mesh, std::shared_ptr< Epetra_Comm > comm) |
Export the region marker ID as P0 variable. More... | |
virtual void | exportFlags (std::shared_ptr< MeshType > mesh, std::shared_ptr< Epetra_Comm > comm, flag_Type const &flag=EntityFlags::ALL) |
Export entity flags. More... | |
Set Methods | |
virtual void | setDataFromGetPot (const GetPot &dataFile, const std::string §ion="exporter") |
Set data from file. More... | |
void | setPrefix (const std::string &prefix) |
Set prefix. More... | |
void | setPostDir (const std::string &Directory) |
Set the folder for pre/postprocessing. More... | |
void | setTimeIndex (const UInt &timeIndex) |
Set the current time index. More... | |
void | setTimeIndexStart (const UInt &timeIndexStart) |
Set the time index of the first file. More... | |
void | setSave (const UInt &save) |
Set how many time step between two snapshots. More... | |
void | setMultimesh (const bool &multimesh) |
Set if to save the mesh at each time step. More... | |
virtual void | setMeshProcId (const meshPtr_Type mesh, const int &procId) |
virtual void | closeFile () |
Close the output file. More... | |
Get Methods | |
const UInt & | save () const |
returns how many time steps between two snapshots More... | |
const UInt & | timeIndexStart () const |
returns the time index of the first snapshot More... | |
const UInt & | timeIndex () const |
returns the time index of the current snapshot More... | |
virtual MapEpetraType | mapType () const =0 |
returns the type of the map to use for the VectorEpetra More... | |
Protected methods | |
void | computePostfix () |
compute postfix More... | |
virtual void | readScalar (exporterData_Type &dvar)=0 |
A method to read a scalar field (to be implemented in derived classes) More... | |
virtual void | readVector (exporterData_Type &dvar)=0 |
A method to read a vector field (to be implemented in derived classes) More... | |
Protected data members | |
std::string | M_prefix |
the file prefix More... | |
std::string | M_postDir |
the name of the folder where to read or write files More... | |
UInt | M_timeIndexStart |
the time index of the first snapshot More... | |
UInt | M_timeIndex |
the time index of the current snapshot More... | |
UInt | M_save |
how many time steps between subsequent snapshots More... | |
bool | M_multimesh |
do we want to save the mesh with each snapshot? More... | |
UInt | M_timeIndexWidth |
how many digits (in the file suffix) for the time index More... | |
meshPtr_Type | M_mesh |
a pointer to the mesh More... | |
Int | M_procId |
the ID of the process More... | |
std::string | M_postfix |
the file suffix More... | |
UInt | M_numImportProc |
how many processes produced the data that we want to import More... | |
whereToDataIdMap_Type | M_whereToDataIdMap |
a map to retrieve all data located in the same geo entities (node or element) More... | |
feTypeToDataIdMap_Type | M_feTypeToDataIdMap |
a map to retrieve all data defined in the same FE space More... | |
dataVector_Type | M_dataVector |
the vector of ExporterData objects More... | |
std::list< Real > | M_timeSteps |
the list of time steps (for use in import procedures) More... | |
Exporter - Pure virtual class that describes a generic exporter.
This class is pure virtual and describes a generic exporter that can also do import
Definition at line 266 of file Exporter.hpp.
Definition at line 272 of file Exporter.hpp.
typedef std::shared_ptr<MeshType> meshPtr_Type |
Definition at line 273 of file Exporter.hpp.
typedef Epetra_Comm comm_Type |
Definition at line 274 of file Exporter.hpp.
typedef std::shared_ptr<comm_Type> commPtr_Type |
Definition at line 275 of file Exporter.hpp.
typedef ExporterData<mesh_Type> exporterData_Type |
Definition at line 276 of file Exporter.hpp.
Definition at line 277 of file Exporter.hpp.
Definition at line 278 of file Exporter.hpp.
Definition at line 279 of file Exporter.hpp.
Definition at line 280 of file Exporter.hpp.
Definition at line 281 of file Exporter.hpp.
Definition at line 282 of file Exporter.hpp.
Definition at line 283 of file Exporter.hpp.
typedef std::vector<exporterData_Type > dataVector_Type |
Definition at line 284 of file Exporter.hpp.
typedef dataVector_Type::iterator dataVectorIterator_Type |
Definition at line 285 of file Exporter.hpp.
typedef std::multimap<WhereEnum, UInt > whereToDataIdMap_Type |
Definition at line 286 of file Exporter.hpp.
typedef std::multimap<FE_TYPE, UInt > feTypeToDataIdMap_Type |
Definition at line 287 of file Exporter.hpp.
Exporter | ( | ) |
Empty constructor for Exporter.
Definition at line 606 of file Exporter.hpp.
Constructor for Exporter without prefix and procID.
In this case prefix and procID should be set separately
dfile | the GetPot data file where you must provide an [exporter] section with: "start" (start index for filenames 0 for 000, 1 for 001 etc.), "save" (how many time steps between snapshots) "multimesh" ( = true if the mesh has to be saved at each post-processing step) |
the | prefix for the case file (ex. "test" for test.case) |
Definition at line 618 of file Exporter.hpp.
|
inlinevirtual |
Destructor.
Definition at line 308 of file Exporter.hpp.
void addVariable | ( | const FieldTypeEnum & | type, |
const std::string & | variableName, | ||
const feSpacePtr_Type & | feSpacePtr, | ||
const vectorPtr_Type & | vectorPtr, | ||
const UInt & | start, | ||
const FieldRegimeEnum & | regime = exporterData_Type::UnsteadyRegime , |
||
const WhereEnum & | where = exporterData_Type::Node |
||
) |
Adds a new variable to be post-processed.
type | the type of the variable exporterData_Type::FieldTypeEnum |
variableName | the name of the variable (to be used in file prefix) |
feSpacePtr | a pointer to the FESpace of the variable |
vectorPtr | a pointer to the vector containing the values of the variable |
start | location in the vector where the storing of the variable starts |
regime | if UnsteadyRegime the filename should change at each time step |
where | choose whether the variable is defined on Nodes of Elements |
Definition at line 628 of file Exporter.hpp.
|
pure virtual |
Post-process the variables added to the list.
time | the solver time |
Implemented in ExporterVTK< MeshType >, ExporterHDF5< MeshType >, ExporterHDF5Mesh3D< MeshType >, ExporterEnsight< MeshType >, and ExporterEmpty< MeshType >.
Import data from previous simulations at a certain time.
Time | the time of the data to be imported |
Implemented in ExporterVTK< MeshType >, ExporterHDF5< MeshType >, ExporterEnsight< MeshType >, and ExporterEmpty< MeshType >.
Import data from previous simulations.
time | the solver time |
dt | time step used to rebuild the history up to now |
Implemented in ExporterVTK< MeshType >, ExporterHDF5< MeshType >, ExporterEnsight< MeshType >, and ExporterEmpty< MeshType >.
|
pure virtual |
Read only last timestep.
Implemented in ExporterVTK< MeshType >, ExporterHDF5< MeshType >, ExporterEnsight< MeshType >, and ExporterEmpty< MeshType >.
|
virtual |
Reimplemented in ExporterHDF5< MeshType >, and ExporterEnsight< MeshType >.
Definition at line 642 of file Exporter.hpp.
|
virtual |
Export the Processor ID as P0 variable.
Definition at line 695 of file Exporter.hpp.
void exportRegionMarkerID | ( | std::shared_ptr< MeshType > | mesh, |
std::shared_ptr< Epetra_Comm > | comm | ||
) |
Export the region marker ID as P0 variable.
Definition at line 760 of file Exporter.hpp.
|
virtual |
Export entity flags.
Definition at line 656 of file Exporter.hpp.
|
virtual |
Set data from file.
dataFile | data file. |
section | section in the data file. |
Reimplemented in ExporterVTK< MeshType >, and ExporterHDF5< MeshType >.
Definition at line 837 of file Exporter.hpp.
|
inline |
|
inline |
Set the folder for pre/postprocessing.
Directory | output folder |
Definition at line 391 of file Exporter.hpp.
|
inline |
Set the current time index.
timeIndex | index of the current time frame |
Definition at line 400 of file Exporter.hpp.
|
inline |
Set the time index of the first file.
timeIndexStart | index of the first time frame |
Definition at line 409 of file Exporter.hpp.
|
inline |
Set how many time step between two snapshots.
save | steps |
Definition at line 418 of file Exporter.hpp.
|
inline |
Set if to save the mesh at each time step.
multimesh | multimesh |
Definition at line 427 of file Exporter.hpp.
|
virtual |
Definition at line 849 of file Exporter.hpp.
|
inlinevirtual |
Close the output file.
This method is only used by some of the exporter which derive from this class.
Reimplemented in ExporterHDF5< MeshType >.
Definition at line 438 of file Exporter.hpp.
|
inline |
returns how many time steps between two snapshots
Definition at line 444 of file Exporter.hpp.
|
inline |
returns the time index of the first snapshot
Definition at line 450 of file Exporter.hpp.
|
inline |
returns the time index of the current snapshot
Definition at line 456 of file Exporter.hpp.
|
pure virtual |
returns the type of the map to use for the VectorEpetra
Implemented in ExporterVTK< MeshType >, ExporterHDF5< MeshType >, ExporterEnsight< MeshType >, and ExporterEmpty< MeshType >.
|
protected |
compute postfix
Definition at line 808 of file Exporter.hpp.
|
protectedpure virtual |
A method to read a scalar field (to be implemented in derived classes)
dvar | the ExporterData object |
Implemented in ExporterEnsight< MeshType >, and ExporterHDF5< MeshType >.
|
protectedpure virtual |
A method to read a vector field (to be implemented in derived classes)
dvar | the ExporterData object |
Implemented in ExporterEnsight< MeshType >, and ExporterHDF5< MeshType >.
|
protected |
the file prefix
Definition at line 488 of file Exporter.hpp.
|
protected |
the name of the folder where to read or write files
Definition at line 490 of file Exporter.hpp.
|
protected |
the time index of the first snapshot
Definition at line 492 of file Exporter.hpp.
|
protected |
the time index of the current snapshot
Definition at line 494 of file Exporter.hpp.
|
protected |
how many time steps between subsequent snapshots
Definition at line 496 of file Exporter.hpp.
|
protected |
do we want to save the mesh with each snapshot?
Definition at line 498 of file Exporter.hpp.
|
protected |
how many digits (in the file suffix) for the time index
Definition at line 500 of file Exporter.hpp.
|
protected |
a pointer to the mesh
Definition at line 502 of file Exporter.hpp.
|
protected |
the ID of the process
Definition at line 504 of file Exporter.hpp.
|
protected |
the file suffix
Definition at line 506 of file Exporter.hpp.
|
protected |
how many processes produced the data that we want to import
Definition at line 508 of file Exporter.hpp.
|
protected |
a map to retrieve all data located in the same geo entities (node or element)
Definition at line 510 of file Exporter.hpp.
|
protected |
a map to retrieve all data defined in the same FE space
Definition at line 512 of file Exporter.hpp.
|
protected |
the vector of ExporterData objects
Definition at line 514 of file Exporter.hpp.
|
protected |
the list of time steps (for use in import procedures)
Definition at line 516 of file Exporter.hpp.