Version: 9.12.0
MEDCoupling::MEDCouplingAMRAttribute Class Reference
Inheritance diagram for MEDCoupling::MEDCouplingAMRAttribute:
Collaboration diagram for MEDCoupling::MEDCouplingAMRAttribute:

Public Member Functions

void alloc ()
 
MEDCouplingFieldDoublebuildCellFieldOnRecurseWithoutOverlapWithoutGhost (MEDCouplingCartesianAMRMeshGen *mesh, const std::string &fieldName) const
 
MEDCouplingFieldDoublebuildCellFieldOnWithGhost (MEDCouplingCartesianAMRMeshGen *mesh, const std::string &fieldName) const
 
MEDCouplingFieldDoublebuildCellFieldOnWithoutGhost (MEDCouplingCartesianAMRMeshGen *mesh, const std::string &fieldName) const
 
bool changeGodFather (MEDCouplingCartesianAMRMesh *gf)
 
void dealloc ()
 
MEDCouplingAMRAttributedeepCopy () const
 
MEDCouplingAMRAttributedeepCpyWithoutGodFather () const
 
std::string getClassName () const override
 
std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const
 
DataArrayDoublegetFieldOn (MEDCouplingCartesianAMRMeshGen *mesh, const std::string &fieldName)
 
const DataArrayDoublegetFieldOn (MEDCouplingCartesianAMRMeshGen *mesh, const std::string &fieldName) const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
mcIdType getNumberOfLevels () const
 
MEDCouplingAMRAttributeprojectTo (MEDCouplingCartesianAMRMesh *targetGF) const
 
std::vector< DataArrayDouble * > retrieveFieldsOn (MEDCouplingCartesianAMRMeshGen *mesh) const
 
void spillInfoOnComponents (const std::vector< std::vector< std::string > > &compNames)
 
void spillNatures (const std::vector< NatureOfField > &nfs)
 
void synchronizeAllGhostZones ()
 
void synchronizeAllGhostZonesAtASpecifiedLevel (mcIdType level)
 
void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather (mcIdType level)
 
void synchronizeAllGhostZonesOfDirectChidrenOf (const MEDCouplingCartesianAMRMeshGen *mesh)
 
void synchronizeCoarseToFine ()
 
void synchronizeCoarseToFineBetween (mcIdType fromLev, mcIdType toLev)
 
void synchronizeFineToCoarse ()
 
void synchronizeFineToCoarseBetween (mcIdType fromLev, mcIdType toLev)
 
void updateTime () const
 
std::string writeVTHB (const std::string &fileName) const
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingDataForGodFather
MEDCouplingCartesianAMRMeshgetMyGodFather ()
 
const MEDCouplingCartesianAMRMeshgetMyGodFather () const
 
- Public Member Functions inherited from MEDCoupling::RefCountObjectOnly
bool decrRef () const
 
int getRCValue () const
 
void incrRef () const
 
RefCountObjectOnlyoperator= (const RefCountObjectOnly &other)
 
- Public Member Functions inherited from MEDCoupling::BigMemoryObject
std::string debugHeapMemorySize () const
 
std::vector< const BigMemoryObject * > getAllTheProgeny () const
 
std::vector< const BigMemoryObject * > getDirectChildren () const
 
std::size_t getHeapMemorySize () const
 
std::string getHeapMemorySizeStr () const
 
bool isObjectInTheProgeny (const BigMemoryObject *obj) const
 
virtual ~BigMemoryObject ()
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 
 TimeLabel (const TimeLabel &other)=default
 

Static Public Member Functions

static MEDCouplingAMRAttributeNew (MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair< std::string, int > > &fieldNames, mcIdType ghostLev)
 
static MEDCouplingAMRAttributeNew (MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair< std::string, std::vector< std::string > > > &fieldNames, mcIdType ghostLev)
 
- Static Public Member Functions inherited from MEDCoupling::BigMemoryObject
static std::size_t GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs)
 

Additional Inherited Members

- Protected Member Functions inherited from MEDCoupling::MEDCouplingDataForGodFather
void checkGodFatherFrozen () const
 
 MEDCouplingDataForGodFather (const MEDCouplingDataForGodFather &other, bool deepCpyGF)
 
 MEDCouplingDataForGodFather (MEDCouplingCartesianAMRMesh *gf)
 
