Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::CartesianPatchGroup Class Reference
Inheritance diagram for Arcane::CartesianPatchGroup:
Collaboration diagram for Arcane::CartesianPatchGroup:

Public Member Functions

 CartesianPatchGroup (ICartesianMesh *cmesh)
void build ()
void saveInfosInProperties ()
void recreateFromDump ()
Ref< CartesianMeshPatchgroundPatch ()
 Method to retrieve the level 0 patch.
void addPatch (ConstArrayView< Int32 > cells_local_id)
 Method to create a patch containing the given cells as a parameter.
void addPatch (const AMRZonePosition &zone_position)
 Method to create a patch from the zone passed as a parameter.
Integer nbPatch () const
Ref< CartesianMeshPatchpatch (Integer index) const
CartesianMeshPatchListView patchListView () const
CellGroup allCells (Integer index)
 Method to retrieve the group of all cells in the requested patch.
CellGroup inPatchCells (Integer index)
 Method to retrieve the group of cells in the requested patch.
CellGroup overlapCells (Integer index)
 Method to retrieve the group of overlap cells for the requested patch.
void clear ()
 Method to delete all patches. Note that the cells of the patches will not be deleted.
void removePatch (Integer index)
 Method to delete a patch.
void removeCellsInAllPatches (ConstArrayView< Int32 > cells_local_id)
 Method to delete cells from all patches.
void removeCellsInZone (const AMRZonePosition &zone_to_delete)
 Method to delete a zone of cells.
void applyPatchEdit (bool remove_empty_patches, bool update_higher_level)
 Method to delete patches pending deletion.
void updateLevelsAndAddGroundPatch ()
 Method to promote all patches by one level, update the ground level, and create the new level 1.
void mergePatches ()
void beginAdaptMesh (Int32 nb_levels, Int32 level_to_refine_first)
void endAdaptMesh ()
void adaptLevel (Int32 level_to_adapt, bool do_fatal_if_useless)
void clearRefineRelatedFlags () const
void rebuildAvailableGroupIndex (ConstArrayView< Integer > available_group_index)
ConstArrayView< Int32availableGroupIndex ()
void setOverlapLayerSizeTopLevel (Integer size_of_overlap_layer_top_level)
Int32 overlapLayerSize (Int32 level)
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const

Private Member Functions

Integer _addPatchAfterRestore (CellGroup cell_group)
void _addPatch (CellGroup cell_group, Integer group_index)
void _increaseOverlapSizeLevel (Int32 level_to_increate, Int32 new_size)
void _reduceOverlapSizeLevel (Int32 level_to_reduce, Int32 new_size)
void _updateHigherLevel ()
void _changeOverlapSizeLevel (Int32 level, Int32 previous_higher_level, Int32 new_higher_level)
void _coarsenUselessCells (bool use_cells_level)
void _coarsenUselessCellsInLevel (Int32 level)
void _updatePatchFlagsOfItemsLevel (Int32 level, bool use_cell_groups)
void _updatePatchFlagsOfItemsGroundLevel ()
void _removePatchFlagsOfItemsLevel (Int32 level)
void _checkPatchesAndMesh ()
void _removeCellsInAllPatches (const AMRPatchPosition &zone_to_delete)
Integer _nextIndexForNewPatch ()
void _addPatchInstance (Ref< CartesianMeshPatch > v)
void _removeOnePatch (Integer index)
void _removeMultiplePatches (ConstArrayView< Integer > indexes)
void _removeAllPatches ()
void _createGroundPatch ()
Integer _addCellGroup (CellGroup cell_group, CartesianMeshPatch *patch, bool add_flags)
void _updateCellGroups (Integer index, bool update_flags)
void _removePartOfPatch (Integer index_patch_to_edit, const AMRPatchPosition &patch_position)
void _addCutPatch (const AMRPatchPosition &new_patch_position, CellGroup parent_patch_cell_group)
Integer _addPatch (const AMRPatchPosition &new_patch_position)

Private Attributes

UniqueArray< CellGroupm_amr_patch_cell_groups_all
UniqueArray< CellGroupm_amr_patch_cell_groups_inpatch
UniqueArray< CellGroupm_amr_patch_cell_groups_overlap
UniqueArray< ICartesianMeshPatch * > m_amr_patches_pointer
UniqueArray< Ref< CartesianMeshPatch > > m_amr_patches
ICartesianMeshm_cmesh
UniqueArray< Integerm_patches_to_delete
Int32 m_index_new_patches
UniqueArray< Integerm_available_group_index
Integer m_size_of_overlap_layer_top_level
Int32 m_higher_level
Int32 m_target_nb_levels
Int32 m_latest_call_level
Ref< Propertiesm_properties

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Definition at line 42 of file CartesianPatchGroup.h.

