![]() |
Peano
|
Represent a Peano reader. More...
#include <PeanoTextPatchFileReader.h>
Public Member Functions | |
PeanoTextPatchFileReader (const std::string &file) | |
Read in one file. | |
virtual | ~PeanoTextPatchFileReader () override |
virtual void | parse () override |
virtual std::vector< convert::data::DataSet > | getData () const override |
A file can hold a series of datasets. | |
![]() | |
virtual | ~PatchFileReader ()=default |
Private Member Functions | |
void | parsePatch (int dataSetCounter, int treeNumber, const std::vector< std::string > &patchDescription) |
void | parseVariablesDeclaration (int dataSetCounter, const std::vector< std::string > &patchDescription, const std::string &name, convert::data::PeanoDataType type) |
void | addDataToPatch (int dataSetCounter, const std::string &variableName, double *offset, double *size, int treeNumber, const std::vector< std::string > &textData) |
int | extractTreeNumberFromFileName () const |
Private Attributes | |
const std::string | _file |
int | _dimensions |
std::vector< convert::data::DataSet > | _data |
Static Private Attributes | |
static tarch::logging::Log | _log |
Represent a Peano reader.
A reader is an object which basically takes one file and gives the content of this file.
If you just want to read in one file, open it with this file and pass the field patches into the PeanoConverter. So this class has two purposes:
At the moment, a file either includes other files and thus holds a sequence of data sets, or it holds real data. Mixtures are not allowed. Therefore, there's no recursion of reads.
Definition at line 46 of file PeanoTextPatchFileReader.h.
convert::input::PeanoTextPatchFileReader::PeanoTextPatchFileReader | ( | const std::string & | file | ) |
Read in one file.
Definition at line 21 of file PeanoTextPatchFileReader.cpp.
|
overridevirtual |
Definition at line 27 of file PeanoTextPatchFileReader.cpp.
|
private |
Definition at line 371 of file PeanoTextPatchFileReader.cpp.
References tarch::mpi::Rank::abort(), convert::data::PatchData::data, convert::data::Variable::dofsPerAxis, convert::data::Variable::getTotalNumberOfQuantitiesPerPatch(), logDebug, logError, convert::data::Variable::toString(), and convert::data::Variable::unknowns.
|
private |
Definition at line 31 of file PeanoTextPatchFileReader.cpp.
|
overridevirtual |
A file can hold a series of datasets.
Implements convert::input::PatchFileReader.
Definition at line 405 of file PeanoTextPatchFileReader.cpp.
|
overridevirtual |
Implements convert::input::PatchFileReader.
Definition at line 46 of file PeanoTextPatchFileReader.cpp.
References tarch::mpi::Rank::abort(), convert::data::Cell_Values, convert::input::Parser::getDirectory(), logDebug, logError, logInfo, convert::input::Parser::removeHyphens(), convert::input::Parser::tokenise(), and convert::data::Vertex_Values.
|
private |
Definition at line 292 of file PeanoTextPatchFileReader.cpp.
References tarch::mpi::Rank::abort(), assertion, logDebug, logError, convert::input::Parser::removeHyphens(), and convert::input::Parser::tokenise().
|
private |
Definition at line 191 of file PeanoTextPatchFileReader.cpp.
References tarch::mpi::Rank::abort(), logDebug, logError, and convert::input::Parser::tokenise().
|
private |
Definition at line 60 of file PeanoTextPatchFileReader.h.
Referenced by peano4.datamodel.DaStGen2.DaStGen2Generator::construct_output(), peano4.toolbox.particles.ParticleSet.ParticleSetGenerator_ScatteredOnHeap_IndexByList::construct_output(), peano4.toolbox.particles.ParticleSet.ParticleSetGenerator_ScatteredOnHeap_IndexByVector::construct_output(), peano4.toolbox.particles.ParticleSet.ParticleSetGenerator_ContinuousPerVertex::construct_output(), peano4.toolbox.particles.ParticleSet.ParticleSetGenerator_GlobalContinuous::construct_output(), peano4.datamodel.DaStGen2.DaStGen2Generator::get_header_file_include(), peano4.toolbox.particles.ParticleSet.AbstractParticleSetGenerator::get_header_file_include(), peano4.datamodel.DaStGen2.DaStGen2Generator::get_stack_container(), peano4.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::get_stack_container(), and peano4.toolbox.particles.ParticleSet.AbstractParticleSetGenerator::get_stack_container().
|
private |
Definition at line 59 of file PeanoTextPatchFileReader.h.
Referenced by exahype2.Project.Project::__configure_makefile(), swift2.Project.Project::__configure_makefile(), api.Project.Project::__configure_makefile(), exahype2.Project.Project::__export_constants(), swift2.Project.Project::__export_constants(), api.Project.Project::__export_constants(), api.Project.Project::__init__(), scenarios.elastic_planar_waves.ElasticPlanarWaves::analytical_solution(), peano4.visualisation.output.Visualiser.PatchFileData::apply_renderer_to_data(), exahype2.Project.Project::generate_Peano4_project(), scenarios.elastic_planar_waves.ElasticPlanarWaves::initial_conditions(), swift2.Project.Project::set_global_simulation_parameters(), api.Project.Project::set_global_simulation_parameters(), api.Project.Project::set_global_simulation_parameters(), exahype2.Project.Project::set_global_simulation_parameters(), and scenarios.scenario.Scenario::set_global_simulation_parameters().
|
private |
Definition at line 50 of file PeanoTextPatchFileReader.h.
|
staticprivate |
Definition at line 48 of file PeanoTextPatchFileReader.h.