- Protected Member Functions inherited from MEDCoupling::RefCountObject
 RefCountObject ()
 
 RefCountObject (const RefCountObject &other)
 
virtual ~RefCountObject ()
 
- Protected Member Functions inherited from MEDCoupling::RefCountObjectOnly
 RefCountObjectOnly ()
 
 RefCountObjectOnly (const RefCountObjectOnly &other)
 
virtual ~RefCountObjectOnly ()
 
- Protected Member Functions inherited from MEDCoupling::TimeLabel
void forceTimeOfThis (const TimeLabel &other) const
 
 TimeLabel ()
 
void updateTimeWith (const TimeLabel &other) const
 
virtual ~TimeLabel ()
 
- Protected Attributes inherited from MEDCoupling::MEDCouplingDataForGodFather
MCAuto< MEDCouplingCartesianAMRMesh_gf
 
TimeLabelConstOverseer _tlc
 

Member Function Documentation

◆ New() [1/2]

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::New ( MEDCouplingCartesianAMRMesh gf,
const std::vector< std::pair< std::string, int > > &  fieldNames,
mcIdType  ghostLev 
)
static

This method creates, attach to a main AMR mesh gf ( called god father :-) ) and returns a data linked to gf ready for the computation.

Referenced by MEDCoupling::MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML(), New(), and projectTo().

◆ New() [2/2]

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::New ( MEDCouplingCartesianAMRMesh gf,
const std::vector< std::pair< std::string, std::vector< std::string > > > &  fieldNames,
mcIdType  ghostLev 
)
static

References New().

◆ getClassName()

std::string MEDCoupling::MEDCouplingAMRAttribute::getClassName ( ) const
overridevirtual

◆ spillInfoOnComponents()

void MEDCouplingAMRAttribute::spillInfoOnComponents ( const std::vector< std::vector< std::string > > &  compNames)

Assign the info on components for all DataArrayDouble instance recursively stored in this. The first dim of input compNames is the field id in the same order than those implicitly specified in fieldNames parameter of MEDCouplingAMRAttribute::New. The second dim of compNames represent the component names component per component corresponding to the field. The size of this 2nd dimension has to perfectly fit with those specified in MEDCouplingAMRAttribute::New.

References MEDCoupling::MEDCouplingDataForGodFather::_tlc, and MEDCoupling::TimeLabelConstOverseer::checkConst().

◆ spillNatures()

void MEDCouplingAMRAttribute::spillNatures ( const std::vector< NatureOfField > &  nfs)

Assign nature for each fields in this.

Parameters
[in]nfsvector of field natures.

References MEDCoupling::MEDCouplingDataForGodFather::_tlc, and MEDCoupling::TimeLabelConstOverseer::checkConst().

◆ deepCopy()

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::deepCopy ( ) const

◆ deepCpyWithoutGodFather()

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::deepCpyWithoutGodFather ( ) const

◆ getNumberOfLevels()

mcIdType MEDCouplingAMRAttribute::getNumberOfLevels ( ) const

◆ retrieveFieldsOn()

std::vector< DataArrayDouble * > MEDCouplingAMRAttribute::retrieveFieldsOn ( MEDCouplingCartesianAMRMeshGen mesh) const

This method returns all DataArrayDouble instances lying on the specified mesh mesh. If mesh is not part of the progeny of god father object given at construction of this an exception will be thrown.

Returns
std::vector<DataArrayDouble *> - DataArrayDouble instances to be deallocated by the caller (using decrRef).
See also
retrieveFieldOn

◆ getFieldOn() [1/2]

const DataArrayDouble * MEDCouplingAMRAttribute::getFieldOn ( MEDCouplingCartesianAMRMeshGen mesh,
const std::string &  fieldName 
) const

◆ getFieldOn() [2/2]

DataArrayDouble * MEDCouplingAMRAttribute::getFieldOn ( MEDCouplingCartesianAMRMeshGen mesh,
const std::string &  fieldName 
)

◆ buildCellFieldOnRecurseWithoutOverlapWithoutGhost()

MEDCouplingFieldDouble * MEDCouplingAMRAttribute::buildCellFieldOnRecurseWithoutOverlapWithoutGhost ( MEDCouplingCartesianAMRMeshGen mesh,
const std::string &  fieldName 
) const