Constructor & Destructor Documentation

◆ CartesianPatchGroup()

Arcane::CartesianPatchGroup::CartesianPatchGroup ( ICartesianMesh * cmesh)
explicit

Definition at line 44 of file CartesianPatchGroup.cc.

Member Function Documentation

◆ _addCellGroup()

Integer Arcane::CartesianPatchGroup::_addCellGroup ( CellGroup cell_group,
CartesianMeshPatch * patch,
bool add_flags )
private

Definition at line 2001 of file CartesianPatchGroup.cc.

◆ _addCutPatch()

void Arcane::CartesianPatchGroup::_addCutPatch ( const AMRPatchPosition & new_patch_position,
CellGroup parent_patch_cell_group )
private

Definition at line 2372 of file CartesianPatchGroup.cc.

◆ _addPatch() [1/2]

void Arcane::CartesianPatchGroup::_addPatch ( CellGroup cell_group,
Integer group_index )
private

Definition at line 246 of file CartesianPatchGroup.cc.

◆ _addPatch() [2/2]

Integer Arcane::CartesianPatchGroup::_addPatch ( const AMRPatchPosition & new_patch_position)
private

Definition at line 2412 of file CartesianPatchGroup.cc.

◆ _addPatchAfterRestore()

Integer Arcane::CartesianPatchGroup::_addPatchAfterRestore ( CellGroup cell_group)
private

Definition at line 226 of file CartesianPatchGroup.cc.

◆ _addPatchInstance()

void Arcane::CartesianPatchGroup::_addPatchInstance ( Ref< CartesianMeshPatch > v)
private

Definition at line 1904 of file CartesianPatchGroup.cc.

◆ _changeOverlapSizeLevel()

void Arcane::CartesianPatchGroup::_changeOverlapSizeLevel ( Int32 level,
Int32 previous_higher_level,
Int32 new_higher_level )
private

Definition at line 1391 of file CartesianPatchGroup.cc.

◆ _checkPatchesAndMesh()

void Arcane::CartesianPatchGroup::_checkPatchesAndMesh ( )
private

Definition at line 1614 of file CartesianPatchGroup.cc.

◆ _coarsenUselessCells()

void Arcane::CartesianPatchGroup::_coarsenUselessCells ( bool use_cells_level)
private

Definition at line 1415 of file CartesianPatchGroup.cc.

◆ _coarsenUselessCellsInLevel()

void Arcane::CartesianPatchGroup::_coarsenUselessCellsInLevel ( Int32 level)
private

Definition at line 1437 of file CartesianPatchGroup.cc.

◆ _createGroundPatch()

void Arcane::CartesianPatchGroup::_createGroundPatch ( )
private

Definition at line 1980 of file CartesianPatchGroup.cc.

◆ _increaseOverlapSizeLevel()

void Arcane::CartesianPatchGroup::_increaseOverlapSizeLevel ( Int32 level_to_increate,
Int32 new_size )
private

Definition at line 1184 of file CartesianPatchGroup.cc.

◆ _nextIndexForNewPatch()

Integer Arcane::CartesianPatchGroup::_nextIndexForNewPatch ( )
private

Definition at line 630 of file CartesianPatchGroup.cc.

◆ _reduceOverlapSizeLevel()

void Arcane::CartesianPatchGroup::_reduceOverlapSizeLevel ( Int32 level_to_reduce,
Int32 new_size )
private

Definition at line 1297 of file CartesianPatchGroup.cc.

◆ _removeAllPatches()

void Arcane::CartesianPatchGroup::_removeAllPatches ( )
private

Definition at line 1951 of file CartesianPatchGroup.cc.

◆ _removeCellsInAllPatches()

void Arcane::CartesianPatchGroup::_removeCellsInAllPatches ( const AMRPatchPosition & zone_to_delete)
private

Definition at line 473 of file CartesianPatchGroup.cc.

◆ _removeMultiplePatches()

void Arcane::CartesianPatchGroup::_removeMultiplePatches ( ConstArrayView< Integer > indexes)
private

Definition at line 1938 of file CartesianPatchGroup.cc.

◆ _removeOnePatch()

