12#ifndef ARCANE_CARTESIANMESH_CARTESIANPATCHGROUP_H
13#define ARCANE_CARTESIANMESH_CARTESIANPATCHGROUP_H
17#include "AMRPatchPositionLevelGroup.h"
18#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
20#include "arcane/core/ItemGroup.h"
22#include "arcane/utils/UniqueArray.h"
23#include "arcane/utils/Ref.h"
24#include "arcane/utils/TraceAccessor.h"
26#include "arcane/cartesianmesh/CartesianMeshPatchListView.h"
42class ARCANE_CARTESIANMESH_EXPORT CartesianPatchGroup
52 void saveInfosInProperties();
53 void recreateFromDump();
143 void applyPatchEdit(
bool remove_empty_patches,
bool update_higher_level);
154 void beginAdaptMesh(
Int32 nb_levels,
Int32 level_to_refine_first);
156 void adaptLevel(
Int32 level_to_adapt,
bool do_fatal_if_useless);
158 void clearRefineRelatedFlags()
const;
164 void setOverlapLayerSizeTopLevel(
Integer size_of_overlap_layer_top_level);
172 void _increaseOverlapSizeLevel(
Int32 level_to_increate,
Int32 new_size);
173 void _reduceOverlapSizeLevel(
Int32 level_to_reduce,
Int32 new_size);
175 void _updateHigherLevel();
177 void _changeOverlapSizeLevel(
Int32 level,
Int32 previous_higher_level,
Int32 new_higher_level);
179 void _coarsenUselessCells(
bool use_cells_level);
180 void _coarsenUselessCellsInLevel(
Int32 level);
182 void _updatePatchFlagsOfItemsLevel(
Int32 level,
bool use_cell_groups);
183 void _updatePatchFlagsOfItemsGroundLevel();
184 void _removePatchFlagsOfItemsLevel(
Int32 level);
186 void _checkPatchesAndMesh();
190 Integer _nextIndexForNewPatch();
194 void _removeOnePatch(
Integer index);
196 void _removeAllPatches();
197 void _createGroundPatch();
200 void _updateCellGroups(
Integer index,
bool update_flags);
215 Int32 m_index_new_patches;
217 Integer m_size_of_overlap_layer_top_level;
218 Int32 m_higher_level;
219 Int32 m_target_nb_levels;
220 Int32 m_latest_call_level;
Class allowing the definition of a patch position in the Cartesian mesh.
Class allowing the definition of a mesh zone.
View of a list of patches.
Information by direction for each type of mesh entity.
void updateLevelsAndAddGroundPatch()
Method to promote all patches by one level, update the ground level, and create the new level 1.
void addPatch(ConstArrayView< Int32 > cells_local_id)
Method to create a patch containing the given cells as a parameter.
CellGroup overlapCells(Integer index)
Method to retrieve the group of overlap cells for the requested patch.
CellGroup allCells(Integer index)
Method to retrieve the group of all cells in the requested patch.
void removeCellsInZone(const AMRZonePosition &zone_to_delete)
Method to delete a zone of cells.
void removePatch(Integer index)
Method to delete a patch.
void applyPatchEdit(bool remove_empty_patches, bool update_higher_level)
Method to delete patches pending deletion.
void clear()
Method to delete all patches. Note that the cells of the patches will not be deleted.
Ref< CartesianMeshPatch > groundPatch()
Method to retrieve the level 0 patch.
void removeCellsInAllPatches(ConstArrayView< Int32 > cells_local_id)
Method to delete cells from all patches.
CellGroup inPatchCells(Integer index)
Method to retrieve the group of cells in the requested patch.
Constant view of an array of type T.
Interface of a Cartesian mesh.
Reference to an instance.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
1D data vector with value semantics (STL style).
ItemGroupT< Cell > CellGroup
Group of cells.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
std::int32_t Int32
Signed integer type of 32 bits.