Peano 4
Loading...
Searching...
No Matches
convert::data::PatchData Class Reference

A patch is a square or cube in the domain. More...

#include <PatchData.h>

Public Member Functions

 PatchData (int dimensions, double *offset_, double *size_, int dofsPerAxis, int unknownsPerDoF, int originTree)
 
bool samePatch (const PatchData &otherPatch)
 
bool overlaps (const PatchData &otherPatch)
 
void free ()
 Free internal dynamic data types if there's still data left.
 
void copyData (const PatchData &otherData, int dofsPerAxis, int unknownsPerDoF)
 

Data Fields

const int dimensions
 
double offset [MaxDimensions]
 
double size [MaxDimensions]
 size of the patch in each dimension
 
double * data
 Mapping from variables onto the actual data.
 
int originTree
 Tree that has originally written this piece of data.
 

Detailed Description

A patch is a square or cube in the domain.

It can hold variables which have been identified before via a Variable entry.

Definition at line 25 of file PatchData.h.

Constructor & Destructor Documentation

◆ PatchData()

convert::data::PatchData::PatchData ( int dimensions,
double * offset_,
double * size_,
int dofsPerAxis,
int unknownsPerDoF,
int originTree )

Definition at line 15 of file PatchData.cpp.

References tarch::la::aPowI(), data, dimensions, offset, and size.

Here is the call graph for this function:

Member Function Documentation

◆ copyData()

void convert::data::PatchData::copyData ( const PatchData & otherData,
int dofsPerAxis,
int unknownsPerDoF )

Definition at line 53 of file PatchData.cpp.

References tarch::la::aPowI(), and data.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free()

void convert::data::PatchData::free ( )

Free internal dynamic data types if there's still data left.

Definition at line 61 of file PatchData.cpp.

◆ overlaps()

bool convert::data::PatchData::overlaps ( const PatchData & otherPatch)

Definition at line 41 of file PatchData.cpp.

References tarch::la::greater(), offset, size, and tarch::la::smaller().

Here is the call graph for this function:

◆ samePatch()

bool convert::data::PatchData::samePatch ( const PatchData & otherPatch)

Definition at line 29 of file PatchData.cpp.

References tarch::la::equals(), offset, and size.

Here is the call graph for this function:

Field Documentation

◆ data

double* convert::data::PatchData::data

Mapping from variables onto the actual data.

We store data as AoS. It is furthermore ordered lexicographically, i.e. the x index is the fastest running index.

Definition at line 54 of file PatchData.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(), convert::input::PeanoTextPatchFileReader::addDataToPatch(), convert::filter::ConvertTreeIdIntoDataField::apply(), 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(), copyData(), 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(), PatchData(), 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().

◆ dimensions

const int convert::data::PatchData::dimensions

◆ offset

double convert::data::PatchData::offset[MaxDimensions]

◆ originTree

int convert::data::PatchData::originTree

Tree that has originally written this piece of data.

Or -1 if data does not result directly from any tree.

Definition at line 60 of file PatchData.h.

◆ size

double convert::data::PatchData::size[MaxDimensions]

size of the patch in each dimension

Definition at line 47 of file PatchData.h.

Referenced by peano4.visualisation.Patch.Patch::__str__(), overlaps(), PatchData(), samePatch(), and convert::output::PeanoWriter::writeFile().


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