void Arcane::CartesianPatchGroup::_removeOnePatch ( Integer index)
private

Definition at line 1914 of file CartesianPatchGroup.cc.

◆ _removePartOfPatch()

void Arcane::CartesianPatchGroup::_removePartOfPatch ( Integer index_patch_to_edit,
const AMRPatchPosition & patch_position )
private

Definition at line 2140 of file CartesianPatchGroup.cc.

◆ _removePatchFlagsOfItemsLevel()

void Arcane::CartesianPatchGroup::_removePatchFlagsOfItemsLevel ( Int32 level)
private

Definition at line 1597 of file CartesianPatchGroup.cc.

◆ _updateCellGroups()

void Arcane::CartesianPatchGroup::_updateCellGroups ( Integer index,
bool update_flags )
private

Definition at line 2068 of file CartesianPatchGroup.cc.

◆ _updateHigherLevel()

void Arcane::CartesianPatchGroup::_updateHigherLevel ( )
private

Definition at line 1366 of file CartesianPatchGroup.cc.

◆ _updatePatchFlagsOfItemsGroundLevel()

void Arcane::CartesianPatchGroup::_updatePatchFlagsOfItemsGroundLevel ( )
private

Definition at line 1580 of file CartesianPatchGroup.cc.

◆ _updatePatchFlagsOfItemsLevel()

void Arcane::CartesianPatchGroup::_updatePatchFlagsOfItemsLevel ( Int32 level,
bool use_cell_groups )
private

Definition at line 1460 of file CartesianPatchGroup.cc.

◆ adaptLevel()

void Arcane::CartesianPatchGroup::adaptLevel ( Int32 level_to_adapt,
bool do_fatal_if_useless )

Definition at line 864 of file CartesianPatchGroup.cc.

◆ addPatch() [1/2]

void Arcane::CartesianPatchGroup::addPatch ( const AMRZonePosition & zone_position)

Method to create a patch from the zone passed as a parameter.

This method uses the same methods as mesh adaptation and can be used during calculation.

This method is only compatible with AMR type 3 (AMR PatchCartesianMeshOnly).

Definition at line 266 of file CartesianPatchGroup.cc.

References ARCANE_FATAL, Arcane::TraceAccessor::debug(), ENUMERATE_, Arcane::ItemFlags::II_Refine, Arcane::TraceAccessor::info(), Arcane::AMRPatchPosition::isInWithOverlap(), Arcane::AMRZonePosition::length(), Arcane::AMRPatchPosition::level(), Arcane::AMRPatchPosition::maxPoint(), Arcane::AMRPatchPosition::minPoint(), Arcane::AMRPatchPosition::overlapLayerSize(), Arcane::PatchCartesianMeshOnly, Arcane::AMRPatchPosition::patchUp(), Arcane::AMRZonePosition::position(), Arcane::AMRPatchPosition::setOverlapLayerSize(), Arcane::AMRZonePosition::toAMRPatchPosition(), and Arcane::TraceAccessor::traceMng().

Here is the call graph for this function:

◆ addPatch() [2/2]

void Arcane::CartesianPatchGroup::addPatch ( ConstArrayView< Int32 > cells_local_id)

Method to create a patch containing the given cells as a parameter.

This method is only compatible with AMR type 1 (historical).

Definition at line 208 of file CartesianPatchGroup.cc.

References ARCANE_FATAL, Arcane::IMeshBase::cellFamily(), Arcane::IItemFamily::createGroup(), Arcane::IItemFamily::mesh(), and Arcane::PatchCartesianMeshOnly.

Here is the call graph for this function:

◆ allCells()

CellGroup Arcane::CartesianPatchGroup::allCells ( Integer index)

Method to retrieve the group of all cells in the requested patch.

Parameters
indexIndex (array) of the patch.

Definition at line 393 of file CartesianPatchGroup.cc.

Referenced by removeCellsInAllPatches().

Here is the caller graph for this function:

◆ applyPatchEdit()

void Arcane::CartesianPatchGroup::applyPatchEdit ( bool remove_empty_patches,
bool update_higher_level )

Method to delete patches pending deletion.

Parameters
remove_empty_patches(AMR-Type=1 only) Deletion of empty patches.
update_higher_level(AMR-Type=3 only) After a deletion, the highest level may become empty. It is then necessary to set this parameter to true to update the overlap cell layers. Unnecessary cells will be deleted.

Definition at line 525 of file CartesianPatchGroup.cc.

