![]() |
LifeV
|
ExporterEnsight data exporter. More...
#include <ExporterEnsight.hpp>
Public typedefs | |
typedef MeshType | mesh_Type |
typedef Exporter< mesh_Type > | super |
typedef super::meshPtr_Type | meshPtr_Type |
typedef super::commPtr_Type | commPtr_Type |
typedef super::vectorPtr_Type | vectorPtr_Type |
typedef super::exporterData_Type | exporterData_Type |
Static members | |
static MapEpetraType const | MapType |
returns the type of the map to use for the VectorEpetra More... | |
Constructors and destructor | |
ExporterEnsight () | |
Default constructor. More... | |
ExporterEnsight (const GetPot &dfile, meshPtr_Type mesh, const std::string &prefix, const Int &procId) | |
Constructor for ExporterEnsight. More... | |
ExporterEnsight (const GetPot &dfile, const std::string &prefix) | |
Constructor for ExporterEnsight. More... | |
Public methods | |
void | postProcess (const Real &time) |
Post-process the variables added to the list. More... | |
UInt | importFromTime (const Real &) |
Import data from previous simulations at a certain time. More... | |
void | import (const Real &importTime, const Real &dt) |
Import data from previous simulations and rebuild the internal time counters. More... | |
void | import (const Real &importTime) |
Import data from previous simulations. More... | |
void | readVariable (exporterData_Type &dvar) |
Read variable. More... | |
void | setMeshProcId (const meshPtr_Type mesh, const Int &procId) |
Set the mesh and the processor id. More... | |
void | exportPID (meshPtr_Type, commPtr_Type comm, const bool=false) |
temporary: the method should work form the Exporter class More... | |
Get methods | |
MapEpetraType | mapType () const |
returns the type of the map to use for the VectorEpetra More... | |
Private methods | |
void | writeCase (const Real &time) |
Compose the .case file. More... | |
void | writeAsciiGeometry (const std::string geoFile) |
Compose the .geo file. More... | |
void | writeAscii (const exporterData_Type &dvar) |
The ASCII writer. More... | |
void | writeAsciiValues (const exporterData_Type &dvar, const std::string &suffix) |
The ASCII writer. More... | |
void | caseMeshSection (std::ofstream &casef) |
Compose the "mesh" section of the .case file. More... | |
void | caseVariableSection (std::ofstream &casef) |
Compose the "variable" section of the .case file. More... | |
void | caseTimeSection (std::ofstream &casef, const Real &time) |
Compose the "time" section of the .case file. More... | |
void | writeGlobalIDs (const std::string &filename) |
Dump on file the IDs of the global DOFs associated to this process. More... | |
void | readAscii (exporterData_Type &dvar) |
The ASCII reader. More... | |
void | readAsciiValues (exporterData_Type &dvar, const std::string &suffix) |
The ASCII reader. More... | |
void | readGlobalIDs (const std::string &filename, std::vector< Real > &globalDOF) |
Read from file and store in a vector a list of global IDs. More... | |
void | readScalar (exporterData_Type &dvar) |
The generic reader (specialization of the parent class method) More... | |
void | readVector (exporterData_Type &dvar) |
The generic reader (specialization of the parent class method) More... | |
void | initProcId () |
initialize the internal data structures storing the ID of the current process More... | |
void | setNodesMap (std::vector< Int > ltGNodesMap) |
Set the local-to-global map of DOFs. More... | |
void | initNodesMap () |
Build the local-to-global map of DOFs. More... | |
Private members | |
UInt | M_steps |
the counter of the number of steps processed More... | |
std::vector< Int > | M_ltGNodesMap |
the local-to-global map: ltGNodesMap[i] is the global ID of the i-th DOF owned by the current process More... | |
std::string | M_me |
the ID of the current process More... | |
std::string | M_FEstr |
a string label for the FE space More... | |
std::string | M_bdFEstr |
a string label for the boundary FE space More... | |
UInt | M_nbLocalDof |
the number of local DOFs (per element) More... | |
UInt | M_nbLocalBdDof |
the number of local boundary DOFs (per element) More... | |
bool | M_firstTimeStep |
are we performing the first post-processing operation? More... | |
Additional Inherited Members | |
![]() | |
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 |
![]() | |
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... | |
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 | 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... | |
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... | |
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... | |
![]() | |
void | computePostfix () |
compute postfix More... | |
![]() | |
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... | |
ExporterEnsight data exporter.
Definition at line 55 of file ExporterEnsight.hpp.
Definition at line 61 of file ExporterEnsight.hpp.
Definition at line 62 of file ExporterEnsight.hpp.
typedef super::meshPtr_Type meshPtr_Type |
Definition at line 63 of file ExporterEnsight.hpp.
typedef super::commPtr_Type commPtr_Type |
Definition at line 64 of file ExporterEnsight.hpp.
typedef super::vectorPtr_Type vectorPtr_Type |
Definition at line 65 of file ExporterEnsight.hpp.
Definition at line 66 of file ExporterEnsight.hpp.
ExporterEnsight | ( | ) |
Default constructor.
Definition at line 314 of file ExporterEnsight.hpp.
ExporterEnsight | ( | const GetPot & | dfile, |
meshPtr_Type | mesh, | ||
const std::string & | prefix, | ||
const Int & | procId | ||
) |
Constructor for ExporterEnsight.
dfile | the GetPot data file where you must provide and [ensight] section with: "start" (start index for filenames 0 for 000, 1 for 001 etc.), "save" (how many time steps per posptrocessing) "multimesh" (=true if the mesh has to be saved at each post-processing step) |
mesh | the mesh |
the | prefix for the case file (ex. "test" for test.case) |
the | procId determines de CPU id. if negative, it ussemes there is only one processor |
Definition at line 324 of file ExporterEnsight.hpp.
ExporterEnsight | ( | const GetPot & | dfile, |
const std::string & | prefix | ||
) |
Constructor for ExporterEnsight.
Definition at line 338 of file ExporterEnsight.hpp.
|
virtual |
Post-process the variables added to the list.
time | the solver time |
Implements Exporter< MeshType >.
Definition at line 353 of file ExporterEnsight.hpp.
Import data from previous simulations at a certain time.
Time | the time of the data to be imported |
Not yet implemented for ExporterEnsight
Implements Exporter< MeshType >.
Definition at line 115 of file ExporterEnsight.hpp.
Import data from previous simulations and rebuild the internal time counters.
importTime | the time of the snapshot to be imported |
dt | the time step, is used to rebuild the history up to now |
Implements Exporter< MeshType >.
Definition at line 413 of file ExporterEnsight.hpp.
|
virtual |
Import data from previous simulations.
importTime | the time of the snapshot to be imported |
Implements Exporter< MeshType >.
Definition at line 432 of file ExporterEnsight.hpp.
|
inlinevirtual |
Read variable.
dvar | the ExporterData object |
Reimplemented from Exporter< MeshType >.
Definition at line 138 of file ExporterEnsight.hpp.
void setMeshProcId | ( | const meshPtr_Type | mesh, |
const Int & | procId | ||
) |
Set the mesh and the processor id.
mesh | a pointer to the mesh |
procId | the ID of the current process |
Definition at line 463 of file ExporterEnsight.hpp.
|
inline |
temporary: the method should work form the Exporter class
Definition at line 151 of file ExporterEnsight.hpp.
|
inlinevirtual |
returns the type of the map to use for the VectorEpetra
Implements Exporter< MeshType >.
Definition at line 164 of file ExporterEnsight.hpp.
|
private |
Compose the .case file.
Time | the time of the snapshot |
Definition at line 514 of file ExporterEnsight.hpp.
|
private |
Compose the .geo file.
geoFile | the name of the file to be produced |
Definition at line 528 of file ExporterEnsight.hpp.
|
private |
The ASCII writer.
dvar | the ExporterData object |
Definition at line 578 of file ExporterEnsight.hpp.
|
private |
The ASCII writer.
dvar | the ExporterData object |
suffix | the file suffix (.scl or .vct) |
Definition at line 597 of file ExporterEnsight.hpp.
|
private |
Compose the "mesh" section of the .case file.
casef | the file object |
Specify whether or not the mesh is changing for each snapshot
Definition at line 689 of file ExporterEnsight.hpp.
|
private |
Compose the "variable" section of the .case file.
casef | the file object |
The file name will be different based on the regime and the kind of field (scalar / vector)
Definition at line 712 of file ExporterEnsight.hpp.
|
private |
Compose the "time" section of the .case file.
casef | the file object |
time | the current time |
The file will contain the updated number of time steps and the complete list of time values
Definition at line 749 of file ExporterEnsight.hpp.
|
private |
Dump on file the IDs of the global DOFs associated to this process.
filename | the file name |
Definition at line 655 of file ExporterEnsight.hpp.
|
private |
The ASCII reader.
dvar | the ExporterData object |
Definition at line 776 of file ExporterEnsight.hpp.
|
private |
The ASCII reader.
dvar | the ExporterData object |
suffix | the file suffix (.scl or .vct) |
Definition at line 794 of file ExporterEnsight.hpp.
|
private |
Read from file and store in a vector a list of global IDs.
filename | the file name |
globalDOF | the stored list of IDs |
Definition at line 887 of file ExporterEnsight.hpp.
|
inlineprivatevirtual |
The generic reader (specialization of the parent class method)
dvar | the ExporterData object |
Implements Exporter< MeshType >.
Definition at line 246 of file ExporterEnsight.hpp.
|
inlineprivatevirtual |
The generic reader (specialization of the parent class method)
dvar | the ExporterData object |
Implements Exporter< MeshType >.
Definition at line 254 of file ExporterEnsight.hpp.
|
private |
initialize the internal data structures storing the ID of the current process
Definition at line 863 of file ExporterEnsight.hpp.
|
inlineprivate |
Set the local-to-global map of DOFs.
ltGNodesMap | the local-to-global map |
ltGNodesMap[i] is the global ID of the i-th DOF owned by the current process
Definition at line 266 of file ExporterEnsight.hpp.
|
private |
Build the local-to-global map of DOFs.
ltGNodesMap | the local-to-global map |
ltGNodesMap[i] is the global ID of the i-th DOF owned by the current process
Definition at line 876 of file ExporterEnsight.hpp.
|
static |
returns the type of the map to use for the VectorEpetra
Definition at line 72 of file ExporterEnsight.hpp.
|
private |
the counter of the number of steps processed
Definition at line 282 of file ExporterEnsight.hpp.
|
private |
the local-to-global map: ltGNodesMap[i] is the global ID of the i-th DOF owned by the current process
Definition at line 285 of file ExporterEnsight.hpp.
|
private |
the ID of the current process
Definition at line 287 of file ExporterEnsight.hpp.
|
private |
a string label for the FE space
Definition at line 289 of file ExporterEnsight.hpp.
|
private |
a string label for the boundary FE space
Definition at line 291 of file ExporterEnsight.hpp.
|
private |
the number of local DOFs (per element)
Definition at line 293 of file ExporterEnsight.hpp.
|
private |
the number of local boundary DOFs (per element)
Definition at line 295 of file ExporterEnsight.hpp.
|
private |
are we performing the first post-processing operation?
Definition at line 297 of file ExporterEnsight.hpp.