This method returns a field on an unstructured mesh the most refined as possible without overlap. Ghost part are not visible here.

Returns
MEDCouplingFieldDouble * - a field on cells that the caller has to deal with (deallocate it).

References MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost().

◆ buildCellFieldOnWithGhost()

MEDCouplingFieldDouble * MEDCouplingAMRAttribute::buildCellFieldOnWithGhost ( MEDCouplingCartesianAMRMeshGen mesh,
const std::string &  fieldName 
) const

This method builds a newly created field on cell just lying on mesh mesh without its eventual refinement. The output field also displays ghost cells.

Returns
MEDCouplingFieldDouble * - a field on cells that the caller has to deal with (deallocate it).
See also
buildCellFieldOnWithoutGhost

References MEDCoupling::MEDCouplingIMesh::buildWithGhost(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::getImageMesh(), MEDCoupling::DataArray::getName(), MEDCoupling::MEDCouplingFieldDouble::New(), and MEDCoupling::ON_CELLS.

◆ buildCellFieldOnWithoutGhost()

◆ writeVTHB()

◆ projectTo()

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::projectTo ( MEDCouplingCartesianAMRMesh targetGF) const

This method is useful just after a remesh after a time step computation to project values in this to the new mesh targetGF.

This method performs a projection from this to a target AMR mesh targetGF. This method performs the projection by trying to transfer the finest information to targetGF. WARNING this method does not update the ghost zone, if any. The level0 of this god father must have the same structure than those of targetGF.

This method makes checks that ghost size of this and targetGF are the same, and that the number of levels in this and in targetGF are also the same.

References MEDCoupling::MEDCouplingStructuredMesh::getCellGridStructure(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::getImageMesh(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::getMaxNumberOfLevelsRelativeToThis(), MEDCoupling::MEDCouplingDataForGodFather::getMyGodFather(), getNumberOfLevels(), and New().

◆ synchronizeFineToCoarse()

void MEDCouplingAMRAttribute::synchronizeFineToCoarse ( )
virtual

This method synchronizes from fine to coarse direction arrays. This method makes the hypothesis that this has been allocated before using MEDCouplingAMRAttribute::alloc method. This method DOES NOT UPDATE the ghost zones (neither the fine not the coarse)

See also
synchronizeFineToCoarseBetween

Implements MEDCoupling::MEDCouplingDataForGodFather.

◆ synchronizeFineToCoarseBetween()

void MEDCouplingAMRAttribute::synchronizeFineToCoarseBetween ( mcIdType  fromLev,
mcIdType  toLev 
)
virtual

This method allows to synchronizes fields on fine patches on level fromLev to coarser patches at toLev level. This method operates step by step performing the synchronization the fromLev to fromLev - 1, then fromLev -1 to fromLev - 2 ... until reaching toLev level. This method DOES NOT UPDATE the ghost zones (neither the fine not the coarse).

Parameters
[in]fromLev- an existing level considered as fine so bigger than toLev
[in]toLev- an existing level considered as the target level to reach.

Implements MEDCoupling::MEDCouplingDataForGodFather.

References getNumberOfLevels().

◆ synchronizeCoarseToFine()

void MEDCouplingAMRAttribute::synchronizeCoarseToFine ( )
virtual

This method synchronizes from coarse to fine arrays and fine to fine each other (if _ghost_lev is >0). This method makes the hypothesis that this has been allocated before using MEDCouplingAMRAttribute::alloc method. This method DOES UPDATE the ghost zone (contrary to synchronizeFineToCoarse method)

Implements MEDCoupling::MEDCouplingDataForGodFather.

◆ synchronizeCoarseToFineBetween()

void MEDCouplingAMRAttribute::synchronizeCoarseToFineBetween ( mcIdType  fromLev,
mcIdType  toLev 
)
virtual

This method allows to synchronizes fields on coarse patches on level fromLev to their respective refined patches at toLev level. This method operates step by step performing the synchronization the fromLev to fromLev + 1, then fromLev + 1 to fromLev + 2 ... until reaching toLev level. This method DOES UPDATE the ghost zone (contrary to synchronizeFineToCoarseBetween method)

Parameters
[in]fromLev- an existing level considered as coarse so lower than toLev
[in]toLev- an existing level considered as the target level to reach.

Implements MEDCoupling::MEDCouplingDataForGodFather.

References getNumberOfLevels().

◆ synchronizeAllGhostZones()

void MEDCouplingAMRAttribute::synchronizeAllGhostZones ( )
virtual

This method synchronizes the ghost zone of all patches (excepted the god father one). This method operates in 4 steps. Larger is the number of steps more accurate is the information in the ghost zone.

  • firstly coarse to fine with no interactions between brother patches.
  • secondly connected brother patches in a same master patch are updated.
  • thirdly connected nephew patches are updated each other.
  • forthly nth generation cousin patches are updated each other.

This method makes the hypothesis that this has been allocated before using MEDCouplingAMRAttribute::alloc method. So if _ghost_lev == 0 this method has no effect.

Implements MEDCoupling::MEDCouplingDataForGodFather.

References getNumberOfLevels().

◆ synchronizeAllGhostZonesOfDirectChidrenOf()

void MEDCouplingAMRAttribute::synchronizeAllGhostZonesOfDirectChidrenOf ( const MEDCouplingCartesianAMRMeshGen mesh)
virtual

This method works ONLY ON DIRECT SONS OF mesh. So only a part of patches at a given level is updated here. The ghost zone of all of these sons of mesh are updated using the brother patches (the patches sharing the SAME mesh). It is sometimes possible that a ghost zone of some sons of mesh are covered by a patch of same level but different father. For such cases, the ghost zones are NOT updated. If you need a more thorough (but more costly) ghost zone update use synchronizeAllGhostZonesAtASpecifiedLevel method instead.

Parameters
[in]mesh- an element in the progeny of god father in this, which the ghost zone of its sons will be updated each other.

Implements MEDCoupling::MEDCouplingDataForGodFather.

References MEDCoupling::MEDCouplingDataForGodFather::_gf, MEDCoupling::MEDCouplingCartesianAMRMeshGen::getAbsoluteLevelRelativeTo(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::getFather(), and getNumberOfLevels().

◆ synchronizeAllGhostZonesAtASpecifiedLevel()

void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevel ( mcIdType  level)
virtual

This method updates all the patches at level level each other without consideration of their father. So this method is more time consuming than synchronizeAllGhostZonesOfDirectChidrenOf.

Implements MEDCoupling::MEDCouplingDataForGodFather.

References getNumberOfLevels().

◆ synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather()

void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather ( mcIdType  level)
virtual

This method updates ghost zones of patches at level level whatever their father using father patches ONLY (at level level - 1). This method is useful to propagate to the ghost zone of childhood the modification.

Implements MEDCoupling::MEDCouplingDataForGodFather.

References getNumberOfLevels().

◆ alloc()

void MEDCouplingAMRAttribute::alloc ( )
virtual

This method allocates all DataArrayDouble instances stored recursively in this.

See also
dealloc

Implements MEDCoupling::MEDCouplingDataForGodFather.

References MEDCoupling::MEDCouplingDataForGodFather::_tlc, and MEDCoupling::TimeLabelConstOverseer::resetState().

◆ dealloc()

void MEDCouplingAMRAttribute::dealloc ( )
virtual

This method deallocates all DataArrayDouble instances stored recursively in this.

See also
alloc

Implements MEDCoupling::MEDCouplingDataForGodFather.

References MEDCoupling::MEDCouplingDataForGodFather::_tlc, and MEDCoupling::TimeLabelConstOverseer::checkConst().

◆ changeGodFather()

bool MEDCouplingAMRAttribute::changeGodFather ( MEDCouplingCartesianAMRMesh gf)
virtual

◆ getHeapMemorySizeWithoutChildren()

std::size_t MEDCouplingAMRAttribute::getHeapMemorySizeWithoutChildren ( ) const
virtual

◆ getDirectChildrenWithNull()

std::vector< const BigMemoryObject * > MEDCouplingAMRAttribute::getDirectChildrenWithNull ( ) const
virtual

◆ updateTime()

void MEDCouplingAMRAttribute::updateTime ( ) const
virtual

This method should be called on high level classes as Field or Mesh to take into account modifications done in aggregates objects.

Implements MEDCoupling::TimeLabel.