References Arcane::PatchCartesianMeshOnly, Arcane::MessagePassing::ReduceMax, and Arcane::AbstractArray< T >::size().

Referenced by removeCellsInAllPatches(), and removeCellsInZone().

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

◆ availableGroupIndex()

ConstArrayView< Int32 > Arcane::CartesianPatchGroup::availableGroupIndex ( )

Definition at line 1835 of file CartesianPatchGroup.cc.

◆ beginAdaptMesh()

void Arcane::CartesianPatchGroup::beginAdaptMesh ( Int32 nb_levels,
Int32 level_to_refine_first )

Definition at line 749 of file CartesianPatchGroup.cc.

◆ build()

void Arcane::CartesianPatchGroup::build ( )

Definition at line 58 of file CartesianPatchGroup.cc.

◆ clear()

void Arcane::CartesianPatchGroup::clear ( )

Method to delete all patches. Note that the cells of the patches will not be deleted.

Definition at line 428 of file CartesianPatchGroup.cc.

◆ clearRefineRelatedFlags()

void Arcane::CartesianPatchGroup::clearRefineRelatedFlags ( ) const

Definition at line 1812 of file CartesianPatchGroup.cc.

◆ endAdaptMesh()

void Arcane::CartesianPatchGroup::endAdaptMesh ( )

Definition at line 801 of file CartesianPatchGroup.cc.

◆ groundPatch()

Ref< CartesianMeshPatch > Arcane::CartesianPatchGroup::groundPatch ( )

Method to retrieve the level 0 patch.

Created if it does not exist.

Definition at line 198 of file CartesianPatchGroup.cc.

◆ inPatchCells()

CellGroup Arcane::CartesianPatchGroup::inPatchCells ( Integer index)

Method to retrieve the group of cells in the requested patch.

Parameters
indexIndex (array) of the patch.

Definition at line 402 of file CartesianPatchGroup.cc.

References ARCANE_FATAL, and Arcane::PatchCartesianMeshOnly.

◆ mergePatches()

void Arcane::CartesianPatchGroup::mergePatches ( )

Definition at line 644 of file CartesianPatchGroup.cc.

◆ nbPatch()

Integer Arcane::CartesianPatchGroup::nbPatch ( ) const

Definition at line 366 of file CartesianPatchGroup.cc.

◆ overlapCells()

CellGroup Arcane::CartesianPatchGroup::overlapCells ( Integer index)

Method to retrieve the group of overlap cells for the requested patch.

Parameters
indexIndex (array) of the patch.

Definition at line 414 of file CartesianPatchGroup.cc.

References ARCANE_FATAL, and Arcane::PatchCartesianMeshOnly.

◆ overlapLayerSize()

Int32 Arcane::CartesianPatchGroup::overlapLayerSize ( Int32 level)

Definition at line 1884 of file CartesianPatchGroup.cc.

◆ patch()

Ref< CartesianMeshPatch > Arcane::CartesianPatchGroup::patch ( Integer index) const

Definition at line 375 of file CartesianPatchGroup.cc.

◆ patchListView()

CartesianMeshPatchListView Arcane::CartesianPatchGroup::patchListView ( ) const

Definition at line 384 of file CartesianPatchGroup.cc.

◆ rebuildAvailableGroupIndex()

void Arcane::CartesianPatchGroup::rebuildAvailableGroupIndex ( ConstArrayView< Integer > available_group_index)

Definition at line 1826 of file CartesianPatchGroup.cc.

◆ recreateFromDump()

void Arcane::CartesianPatchGroup::recreateFromDump ( )

Definition at line 124 of file CartesianPatchGroup.cc.

◆ removeCellsInAllPatches()

void Arcane::CartesianPatchGroup::removeCellsInAllPatches ( ConstArrayView< Int32 > cells_local_id)

Method to delete cells from all patches.

Empty patches will be deleted.

This method is only compatible with AMR type 1 (historical).

Definition at line 456 of file CartesianPatchGroup.cc.

References allCells(), applyPatchEdit(), ARCANE_FATAL, and Arcane::PatchCartesianMeshOnly.

Here is the call graph for this function:

◆ removeCellsInZone()

void Arcane::CartesianPatchGroup::removeCellsInZone ( const AMRZonePosition & zone_to_delete)

Method to delete a zone of cells.

This zone can be on multiple patches at once, but it must designate cells of the same level.

A reconstruction of the patches will be performed so that they remain consistent. Patches that become empty will be deleted.

Definition at line 498 of file CartesianPatchGroup.cc.

