Peano
Loading...
Searching...
No Matches
convert::data::DataSet Class Reference

A dataset is a wrapper around one big map. More...

#include <DataSet.h>

Collaboration diagram for convert::data::DataSet:

Public Member Functions

 DataSet ()
 
void free ()
 
void merge (const DataSet &other)
 This operation does not do a deep copy, i.e.
 
std::vector< PatchDatagetData (const Variable &selector) const
 
std::vector< VariablegetVariables () const
 
bool hasVariable (const std::string &name) const
 
Variable getVariable (const std::string &name) const
 
void add (Variable variable, const std::vector< PatchData > &patchData)
 If you add a patch, don't free the patch, i.e.
 

Private Attributes

std::map< Variable, std::vector< PatchData > > data
 

Static Private Attributes

static tarch::logging::Log _log
 

Friends

class convert::input::PeanoTextPatchFileReader
 
class convert::input::PeanoTextMetaFileReader
 

Detailed Description

A dataset is a wrapper around one big map.

The map maps instances of Variable onto vectors of DataSet.

Definition at line 34 of file DataSet.h.

Constructor & Destructor Documentation

◆ DataSet()

convert::data::DataSet::DataSet ( )

Definition at line 15 of file DataSet.cpp.

Member Function Documentation

◆ add()

void convert::data::DataSet::add ( Variable variable,
const std::vector< PatchData > & patchData )

If you add a patch, don't free the patch, i.e.

this operation does not do a deep copy.

Definition at line 86 of file DataSet.cpp.

References assertion.

Referenced by convert::filter::ConvertTreeIdIntoDataField::apply(), convert::filter::Copy::apply(), convert::filter::Intersection::apply(), convert::filter::SelectValue::apply(), and convert::filter::SeparateResolutions::apply().

Here is the caller graph for this function:

◆ free()

void convert::data::DataSet::free ( )

Definition at line 19 of file DataSet.cpp.

References logDebug.

◆ getData()

std::vector< convert::data::PatchData > convert::data::DataSet::getData ( const Variable & selector) const
Returns
Set of readers tied to a particular model. These readers haven't parsed their files yet, i.e. you have to call parse() manually.

Definition at line 29 of file DataSet.cpp.

References logError, and convert::data::Variable::name.

Referenced by convert::filter::ConvertTreeIdIntoDataField::apply(), convert::filter::Copy::apply(), convert::filter::Intersection::apply(), convert::filter::SelectValue::apply(), convert::filter::SeparateResolutions::apply(), merge(), and convert::output::PeanoWriter::writeFile().

Here is the caller graph for this function:

◆ getVariable()

convert::data::Variable convert::data::DataSet::getVariable ( const std::string & name) const

Definition at line 75 of file DataSet.cpp.

◆ getVariables()

std::vector< convert::data::Variable > convert::data::DataSet::getVariables ( ) const
Returns
All the selectors (data representations) stored for a time step

Definition at line 56 of file DataSet.cpp.

Referenced by convert::output::PeanoWriter::writeFile().

Here is the caller graph for this function:

◆ hasVariable()

bool convert::data::DataSet::hasVariable ( const std::string & name) const

Definition at line 65 of file DataSet.cpp.

◆ merge()

void convert::data::DataSet::merge ( const DataSet & other)

This operation does not do a deep copy, i.e.

the PatchData instances within other are not copied. So don't free them.

Definition at line 40 of file DataSet.cpp.

References data, and getData().

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ convert::input::PeanoTextMetaFileReader

friend class convert::input::PeanoTextMetaFileReader
friend

Definition at line 66 of file DataSet.h.

◆ convert::input::PeanoTextPatchFileReader

Definition at line 65 of file DataSet.h.

Field Documentation

◆ _log

tarch::logging::Log convert::data::DataSet::_log
staticprivate

Definition at line 68 of file DataSet.h.

◆ data

std::map< Variable, std::vector<PatchData> > convert::data::DataSet::data
private

Definition at line 70 of file DataSet.h.

Referenced by peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__generate_dastgen_input_file(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_file_name(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_full_qualified_file_name(), swift2.particle.Particle.Particle::__init__(), swift2.particle.Particle.Particle::_add_dependency_checks(), swift2.particle.Particle.Particle::_dependency_checks_modify_steps(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_enum_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_double_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_integer_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_string_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_user_defined_attributes(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::_get_dictionary_for_output(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::construct_output(), peano4.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::construct_output(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::construct_output(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::construct_output(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::construct_output(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_header_file_include(), peano4.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::get_header_file_include(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_header_file_include(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_header_file_include(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_header_file_include(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_stack_container(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_stack_container(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_stack_container(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_stack_container(), merge(), swift2.particle.Particle.Particle::readme_descriptor(), swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius::set_parameters(), swift2.particle.SPHParticle.SPHParticle::set_parameters(), and swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize::set_parameters().


The documentation for this class was generated from the following files: