Arcane  v4.1.1.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
CartesianPatchGroup.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* CartesianPatchGroup.h (C) 2000-2025 */
9/* */
10/* Gestion du groupe de patchs du maillage cartésien. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CARTESIANMESH_CARTESIANPATCHGROUP_H
13#define ARCANE_CARTESIANMESH_CARTESIANPATCHGROUP_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
18
19#include "arcane/core/ItemGroup.h"
20
21#include "arcane/utils/UniqueArray.h"
22
23#include "arcane/cartesianmesh/CartesianMeshPatchListView.h"
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28namespace Arcane
29{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39class ARCANE_CARTESIANMESH_EXPORT CartesianPatchGroup
40{
41 public:
42
43 explicit CartesianPatchGroup(ICartesianMesh* cmesh);
44
45 public:
46
47 Ref<CartesianMeshPatch> groundPatch();
48
49 void addPatch(ConstArrayView<Int32> cells_local_id);
50 Integer addPatchAfterRestore(CellGroup cell_group);
51 void addPatch(CellGroup cell_group, Integer group_index);
52
53 Integer nbPatch() const;
54
55 Ref<CartesianMeshPatch> patch(Integer index) const;
56
57 CartesianMeshPatchListView patchListView() const;
58
59 CellGroup allCells(Integer index);
60 CellGroup inPatchCells(Integer index);
61 CellGroup overallCells(Integer index);
62
63 void clear();
64
65 void removePatch(Integer index);
66
67 void removeCellsInAllPatches(ConstArrayView<Int32> cells_local_id);
68
69 void removeCellsInAllPatches(const AMRPatchPosition& zone_to_delete);
70
71 void applyPatchEdit(bool remove_empty_patches);
72
73 void updateLevelsBeforeAddGroundPatch();
74
75 void mergePatches();
76
77 void refine(bool clear_refine_flag);
78
79 void clearRefineRelatedFlags() const;
80
81 void rebuildAvailableGroupIndex(ConstArrayView<Integer> available_group_index);
82
83 ConstArrayView<Int32> availableGroupIndex();
84
85 void setOverlapLayerSizeTopLevel(Integer size_of_overlap_layer_top_level);
86 Integer overlapLayerSize(Integer level);
87
88 private:
89
90 Integer _nextIndexForNewPatch();
91
92 void _addPatchInstance(Ref<CartesianMeshPatch> v);
93
94 void _removeOnePatch(Integer index);
95 void _removeMultiplePatches(ConstArrayView<Integer> indexes);
96 void _removeAllPatches();
97 void _createGroundPatch();
98
99 void _addCellGroup(CellGroup cell_group, CartesianMeshPatch* patch);
100
101 bool _isPatchInContact(const AMRPatchPosition& patch_position0, const AMRPatchPosition& patch_position1);
102 void _splitPatch(Integer index_patch, const AMRPatchPosition& patch_position);
103 void _addCutPatch(const AMRPatchPosition& new_patch_position, CellGroup parent_patch_cell_group);
104 void _addPatch(const AMRPatchPosition& new_patch_position);
105
106 private:
107
108 UniqueArray<CellGroup> m_amr_patch_cell_groups_all;
109 UniqueArray<CellGroup> m_amr_patch_cell_groups_inpatch;
110 UniqueArray<CellGroup> m_amr_patch_cell_groups_overall;
111 UniqueArray<ICartesianMeshPatch*> m_amr_patches_pointer;
113 ICartesianMesh* m_cmesh;
114 UniqueArray<Integer> m_patches_to_delete;
115 Int32 m_index_new_patches;
116 UniqueArray<Integer> m_available_group_index;
117 Integer m_size_of_overlap_layer_sub_top_level;
118 Integer m_higher_level;
119};
120
121/*---------------------------------------------------------------------------*/
122/*---------------------------------------------------------------------------*/
123
124} // End namespace Arcane
125
126/*---------------------------------------------------------------------------*/
127/*---------------------------------------------------------------------------*/
128
129#endif
Classe permettant de définir la position d'un patch dans le maillage cartésien.
Informations par direction pour chaque genre d'entité du maillage.
Vue constante d'un tableau de type T.
Interface d'un maillage cartésien.
Référence à une instance.
Vecteur 1D de données avec sémantique par valeur (style STL).
ItemGroupT< Cell > CellGroup
Groupe de mailles.
Definition ItemTypes.h:183
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.
std::int32_t Int32
Type entier signé sur 32 bits.