Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
CellFamily.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* CellFamily.h (C) 2000-2024 */
9/* */
10/* Famille de mailles. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_CELLFAMILY_H
13#define ARCANE_MESH_CELLFAMILY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/IItemFamilyModifier.h"
18
19#include "arcane/mesh/ItemFamily.h"
20#include "arcane/mesh/ItemInternalConnectivityIndex.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane::mesh
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31class NodeFamily;
32class EdgeFamily;
33class FaceFamily;
34class CellFamily;
35class HParentCellCompactIncrementalItemConnectivity;
36class HChildCellCompactIncrementalItemConnectivity;
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
43class ARCANE_MESH_EXPORT CellFamily
44: public ItemFamily
46{
47 class TopologyModifier;
53 public:
54
55 CellFamily(IMesh* mesh,const String& name);
56 virtual ~CellFamily(); //<! Libère les ressources
57
58 public:
59
60 virtual void build() override;
61 virtual void preAllocate(Integer nb_item);
62
63 public:
64
65 // IItemFamilyModifier interface
66 Item allocOne(Int64 uid,ItemTypeId type_id, MeshInfos& mesh_info) override;
67 Item findOrAllocOne(Int64 uid,ItemTypeId type_id, MeshInfos& mesh_info, bool& is_alloc) override;
68 IItemFamily* family() override {return this;}
69
70 Cell allocOne(Int64 uid,ItemTypeId type);
71 Cell findOrAllocOne(Int64 uid,ItemTypeId type_id,bool& is_alloc);
72
78 void removeCell(Cell cell);
79
81 void removeCells(ConstArrayView<Int32> cells_local_id);
82
88 void detachCell(Cell cell);
89
96 void detachCells2(Int32ConstArrayView cell_local_ids);
97
103 void removeDetachedCell(Cell cell);
104
110 virtual void internalRemoveItems(Int32ConstArrayView local_ids,bool keep_ghost=false) override;
111
113
114 void setConnectivity(const Integer c);
115
116 public:
117
118 // TODO: rendre ces méthodes privées pour obliger à utiliser IItemFamilyTopologyModifier.
119 void replaceNode(ItemLocalId cell,Integer index,ItemLocalId node);
120 void replaceEdge(ItemLocalId cell,Integer index,ItemLocalId edge);
121 void replaceFace(ItemLocalId cell,Integer index,ItemLocalId face);
122 void replaceHChild(ItemLocalId cell,Integer index,ItemLocalId child_cell);
123 void replaceHParent(ItemLocalId cell,Integer index,ItemLocalId parent_cell);
124
125 public:
126
128 void _addParentCellToCell(Cell cell,Cell parent_cell);
129 void _addChildCellToCell(Cell parent_cell,Integer rank,Cell child_cell);
130 void _addChildCellToCell2(Cell parent_cell,Cell child_cell);
131 void _addChildrenCellsToCell(Cell parent_cell,Int32ConstArrayView children_cells_lid);
132 void _removeParentCellToCell(Cell cell);
133 void _removeChildCellToCell(Cell parent_cell,Cell cell);
134 void _removeChildrenCellsToCell(Cell parent_cell);
135
136 public:
137
138 virtual void computeSynchronizeInfos() override;
139
140 public:
141
142 ARCANE_DEPRECATED_REASON("Y2022: Use allocOne(Int64 uid,ItemTypeId type) instead")
143 ItemInternal* allocOne(Int64 uid,ItemTypeInfo* type);
144
145 ARCANE_DEPRECATED_REASON("Y2022: Use findOrAllocOne(Int64 uid,ItemTypeId type_id,bool& is_alloc) instead")
146 ItemInternal* findOrAllocOne(Int64 uid,ItemTypeInfo* type,bool& is_alloc);
147
148 protected:
149
150 private:
151
152 Integer m_node_prealloc;
153 Integer m_edge_prealloc;
154 Integer m_face_prealloc;
155 Integer m_mesh_connectivity;
156
157 NodeFamily* m_node_family;
158 EdgeFamily* m_edge_family;
159 FaceFamily* m_face_family;
160
161 NodeConnectivity* m_node_connectivity;
162 EdgeConnectivity* m_edge_connectivity;
163 FaceConnectivity* m_face_connectivity;
164 HParentConnectivity* m_hparent_connectivity;
165 HChildConnectivity* m_hchild_connectivity;
166
167 private:
168
170 void _removeSubItems(Cell cell);
171
172 void _removeNotConnectedSubItems(Cell cell);
173 inline void _createOne(ItemInternal* item,Int64 uid,ItemTypeInfo* type);
174 inline void _createOne(ItemInternal* item,Int64 uid,ItemTypeId type_id);
175};
176
177/*---------------------------------------------------------------------------*/
178/*---------------------------------------------------------------------------*/
179
180} // End namespace Arcane::mesh
181
182/*---------------------------------------------------------------------------*/
183/*---------------------------------------------------------------------------*/
184
185#endif
Maille d'un maillage.
Definition Item.h:1178
Interface de modification d'une famille.
Interface d'une famille d'entités.
Structure interne d'une entité de maillage.
Index d'un Item dans une variable.
Definition ItemLocalId.h:40
Type d'une entité (Item).
Definition ItemTypeId.h:32
Infos sur un type d'entité du maillage.
Classe de base d'un élément de maillage.
Definition Item.h:83
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Famille de mailles.
Definition CellFamily.h:46
Famille d'arêtes.
Definition EdgeFamily.h:35
Famille de faces.
Definition FaceFamily.h:53
Famille d'entités.
Definition ItemFamily.h:76
Classe factorisant des informations sur le maillage.
Definition MeshInfos.h:36
Famille de noeuds.
Definition NodeFamily.h:37
Vue constante d'un tableau de type T.
Chaîne de caractères unicode.