Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
const DataArrayDoublegetFieldOn (MEDCouplingCartesianAMRMeshGen *mesh, const std::string &fieldName) const
 
DataArrayDoublegetFieldOn (MEDCouplingCartesianAMRMeshGen *mesh, const std::string &fieldName)
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
int 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 (int level)
 
void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather (int level)
 
void synchronizeAllGhostZonesOfDirectChidrenOf (const MEDCouplingCartesianAMRMeshGen *mesh)
 
void synchronizeCoarseToFine ()
 
void synchronizeCoarseToFineBetween (int fromLev, int toLev)
 
void synchronizeFineToCoarse ()
 
void synchronizeFineToCoarseBetween (int fromLev, int 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::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 

Static Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from MEDCoupling::MEDCouplingDataForGodFather
void checkGodFatherFrozen () const
 
 MEDCouplingDataForGodFather (MEDCouplingCartesianAMRMesh *gf)
 
 MEDCouplingDataForGodFather (const MEDCouplingDataForGodFather &other, bool deepCpyGF)
 
- 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

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::New ( MEDCouplingCartesianAMRMesh gf,
const std::vector< std::pair< std::string, int > > &  fieldNames,
int  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().

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::New ( MEDCouplingCartesianAMRMesh gf,
const std::vector< std::pair< std::string, std::vector< std::string > > > &  fieldNames,
int  ghostLev 
)
static
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 implicitely 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().

Referenced by New().

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

Assign nature for each fields in this.

Parameters
[in]nfs

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

MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::deepCopy ( ) const
MEDCouplingAMRAttribute * MEDCouplingAMRAttribute::deepCpyWithoutGodFather ( ) const
int MEDCouplingAMRAttribute::getNumberOfLevels ( ) const
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
const DataArrayDouble * MEDCouplingAMRAttribute::getFieldOn ( MEDCouplingCartesianAMRMeshGen mesh,
const std::string &  fieldName 
) const
DataArrayDouble * MEDCouplingAMRAttribute::getFieldOn ( MEDCouplingCartesianAMRMeshGen mesh,
const std::string &  fieldName 
)
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().

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(), MEDCoupling::ON_CELLS, MEDCoupling::MCAuto< T >::retn(), and MEDCoupling::MEDCouplingMesh::setName().

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().

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.

void MEDCouplingAMRAttribute::synchronizeFineToCoarseBetween ( int  fromLev,
int  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().

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.

Referenced by MEDCoupling::MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML().

void MEDCouplingAMRAttribute::synchronizeCoarseToFineBetween ( int  fromLev,
int  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().

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().

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().

void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevel ( int  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().

void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather ( int  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().

void MEDCouplingAMRAttribute::alloc ( )
virtual
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().

bool MEDCouplingAMRAttribute::changeGodFather ( MEDCouplingCartesianAMRMesh gf)
virtual
std::size_t MEDCouplingAMRAttribute::getHeapMemorySizeWithoutChildren ( ) const
virtual
std::vector< const BigMemoryObject * > MEDCouplingAMRAttribute::getDirectChildrenWithNull ( ) const
virtual
void MEDCouplingAMRAttribute::updateTime ( ) const
virtual

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

Implements MEDCoupling::TimeLabel.