Public Member Functions | |
void | addPatch (const std::vector< std::pair< int, int > > &bottomLeftTopRight, const std::vector< int > &factors) |
MEDCouplingFieldDouble * | buildCellFieldOnRecurseWithoutOverlapWithoutGhost (int ghostSz, const std::vector< const DataArrayDouble * > &recurseArrs) const |
MEDCoupling1SGTUMesh * | buildMeshFromPatchEnvelop () const |
MEDCoupling1SGTUMesh * | buildMeshOfDirectChildrenOnly () const |
std::string | buildPythonDumpOfThis () const |
MEDCouplingUMesh * | buildUnstructured () const |
DataArrayDouble * | createCellFieldOnPatch (int patchId, const DataArrayDouble *cellFieldOnThis) const |
void | createPatchesFromCriterion (const INTERP_KERNEL::BoxSplittingOptions &bso, const std::vector< bool > &criterion, const std::vector< int > &factors) |
void | createPatchesFromCriterion (const INTERP_KERNEL::BoxSplittingOptions &bso, const DataArrayByte *criterion, const std::vector< int > &factors) |
void | createPatchesFromCriterion (const INTERP_KERNEL::BoxSplittingOptions &bso, const DataArrayDouble *criterion, const std::vector< int > &factors, double eps) |
virtual MEDCouplingCartesianAMRMeshGen * | deepCopy (MEDCouplingCartesianAMRMeshGen *father) const =0 |
virtual void | detachFromFather ()=0 |
DataArrayDouble * | extractGhostFrom (int ghostSz, const DataArrayDouble *arr) const |
void | fillCellFieldComingFromPatch (int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const |
void | fillCellFieldComingFromPatchGhost (int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, int ghostLev, bool isConservative=true) const |
void | fillCellFieldOnPatch (int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const |
void | fillCellFieldOnPatchGhost (int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev, bool isConservative=true) const |
void | fillCellFieldOnPatchGhostAdv (int patchId, const DataArrayDouble *cellFieldOnThis, int ghostLev, const std::vector< const DataArrayDouble * > &arrsOnPatches, bool isConservative=true) const |
void | fillCellFieldOnPatchOnlyGhostAdv (int patchId, int ghostLev, const std::vector< const DataArrayDouble * > &arrsOnPatches) const |
void | fillCellFieldOnPatchOnlyOnGhostZone (int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev) const |
void | fillCellFieldOnPatchOnlyOnGhostZoneWith (int ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const |
DataArrayInt * | findPatchesInTheNeighborhoodOf (int patchId, int ghostLev) const |
virtual int | getAbsoluteLevel () const =0 |
virtual int | getAbsoluteLevelRelativeTo (const MEDCouplingCartesianAMRMeshGen *ref) const =0 |
const std::vector< int > & | getFactors () const |
virtual const MEDCouplingCartesianAMRMeshGen * | getFather () const =0 |
virtual const MEDCouplingCartesianAMRMeshGen * | getGodFather () const =0 |
const MEDCouplingIMesh * | getImageMesh () const |
int | getMaxNumberOfLevelsRelativeToThis () const |
const MEDCouplingCartesianAMRMeshGen * | getMeshAtPosition (const std::vector< int > &pos) const |
int | getNumberOfCellsAtCurrentLevel () const |
int | getNumberOfCellsAtCurrentLevelGhost (int ghostLev) const |
int | getNumberOfCellsRecursiveWithoutOverlap () const |
int | getNumberOfCellsRecursiveWithOverlap () const |
int | getNumberOfPatches () const |
const MEDCouplingCartesianAMRPatch * | getPatch (int patchId) const |
const MEDCouplingCartesianAMRPatch * | getPatchAtPosition (const std::vector< int > &pos) const |
std::vector< const MEDCouplingCartesianAMRPatch * > | getPatches () const |
int | getPatchIdFromChildMesh (const MEDCouplingCartesianAMRMeshGen *mesh) const |
std::vector< int > | getPatchIdsInTheNeighborhoodOf (int patchId, int ghostLev) const |
std::vector< int > | getPositionRelativeTo (const MEDCouplingCartesianAMRMeshGen *ref) const |
virtual void | getPositionRelativeToInternal (const MEDCouplingCartesianAMRMeshGen *ref, std::vector< int > &ret) const =0 |
int | getSpaceDimension () const |
bool | isPatchInNeighborhoodOf (int patchId1, int patchId2, int ghostLev) const |
virtual std::vector< std::pair < int, int > > | positionRelativeToGodFather (std::vector< int > &st) const =0 |
void | removeAllPatches () |
void | removePatch (int patchId) |
virtual std::vector < MEDCouplingCartesianAMRPatchGen * > | retrieveGridsAt (int absoluteLev) const |
void | setFactors (const std::vector< int > &newFactors) |
Public Member Functions inherited from MEDCoupling::TimeLabel | |
void | declareAsNew () const |
std::size_t | getTimeOfThis () const |
TimeLabel & | operator= (const TimeLabel &other) |
Protected Member Functions | |
void | checkFactorsAndIfNotSetAssign (const std::vector< int > &factors) |
void | checkPatchId (int patchId) const |
void | dumpPatchesOf (const std::string &varName, std::ostream &oss) const |
std::vector< const DataArrayDouble * > | extractSubTreeFromGlobalFlatten (const MEDCouplingCartesianAMRMeshGen *head, const std::vector< const DataArrayDouble * > &all) const |
std::vector< const BigMemoryObject * > | getDirectChildrenWithNull () const |
std::size_t | getHeapMemorySizeWithoutChildren () const |
MEDCouplingCartesianAMRMeshGen (const MEDCouplingCartesianAMRMeshGen &other) | |
MEDCouplingCartesianAMRMeshGen (const std::string &meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop, const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop) | |
MEDCouplingCartesianAMRMeshGen (MEDCouplingIMesh *mesh) | |
void | retrieveGridsAtInternal (int lev, std::vector< MCAuto< MEDCouplingCartesianAMRPatchGen > > &grids) const |
void | updateTime () const |
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 () |
Static Protected Member Functions | |
static int | GetGhostLevelInFineRef (int ghostLev, const std::vector< int > &factors) |
Protected Attributes | |
std::vector< int > | _factors |
MCAuto< MEDCouplingIMesh > | _mesh |
std::vector< MCAuto < MEDCouplingCartesianAMRPatch > > | _patches |
Additional Inherited Members | |
Static Public Member Functions inherited from MEDCoupling::BigMemoryObject | |
static std::size_t | GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs) |
This class is the base class dedicated to AMR using Adaptative Hierarchical Overlapped image Grid. This class does NOT inherit from MEDCouplingMesh because this class overlaps image grid structured meshes to perform adaptative mesh refinement. But this class aggregates MEDCouplingMesh instances !
|
protected |
References _mesh, _patches, and MEDCoupling::MEDCouplingIMesh::deepCopy().
Referenced by getHeapMemorySizeWithoutChildren().
|
protected |
References _mesh, and MEDCoupling::MEDCouplingIMesh::New().
|
protected |
References _mesh, and MEDCoupling::MEDCouplingIMesh::checkConsistencyLight().
|
pure virtual |
Implemented in MEDCoupling::MEDCouplingCartesianAMRMesh.
int MEDCouplingCartesianAMRMeshGen::getSpaceDimension | ( | ) | const |
References _mesh.
Referenced by buildPythonDumpOfThis(), checkFactorsAndIfNotSetAssign(), and setFactors().
const std::vector<int>& MEDCoupling::MEDCouplingCartesianAMRMeshGen::getFactors | ( | ) | const |
References _factors.
Referenced by createCellFieldOnPatch(), fillCellFieldComingFromPatch(), fillCellFieldComingFromPatchGhost(), fillCellFieldOnPatch(), fillCellFieldOnPatchGhost(), fillCellFieldOnPatchOnlyOnGhostZone(), and MEDCoupling::MEDCouplingCartesianAMRMeshSub::positionRelativeToGodFather().
void MEDCouplingCartesianAMRMeshGen::setFactors | ( | const std::vector< int > & | newFactors | ) |
References _factors, _patches, MEDCoupling::TimeLabel::declareAsNew(), and getSpaceDimension().
int MEDCouplingCartesianAMRMeshGen::getMaxNumberOfLevelsRelativeToThis | ( | ) | const |
References _patches.
Referenced by extractSubTreeFromGlobalFlatten(), MEDCoupling::MEDCouplingAMRAttribute::projectTo(), and MEDCoupling::MEDCouplingAMRAttribute::writeVTHB().
int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevel | ( | ) | const |
This method returns the number of cells of this with the help of the MEDCouplingIMesh instance representing this. The patches in this are ignored here.
References _mesh.
Referenced by createPatchesFromCriterion().
int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevelGhost | ( | int | ghostLev | ) | const |
This method returns the number of cells of this with the help of the MEDCouplingIMesh instance representing this enlarged by ghostLev size to take into account of the ghost cells for future computation. The patches in this are ignored here.
References _mesh.
int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithOverlap | ( | ) | const |
int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithoutOverlap | ( | ) | const |
This method returns the max number of cells covering all the space without overlapping. It returns the number of cells of the mesh with the highest resolution. The returned value is equal to the number of cells of mesh returned by buildUnstructured.
const MEDCouplingIMesh* MEDCoupling::MEDCouplingCartesianAMRMeshGen::getImageMesh | ( | ) | const |
|
pure virtual |
|
pure virtual |
Implemented in MEDCoupling::MEDCouplingCartesianAMRMesh, and MEDCoupling::MEDCouplingCartesianAMRMeshSub.
Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshSub::getGodFather(), and retrieveGridsAt().
|
pure virtual |
Implemented in MEDCoupling::MEDCouplingCartesianAMRMesh, and MEDCoupling::MEDCouplingCartesianAMRMeshSub.
Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshSub::getAbsoluteLevel().
|
pure virtual |
Implemented in MEDCoupling::MEDCouplingCartesianAMRMesh, and MEDCoupling::MEDCouplingCartesianAMRMeshSub.
|
pure virtual |
Implemented in MEDCoupling::MEDCouplingCartesianAMRMesh, and MEDCoupling::MEDCouplingCartesianAMRMeshSub.
|
pure virtual |
std::vector< int > MEDCouplingCartesianAMRMeshGen::getPositionRelativeTo | ( | const MEDCouplingCartesianAMRMeshGen * | ref | ) | const |
This method returns a vector of size equal to getAbsoluteLevelRelativeTo. It allows to find position an absolute position of this relative to ref (that is typically the god father).
References getPositionRelativeToInternal().
const MEDCouplingCartesianAMRPatch * MEDCouplingCartesianAMRMeshGen::getPatchAtPosition | ( | const std::vector< int > & | pos | ) | const |
References getPatch().
const MEDCouplingCartesianAMRMeshGen * MEDCouplingCartesianAMRMeshGen::getMeshAtPosition | ( | const std::vector< int > & | pos | ) | const |
References getPatch().
|
virtual |
This method returns grids relative to god father to specified level absoluteLev.
Reimplemented in MEDCoupling::MEDCouplingCartesianAMRMesh.
References getGodFather(), and retrieveGridsAt().
Referenced by retrieveGridsAt().
void MEDCouplingCartesianAMRMeshGen::addPatch | ( | const std::vector< std::pair< int, int > > & | bottomLeftTopRight, |
const std::vector< int > & | factors | ||
) |
[in] | bottomLeftTopRight | a vector equal to the space dimension of mesh that specifies for each dimension, the included cell start of the range for the first element of the pair, a the end cell (excluded) of the range for the second element of the pair. |
[in] | factors | The factor of refinement per axis (different from 0). |
References _mesh, _patches, checkFactorsAndIfNotSetAssign(), MEDCoupling::TimeLabel::declareAsNew(), and MEDCoupling::MEDCouplingIMesh::refineWithFactor().
Referenced by createPatchesFromCriterion().
void MEDCouplingCartesianAMRMeshGen::removeAllPatches | ( | ) |
References _patches, and MEDCoupling::TimeLabel::declareAsNew().
void MEDCouplingCartesianAMRMeshGen::removePatch | ( | int | patchId | ) |
References _patches, checkPatchId(), and MEDCoupling::TimeLabel::declareAsNew().
int MEDCouplingCartesianAMRMeshGen::getNumberOfPatches | ( | ) | const |
References _patches.
Referenced by checkPatchId(), fillCellFieldOnPatchGhostAdv(), fillCellFieldOnPatchOnlyGhostAdv(), findPatchesInTheNeighborhoodOf(), and getPatchIdsInTheNeighborhoodOf().
void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion | ( | const INTERP_KERNEL::BoxSplittingOptions & | bso, |
const std::vector< bool > & | criterion, | ||
const std::vector< int > & | factors | ||
) |
This method is a generic algorithm to create patches in this (by destroying the patches if any). This method uses criterion array as a field on cells on this level. This method only create patches at level 0 relative to this.
This generic algorithm can be degenerated into three child ones, depending on the arguments given; in particular depending on whether they are equal to 0 or not. 1/ If minimumPatchLength = maximumPatchLength = maximumPatchVolume = 0, then we have the Berger-Rigoutsos algorithm. This algorithm was developed in 1991 and seems appropriate for sequential programming. 2/ If maximumPatchLength = 0, then we have the Livne algorithm. This algorithm was developed in 2004 and is an improvement of the Berger-Rigoutsos algorithm. 3/ If maximumPatchVolume = 0, the we have the lmin-lmax algorithm. This algorithm was developed by Arthur TALPAERT in 2014 and is an improvement of the Livne algorithm. It is especially appropriate for parallel computing, where one patch would be given to one CPU. See Arthur TALPAERT's 2014 CANUM poster for more information.
References _mesh, _patches, addPatch(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::MEDCouplingStructuredMesh::FindMinimalPartOf(), MEDCoupling::MEDCouplingStructuredMesh::FindTheWidestAxisOfGivenRangeInCompactFrmt(), and getNumberOfCellsAtCurrentLevel().
Referenced by createPatchesFromCriterion(), and MEDCoupling::MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML().
void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion | ( | const INTERP_KERNEL::BoxSplittingOptions & | bso, |
const DataArrayByte * | criterion, | ||
const std::vector< int > & | factors | ||
) |
This method creates patches in this (by destroying the patches if any). This method uses criterion array as a field on cells on this level. This method only create patches at level 0 relative to this.
References createPatchesFromCriterion(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and MEDCoupling::DataArrayByte::toVectorOfBool().
void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion | ( | const INTERP_KERNEL::BoxSplittingOptions & | bso, |
const DataArrayDouble * | criterion, | ||
const std::vector< int > & | factors, | ||
double | eps | ||
) |
int MEDCouplingCartesianAMRMeshGen::getPatchIdFromChildMesh | ( | const MEDCouplingCartesianAMRMeshGen * | mesh | ) | const |
References _patches.
Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshSub::positionRelativeToGodFather().
std::vector< const MEDCouplingCartesianAMRPatch * > MEDCouplingCartesianAMRMeshGen::getPatches | ( | ) | const |
References _patches.
const MEDCouplingCartesianAMRPatch * MEDCouplingCartesianAMRMeshGen::getPatch | ( | int | patchId | ) | const |
References _patches, and checkPatchId().
Referenced by createCellFieldOnPatch(), fillCellFieldComingFromPatch(), fillCellFieldComingFromPatchGhost(), fillCellFieldOnPatch(), fillCellFieldOnPatchGhost(), fillCellFieldOnPatchOnlyGhostAdv(), fillCellFieldOnPatchOnlyOnGhostZone(), getMeshAtPosition(), getPatchAtPosition(), isPatchInNeighborhoodOf(), and MEDCoupling::MEDCouplingCartesianAMRMeshSub::positionRelativeToGodFather().
bool MEDCouplingCartesianAMRMeshGen::isPatchInNeighborhoodOf | ( | int | patchId1, |
int | patchId2, | ||
int | ghostLev | ||
) | const |
This method states if patch2 (with id patchId2) is in the neighborhood of patch1 (with id patchId1). The neighborhood size is defined by ghostLev in the reference of this ( not in the reference of patches !).
References getPatch().
Referenced by findPatchesInTheNeighborhoodOf(), and getPatchIdsInTheNeighborhoodOf().
DataArrayDouble * MEDCouplingCartesianAMRMeshGen::createCellFieldOnPatch | ( | int | patchId, |
const DataArrayDouble * | cellFieldOnThis | ||
) | const |
This method creates a new cell field array on given patchId patch in this starting from a coarse cell field on this cellFieldOnThis. This method can be seen as a fast projection from the cell field cellFieldOnThis on this->getImageMesh()
to a refined part of this defined by the patch with id patchId.
[in] | patchId | - The id of the patch cellFieldOnThis has to be put on. |
[in] | cellFieldOnThis | - The array of the cell field on this->getImageMesh() to be projected to patch having id patchId. |
if | patchId is not in [ 0 , this->getNumberOfPatches() ) |
if | cellFieldOnThis is NULL or not allocated |
References _mesh, getFactors(), MEDCoupling::DataArray::getNumberOfComponents(), getPatch(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), MEDCoupling::DataArrayDouble::New(), and MEDCoupling::MEDCouplingIMesh::SpreadCoarseToFine().
void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatch | ( | int | patchId, |
const DataArrayDouble * | cellFieldOnThis, | ||
DataArrayDouble * | cellFieldOnPatch, | ||
bool | isConservative = true |
||
) | const |
This method is equivalent to MEDCouplingCartesianAMRMesh::createCellFieldOnPatch except that here instead of creating a new instance it fills the value into the cellFieldOnPatch data.
[in] | patchId | - The id of the patch cellFieldOnThis has to be put on. |
[in] | cellFieldOnThis | - The array of the cell field on this->getImageMesh() to be projected to patch having id patchId. |
[in,out] | cellFieldOnPatch | - The array of the cell field on the requested patch to be filled. |
References _mesh, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), MEDCoupling::DataArrayTemplate< T >::end(), getFactors(), getPatch(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and MEDCoupling::MEDCouplingIMesh::SpreadCoarseToFine().
void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhost | ( | int | patchId, |
const DataArrayDouble * | cellFieldOnThis, | ||
DataArrayDouble * | cellFieldOnPatch, | ||
int | ghostLev, | ||
bool | isConservative = true |
||
) | const |
This method is the generalization of fillCellFieldOnPatch method. This method only projects coarse to fine without considering the potential neighbor patches covered by the ghost cells of patch with id patchId.
[in] | patchId | - The id of the patch cellFieldOnThis has to be put on. |
[in] | cellFieldOnThis | - The array of the cell field on this->getImageMesh() to be projected to patch having id patchId. |
[in,out] | cellFieldOnPatch | - The array of the cell field on the requested patch to be filled. |
[in] | ghostLev | - The size of the ghost zone (must be >=0 !) |
References _mesh, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), MEDCoupling::DataArrayTemplate< T >::end(), getFactors(), getPatch(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and MEDCoupling::MEDCouplingIMesh::SpreadCoarseToFineGhost().
Referenced by fillCellFieldOnPatchGhostAdv().
void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZone | ( | int | patchId, |
const DataArrayDouble * | cellFieldOnThis, | ||
DataArrayDouble * | cellFieldOnPatch, | ||
int | ghostLev | ||
) | const |
This method is equivalent to fillCellFieldOnPatchGhost except that here ONLY the ghost zone will be updated in cellFieldOnPatch.
[in] | patchId | - The id of the patch cellFieldOnThis has to be put on. |
[in] | cellFieldOnThis | - The array of the cell field on this->getImageMesh() to be projected to patch having id patchId. |
[in,out] | cellFieldOnPatch | - The array of the cell field on the requested patch to be filled only in the ghost zone. |
[in] | ghostLev | - The size of the ghost zone (must be >=0 !) |
References _mesh, getFactors(), getPatch(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and MEDCoupling::MEDCouplingIMesh::SpreadCoarseToFineGhostZone().
void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhostAdv | ( | int | patchId, |
const DataArrayDouble * | cellFieldOnThis, | ||
int | ghostLev, | ||
const std::vector< const DataArrayDouble * > & | arrsOnPatches, | ||
bool | isConservative = true |
||
) | const |
This method is a refinement of fillCellFieldOnPatchGhost. fillCellFieldOnPatchGhost is first called. Then for all other patches than those pointed by patchId that overlap the ghost zone of the patch impact the ghost zone adequately.
[in] | patchId | - The id of the patch cellFieldOnThis has to be put on. |
[in] | cellFieldOnThis | - The array of the cell field on this->getImageMesh() to be projected to patch having id patchId. |
[in,out] | cellFieldOnPatch | - The array of the cell field on the requested patch to be filled. |
[in] | ghostLev | - The size of the ghost zone (must be >=0 !) |
[in] | arrsOnPatches | - WARNING arrsOnPatches[patchId] is NOT const. All others are const. |
References fillCellFieldOnPatchGhost(), fillCellFieldOnPatchOnlyGhostAdv(), and getNumberOfPatches().
void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyGhostAdv | ( | int | patchId, |
int | ghostLev, | ||
const std::vector< const DataArrayDouble * > & | arrsOnPatches | ||
) | const |
This method updates the patch with id patchId considering the only the all the patches in this to fill ghost zone. So warning, the DataArrayDouble instance arrsOnPatches[patchId] is non const.
References _factors, getNumberOfPatches(), getPatch(), and getPatchIdsInTheNeighborhoodOf().
Referenced by fillCellFieldOnPatchGhostAdv().
void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZoneWith | ( | int | ghostLev, |
const MEDCouplingCartesianAMRPatch * | patchToBeModified, | ||
const MEDCouplingCartesianAMRPatch * | neighborPatch, | ||
DataArrayDouble * | cellFieldOnPatch, | ||
const DataArrayDouble * | cellFieldNeighbor | ||
) | const |
References _factors.
void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatch | ( | int | patchId, |
const DataArrayDouble * | cellFieldOnPatch, | ||
DataArrayDouble * | cellFieldOnThis, | ||
bool | isConservative = true |
||
) | const |
This method updates cellFieldOnThis part of values coming from the cell field cellFieldOnPatch lying on patch having id patchId.
[in] | patchId | - The id of the patch cellFieldOnThis has to be put on. |
[in] | cellFieldOnPatch | - The array of the cell field on patch with id patchId. |
[in,out] | cellFieldOnThis | The array of the cell field on this to be updated only on the part concerning the patch with id patchId. |
[in] | isConservative | - true if the field needs to be conserved. false if maximum principle has to be applied. |
if | patchId is not in [ 0 , this->getNumberOfPatches() ) |
if | cellFieldOnPatch is NULL or not allocated |
References _mesh, MEDCoupling::MEDCouplingIMesh::CondenseFineToCoarse(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), getFactors(), getPatch(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and MEDCoupling::MEDCouplingStructuredMesh::MultiplyPartOf().
void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatchGhost | ( | int | patchId, |
const DataArrayDouble * | cellFieldOnPatch, | ||
DataArrayDouble * | cellFieldOnThis, | ||
int | ghostLev, | ||
bool | isConservative = true |
||
) | const |
This method is the extension of MEDCouplingCartesianAMRMesh::fillCellFieldComingFromPatch managing the ghost cells. If this method is called with ghostLev equal to 0 it behaves exactly as MEDCouplingCartesianAMRMesh::fillCellFieldComingFromPatch.
[in] | patchId | - The id of the patch cellFieldOnThis has to be put on. |
[in] | cellFieldOnPatch | - The array of the cell field on patch with id patchId. |
[in,out] | cellFieldOnThis | The array of the cell field on this to be updated only on the part concerning the patch with id patchId. |
[in] | ghostLev | The size of ghost zone (must be >= 0 !) |
[in] | isConservative | - true if the field needs to be conserved. false if maximum principle has to be applied. |
if | patchId is not in [ 0 , this->getNumberOfPatches() ) |
if | cellFieldOnPatch is NULL or not allocated |
References _mesh, MEDCoupling::MEDCouplingIMesh::CondenseFineToCoarseGhost(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), getFactors(), getPatch(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and MEDCoupling::MEDCouplingStructuredMesh::MultiplyPartOfByGhost().
DataArrayInt * MEDCouplingCartesianAMRMeshGen::findPatchesInTheNeighborhoodOf | ( | int | patchId, |
int | ghostLev | ||
) | const |
This method finds all patches (located by their ids) that are in the neighborhood of patch with id patchId. The neighborhood size is defined by ghostLev.
[in] | patchId | - the id of the considered patch. |
[in] | ghostLev | - the size of the neighborhood. |
References MEDCoupling::DataArrayTemplate< T >::alloc(), getNumberOfPatches(), isPatchInNeighborhoodOf(), MEDCoupling::DataArrayInt::New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().
MEDCouplingUMesh * MEDCouplingCartesianAMRMeshGen::buildUnstructured | ( | ) | const |
MEDCoupling1SGTUMesh * MEDCouplingCartesianAMRMeshGen::buildMeshFromPatchEnvelop | ( | ) | const |
This method returns a mesh containing as cells that there is patches at the current level. The patches are seen like 'boxes' that is too say the refinement will not appear here.
References _patches, and MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshes().
MEDCoupling1SGTUMesh * MEDCouplingCartesianAMRMeshGen::buildMeshOfDirectChildrenOnly | ( | ) | const |
References _patches, and MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshes().
MEDCouplingFieldDouble * MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost | ( | int | ghostSz, |
const std::vector< const DataArrayDouble * > & | recurseArrs | ||
) | const |
This method works same as buildUnstructured except that arrays are given in input to build a field on cell in output.
References _mesh, _patches, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayInt::BuildListOfSwitchedOff(), MEDCoupling::DataArrayTemplate< T >::end(), extractGhostFrom(), extractSubTreeFromGlobalFlatten(), MEDCoupling::DataArray::getName(), MEDCoupling::MEDCouplingFieldDouble::MergeFields(), MEDCoupling::MEDCouplingFieldDouble::New(), MEDCoupling::ON_CELLS, MEDCoupling::DataArrayDouble::selectByTupleIdSafe(), MEDCoupling::MEDCouplingFieldT< T >::setArray(), MEDCoupling::MEDCouplingField::setMesh(), MEDCoupling::MEDCouplingField::setName(), and MEDCoupling::MEDCouplingStructuredMesh::SwitchOnIdsFrom().
Referenced by MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnRecurseWithoutOverlapWithoutGhost().
DataArrayDouble * MEDCouplingCartesianAMRMeshGen::extractGhostFrom | ( | int | ghostSz, |
const DataArrayDouble * | arr | ||
) | const |
This method extracts from arr the part inside arr by cutting the ghostSz external part. is expected to be an array having a number of tuples equal to getImageMesh()->buildWithGhost(ghostSz)
.
References _mesh, MEDCoupling::MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(), MEDCoupling::MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(), MEDCoupling::MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(), and MEDCoupling::MCAuto< T >::retn().
Referenced by buildCellFieldOnRecurseWithoutOverlapWithoutGhost().
std::vector< int > MEDCouplingCartesianAMRMeshGen::getPatchIdsInTheNeighborhoodOf | ( | int | patchId, |
int | ghostLev | ||
) | const |
This method returns all the patches in this not equal to patchId that are in neighborhood of patch with id patchId.
References getNumberOfPatches(), and isPatchInNeighborhoodOf().
Referenced by fillCellFieldOnPatchOnlyGhostAdv().
std::string MEDCouplingCartesianAMRMeshGen::buildPythonDumpOfThis | ( | ) | const |
This method returns a dump python of this. It is useful for users of createPatchesFromCriterion method for debugging.
References dumpPatchesOf(), getImageMesh(), MEDCoupling::MEDCouplingMesh::getName(), and getSpaceDimension().
|
protected |
References getNumberOfPatches().
Referenced by getPatch(), and removePatch().
|
protected |
References _factors, and getSpaceDimension().
Referenced by addPatch().
|
protected |
References _patches.
Referenced by MEDCoupling::MEDCouplingCartesianAMRMesh::retrieveGridsAt().
|
staticprotected |
|
protected |
This method returns a sub set of all. The subset is defined by the head in the tree defined by this. Elements in all are expected to be sorted from god father to most refined structure.
References getMaxNumberOfLevelsRelativeToThis(), and MEDCoupling::BigMemoryObject::isObjectInTheProgeny().
Referenced by buildCellFieldOnRecurseWithoutOverlapWithoutGhost().
|
protected |
References _factors, and _patches.
Referenced by buildPythonDumpOfThis().
|
pure virtual |
Referenced by getPositionRelativeTo().
|
protectedvirtual |
Implements MEDCoupling::BigMemoryObject.
References MEDCouplingCartesianAMRMeshGen().
|
protectedvirtual |
Implements MEDCoupling::BigMemoryObject.
|
protectedvirtual |
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.
References _mesh, _patches, and MEDCoupling::TimeLabel::updateTimeWith().
|
protected |
Referenced by addPatch(), buildCellFieldOnRecurseWithoutOverlapWithoutGhost(), buildUnstructured(), createCellFieldOnPatch(), createPatchesFromCriterion(), extractGhostFrom(), fillCellFieldComingFromPatch(), fillCellFieldComingFromPatchGhost(), fillCellFieldOnPatch(), fillCellFieldOnPatchGhost(), fillCellFieldOnPatchOnlyOnGhostZone(), getDirectChildrenWithNull(), getImageMesh(), getNumberOfCellsAtCurrentLevel(), getNumberOfCellsAtCurrentLevelGhost(), getNumberOfCellsRecursiveWithoutOverlap(), getNumberOfCellsRecursiveWithOverlap(), getSpaceDimension(), MEDCouplingCartesianAMRMeshGen(), MEDCoupling::MEDCouplingCartesianAMRMesh::positionRelativeToGodFather(), and updateTime().
|
protected |
Referenced by addPatch(), buildCellFieldOnRecurseWithoutOverlapWithoutGhost(), buildMeshFromPatchEnvelop(), buildMeshOfDirectChildrenOnly(), buildUnstructured(), createPatchesFromCriterion(), dumpPatchesOf(), getDirectChildrenWithNull(), getMaxNumberOfLevelsRelativeToThis(), getNumberOfCellsRecursiveWithoutOverlap(), getNumberOfCellsRecursiveWithOverlap(), getNumberOfPatches(), getPatch(), getPatches(), getPatchIdFromChildMesh(), MEDCouplingCartesianAMRMeshGen(), removeAllPatches(), removePatch(), retrieveGridsAtInternal(), setFactors(), and updateTime().
|
protected |