![]() |
ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
|
#include <Output.h>
Inherited by OutputGNU, and OutputXML.
Public Member Functions | |
Output () | |
Default constructor for specific output without specific needs. | |
Output (std::string casTest, std::string nameRun, tinyxml2::XMLElement *element, std::string fileName, Input *entree) | |
Main constructor for datasets used for OutputXML and OutputGNU according to outputMode. | |
Output (std::string nameRun, int fileNumberRestartMeshMapping, Input *input) | |
Constructor for datasets used for OutputXML when mesh mapping restart option is activated. | |
Output (tinyxml2::XMLElement *element) | |
Constructor for specific derived GNU outputs (boundary, probe, cut) | |
virtual | ~Output () |
virtual void | locateProbeInMesh (const TypeMeshContainer< Cell * > &, const int &, bool=false) |
virtual Cell * | locateProbeInAMRSubMesh (std::vector< Cell * > *, const int &) |
void | copyInputFiles () const |
void | initializeOutput (const Cell &cell) |
void | initializeOutput (std::vector< CellInterface * > *cellInterfacesLvl) |
To initialize OutputBoundaryMassflowGNU. | |
void | initializeOutputMeshMapping (const Cell &cell) |
To initialize output for Mesh Mapping Restart. | |
virtual void | initializeOutputInfos () |
virtual void | writeResults (Mesh *, std::vector< Cell * > *) |
virtual void | writeResults (std::vector< CellInterface * > *) |
void | printTree (Mesh *mesh, std::vector< Cell * > *cellsLvl, int m_restartAMRsaveFreq) |
virtual void | writeInfos () |
virtual void | writeProgress () |
void | saveInfoCells () const |
virtual void | initializeSpecificOutput () |
virtual void | initializeSpecificOutput (std::vector< CellInterface * > *) |
void | readInfos () |
Currently only used for OutputBoundaryMassflowGNU. | |
int | readNbCpu () |
Read and return the number of cpu from the infoCalcul file of a performed simulation. | |
virtual void | readResults (Mesh *, std::vector< Cell * > *) |
Read results of a previous simulation to restart from it. | |
virtual void | readResultsCpu (Mesh *, std::vector< Cell * > *, int) |
Read results of a single partition of a previous simulation to restart from it. | |
void | readDomainDecompostion (Mesh *mesh) |
void | readTree (Mesh *mesh, TypeMeshContainer< Cell * > *cellsLvl, TypeMeshContainer< Cell * > *cellsLvlGhost, TypeMeshContainer< CellInterface * > *cellInterfacesLvl, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR) |
int | getNumFile () const |
virtual double | getNextTime () |
virtual bool | possesses () |
const std::string & | getFolderOutput () |
const TypeOutput & | getType () const |
bool | getReducedOutput () const |
Protected Member Functions | |
void | printWritingInfo () const |
void | saveInfos () const |
std::string | createFilename (const char *name, int lvl=-1, int proc=-1, int numFichier=-1) const |
void | writeDataset (std::vector< double > dataset, std::ofstream &fileStream, TypeData typeData) |
void | getDataset (std::istringstream &data, std::vector< double > &dataset) |
Protected Attributes | |
Input * | m_input |
Pointer to input. | |
Run * | m_run |
Pointer to run. | |
TypeOutput | m_type |
Type of output. | |
std::string | m_simulationName |
Test case name (defined in "main.xml") | |
std::string | m_infoCalcul |
Filename to save useful info of computation. | |
std::string | m_infoMesh |
Filename of mesh info file. | |
std::string | m_treeStructure |
Filename for tree structure backup. | |
std::string | m_domainDecomposition |
Filename for domain decomposition backup. | |
std::string | m_fileNameResults |
Filename of result file. | |
std::string | m_filenameCollectionParaview |
Name of the collection containing the results files (for Paraview) | |
std::string | m_filenameCollectionVisIt |
Name of the collection containing the results files (for VisIt) | |
std::string | m_folderOutput |
Folder to store results. | |
std::string | m_folderSavesInput |
Folder to store a copy of input files. | |
std::string | m_folderDatasets |
Folder to save the datasets. | |
std::string | m_folderInfoMesh |
Folder to store mesh info. | |
std::string | m_folderCuts |
Cuts results folder location. | |
std::string | m_folderProbes |
Probes results folder location. | |
std::string | m_folderGlobalQuantities |
Global quantity (e.g. mass) results folder location. | |
std::string | m_folderBoundaries |
Boundaries flux results folder location. | |
std::string | m_fileCollectionParaview |
Chemin du file collection regroupant les fichiers resultats (for Paraview) | |
std::string | m_fileCollectionVisIt |
Chemin du file collection regroupant les fichiers resultats (for VisIt) | |
std::string | m_folderErrorsAndWarnings |
File path for errors and warnings. | |
bool | m_writeBinary |
Choice to write binary/ASCII. | |
bool | m_splitData |
Choice print data in separate files. | |
int | m_precision |
Output files precision (number of digits) //default: 0. | |
bool | m_reducedOutput |
Choice of reduced number of output variables when possible (depends on the model) | |
int | m_numFichier |
std::string | m_endianMode |
int | m_nbCpusRestarted |
Number of CPUs of the simulation to be restarted. | |
Cell | m_cellRef |
Reference cell to extract variables name. | |
Output::Output | ( | ) |
Default constructor for specific output without specific needs.
Output::Output | ( | std::string | casTest, |
std::string | nameRun, | ||
tinyxml2::XMLElement * | element, | ||
std::string | fileName, | ||
Input * | entree | ||
) |
Main constructor for datasets used for OutputXML and OutputGNU according to outputMode.
casTest | Test case name (folder containing input xml files (main, mesh etc.) |
nameRun | Folder to store results |
element | XML outputMode element |
fileName | Full path to main.xml of current test case |
entree | Input pointer to access run pointer and its information |
Output::Output | ( | std::string | nameRun, |
int | fileNumberRestartMeshMapping, | ||
Input * | input | ||
) |
Output::Output | ( | tinyxml2::XMLElement * | element | ) |
Constructor for specific derived GNU outputs (boundary, probe, cut)
element | XML GNU output element to get stream precision |
|
virtual |
void Output::copyInputFiles | ( | ) | const |
|
protected |
|
protected |
|
inline |
|
inlinevirtual |
Reimplemented in OutputBoundaryGNU, and OutputProbeGNU.
|
inline |
|
inline |
|
inline |
void Output::initializeOutput | ( | const Cell & | cell | ) |
void Output::initializeOutput | ( | std::vector< CellInterface * > * | cellInterfacesLvl | ) |
To initialize OutputBoundaryMassflowGNU.
|
virtual |
Reimplemented in OutputCutGNU, and OutputProbeGNU.
void Output::initializeOutputMeshMapping | ( | const Cell & | cell | ) |
To initialize output for Mesh Mapping Restart.
|
inlinevirtual |
Reimplemented in OutputGlobalGNU, OutputGNU, OutputProbeGNU, and OutputXML.
|
inlinevirtual |
Reimplemented in OutputGNU, and OutputBoundaryGNU.
|
inlinevirtual |
Reimplemented in OutputProbeGNU.
|
inlinevirtual |
Reimplemented in OutputProbeGNU.
|
inlinevirtual |
Reimplemented in OutputProbeGNU.
|
protected |
void Output::readDomainDecompostion | ( | Mesh * | mesh | ) |
void Output::readInfos | ( | ) |
Currently only used for OutputBoundaryMassflowGNU.
Read the informations related to a previous simulation (number of cpu, time, file number, etc.) using infoCalcul file
Only the content since the file number to be restarted is kept (as the next files will overwrite the later content)
int Output::readNbCpu | ( | ) |
Read and return the number of cpu from the infoCalcul file of a performed simulation.
Read results of a previous simulation to restart from it.
Available for all mesh types if the same number of cpus is used between both simulations
mesh | Mesh object of the current simulation |
cellsLvl | Computationnal cells to be filled with results of previous simulation |
Reimplemented in OutputXML.
Read results of a single partition of a previous simulation to restart from it.
Available for GmshV2 only but allow the use of mesh mapping and/or use of a different number of cpu than the previous simulation
mesh | Mesh object of a single partition of the previous simulation (either the same one as current or older one in case of mapping) |
cellsLvl | Computationnal cells to be filled with results of previous simulation |
cpu | Cpu number of the partition to be read |
Reimplemented in OutputXML.
void Output::readTree | ( | Mesh * | mesh, |
TypeMeshContainer< Cell * > * | cellsLvl, | ||
TypeMeshContainer< Cell * > * | cellsLvlGhost, | ||
TypeMeshContainer< CellInterface * > * | cellInterfacesLvl, | ||
const std::vector< AddPhys * > & | addPhys, | ||
int & | nbCellsTotalAMR | ||
) |
void Output::saveInfoCells | ( | ) | const |
|
protected |
|
protected |
|
virtual |
Reimplemented in OutputCutGNU, and OutputProbeGNU.
|
virtual |
Reimplemented in OutputProbeGNU, OutputGlobalGNU, OutputCutGNU, OutputGNU, and OutputXML.
|
inlinevirtual |
Reimplemented in OutputBoundaryGNU, OutputGNU, OutputBoundaryAllGNU, and OutputBoundaryFluxGNU.
|
protected |
Reference cell to extract variables name.
|
protected |
Filename for domain decomposition backup.
|
protected |
|
protected |
Chemin du file collection regroupant les fichiers resultats (for Paraview)
|
protected |
Chemin du file collection regroupant les fichiers resultats (for VisIt)
|
protected |
Name of the collection containing the results files (for Paraview)
|
protected |
Name of the collection containing the results files (for VisIt)
|
protected |
Filename of result file.
|
protected |
Boundaries flux results folder location.
|
protected |
Cuts results folder location.
|
protected |
Folder to save the datasets.
|
protected |
File path for errors and warnings.
|
protected |
Global quantity (e.g. mass) results folder location.
|
protected |
Folder to store mesh info.
|
protected |
Folder to store results.
|
protected |
Probes results folder location.
|
protected |
Folder to store a copy of input files.
|
protected |
Filename to save useful info of computation.
|
protected |
Filename of mesh info file.
|
protected |
Pointer to input.
|
protected |
Number of CPUs of the simulation to be restarted.
|
protected |
|
protected |
Output files precision (number of digits) //default: 0.
|
protected |
Choice of reduced number of output variables when possible (depends on the model)
|
protected |
Pointer to run.
|
protected |
Test case name (defined in "main.xml")
|
protected |
Choice print data in separate files.
|
protected |
Filename for tree structure backup.
|
protected |
Type of output.
|
protected |
Choice to write binary/ASCII.