References applyPatchEdit(), ARCANE_FATAL, Arcane::AMRZonePosition::cellsInPatch(), Arcane::AMRPatchPosition::level(), and Arcane::PatchCartesianMeshOnly.

Here is the call graph for this function:

◆ removePatch()

void Arcane::CartesianPatchGroup::removePatch ( Integer index)

Method to delete a patch.

Note
This method is a two-step process. To trigger the deletion of the patch or patches, it is necessary to call the applyPatchEdit() method.
Parameters
indexIndex (array) of the patch.

Definition at line 437 of file CartesianPatchGroup.cc.

References ARCANE_FATAL.

◆ saveInfosInProperties()

void Arcane::CartesianPatchGroup::saveInfosInProperties ( )

Definition at line 67 of file CartesianPatchGroup.cc.

◆ setOverlapLayerSizeTopLevel()

void Arcane::CartesianPatchGroup::setOverlapLayerSizeTopLevel ( Integer size_of_overlap_layer_top_level)

Definition at line 1844 of file CartesianPatchGroup.cc.

◆ updateLevelsAndAddGroundPatch()

void Arcane::CartesianPatchGroup::updateLevelsAndAddGroundPatch ( )

Method to promote all patches by one level, update the ground level, and create the new level 1.

Must be called once the level 0 cells have been created.

Definition at line 564 of file CartesianPatchGroup.cc.

References Arcane::AMRPatchPosition::computeOverlapLayerSize(), Arcane::PatchCartesianMeshOnly, Arcane::AMRPatchPosition::setLevel(), Arcane::AMRPatchPosition::setMaxPoint(), and Arcane::AMRPatchPosition::setMinPoint().

Here is the call graph for this function:

Member Data Documentation

◆ m_amr_patch_cell_groups_all

UniqueArray<CellGroup> Arcane::CartesianPatchGroup::m_amr_patch_cell_groups_all
private

Definition at line 208 of file CartesianPatchGroup.h.

◆ m_amr_patch_cell_groups_inpatch

UniqueArray<CellGroup> Arcane::CartesianPatchGroup::m_amr_patch_cell_groups_inpatch
private

Definition at line 209 of file CartesianPatchGroup.h.

◆ m_amr_patch_cell_groups_overlap

UniqueArray<CellGroup> Arcane::CartesianPatchGroup::m_amr_patch_cell_groups_overlap
private

Definition at line 210 of file CartesianPatchGroup.h.

◆ m_amr_patches

UniqueArray<Ref<CartesianMeshPatch> > Arcane::CartesianPatchGroup::m_amr_patches
private

Definition at line 212 of file CartesianPatchGroup.h.

◆ m_amr_patches_pointer

UniqueArray<ICartesianMeshPatch*> Arcane::CartesianPatchGroup::m_amr_patches_pointer
private

Definition at line 211 of file CartesianPatchGroup.h.

◆ m_available_group_index

UniqueArray<Integer> Arcane::CartesianPatchGroup::m_available_group_index
private

Definition at line 216 of file CartesianPatchGroup.h.

◆ m_cmesh

ICartesianMesh* Arcane::CartesianPatchGroup::m_cmesh
private

Definition at line 213 of file CartesianPatchGroup.h.

◆ m_higher_level

Int32 Arcane::CartesianPatchGroup::m_higher_level
private

Definition at line 218 of file CartesianPatchGroup.h.

◆ m_index_new_patches

Int32 Arcane::CartesianPatchGroup::m_index_new_patches
private

Definition at line 215 of file CartesianPatchGroup.h.

◆ m_latest_call_level

Int32 Arcane::CartesianPatchGroup::m_latest_call_level
private

Definition at line 220 of file CartesianPatchGroup.h.

◆ m_patches_to_delete

UniqueArray<Integer> Arcane::CartesianPatchGroup::m_patches_to_delete
private

Definition at line 214 of file CartesianPatchGroup.h.

◆ m_properties

Ref<Properties> Arcane::CartesianPatchGroup::m_properties
private

Definition at line 221 of file CartesianPatchGroup.h.

◆ m_size_of_overlap_layer_top_level

Integer Arcane::CartesianPatchGroup::m_size_of_overlap_layer_top_level
private

Definition at line 217 of file CartesianPatchGroup.h.

◆ m_target_nb_levels

Int32 Arcane::CartesianPatchGroup::m_target_nb_levels
private

Definition at line 219 of file CartesianPatchGroup.h.


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