14#include "arcane/mesh/FullItemInfo.h"
16#include "arcane/ISerializer.h"
17#include "arcane/ItemInternal.h"
18#include "arcane/ItemInternalEnumerator.h"
20#include "arcane/mesh/DynamicMesh.h"
42, m_first_parent_node(0)
43, m_first_parent_edge(0)
44, m_first_parent_face(0)
45, m_first_parent_cell(0)
48, m_first_hParent_cell(0)
63print(std::ostream& o)
const
65 o <<
"Cell uid=" << uniqueId()
66 <<
" nb_node=" << nbNode()
67 <<
" nb_edge=" << nbEdge()
68 <<
" nb_face=" << nbFace()
70 for( Integer z=0,
zs=nbNode(); z<
zs; ++z )
71 o <<
" N" << z <<
"=" << nodeUniqueId(z);
72 for( Integer z=0,
zs=nbEdge(); z<
zs; ++z )
73 o <<
" E" << z <<
"=" << edgeUniqueId(z);
74 for( Integer z=0,
zs=nbFace(); z<
zs; ++z )
75 o <<
" F" << z <<
"=" << faceUniqueId(z);
109class SerializerDumpAdapter
112 SerializerDumpAdapter(
ISerializer* s) : m_serializer(s){}
115 m_serializer->putInt64(v);
118 ISerializer* m_serializer;
121class ArrayDumpAdapter
124 ArrayDumpAdapter(Array<Int64>& a) : m_array_ref(a){}
130 Array<Int64>& m_array_ref;
133template<
typename Adapter>
void
134_dumpCellInfo(Cell cell,Adapter buf, Integer parent_info,
135 bool has_edge,
bool has_amr,
bool with_flags)
137 buf.put(cell.type());
138 buf.put(cell.uniqueId().asInt64());
139 buf.put(cell.owner());
141 for( Item node : cell.nodes() ){
142 buf.put(node.uniqueId().asInt64());
143 buf.put(node.owner());
147 for( Edge edge : cell.edges() ){
148 buf.put(edge.uniqueId().asInt64());
149 buf.put(edge.owner());
152 for( Face face : cell.faces() ){
153 buf.put(face.uniqueId().asInt64());
154 buf.put(face.owner());
156 if (parent_info & FullCellInfo::PI_Node) {
157 for( Node node : cell.nodes() ){
158 Item parent = node.parent(0);
159 buf.put(parent.uniqueId().asInt64());
162 if (parent_info & FullCellInfo::PI_Edge) {
163 for( Edge edge : cell.edges() ){
164 Item parent = edge.parent(0);
165 buf.put(parent.uniqueId().asInt64());
166 buf.put(parent.type());
169 if (parent_info & FullCellInfo::PI_Face) {
170 for( Face face : cell.faces() ){
171 Item parent = face.parent(0);
172 buf.put(parent.uniqueId().asInt64());
173 buf.put(parent.type());
176 if (parent_info & FullCellInfo::PI_Cell) {
177 Item parent = cell.parent(0);
178 buf.put(parent.uniqueId().asInt64());
179 buf.put(parent.type());
183 buf.put(cell.level());
184 if(cell.level() == 0){
185 buf.put(NULL_ITEM_ID);
186 buf.put(NULL_ITEM_ID);
189 Cell hParent = cell.hParent();
190 buf.put(hParent.uniqueId().asInt64());
191 buf.put(hParent.whichChildAmI(cell));
195 buf.put(cell.itemBase().flags());
204dump(ItemInternal* icell,ISerializer* buf, Integer parent_info,
205 bool has_edge,
bool has_amr,
bool with_flags)
207 SerializerDumpAdapter adapter(buf);
208 _dumpCellInfo(icell,adapter,parent_info,has_edge,has_amr,with_flags);
212dump(Cell cell,Array<Int64>& buf, Integer parent_info,
213 bool has_edge,
bool has_amr,
bool with_flags)
215 ArrayDumpAdapter adapter(buf);
216 _dumpCellInfo(cell,adapter,parent_info,has_edge,has_amr,with_flags);
223parentInfo(IMesh * mesh)
226 if (mesh->cellFamily()->parentFamily())
228 if (mesh->faceFamily()->parentFamily())
230 if (mesh->edgeFamily()->parentFamily())
232 if (mesh->nodeFamily()->parentFamily())
249 m_first_edge = 3 + m_nb_node*2;
250 m_first_face = m_first_edge + m_nb_edge*2;
251 m_first_parent_node = m_first_face + m_nb_face*2;
252 m_first_parent_edge = m_first_parent_node;
253 if (m_parent_info & PI_Node)
254 m_first_parent_edge += m_nb_node;
255 m_first_parent_face = m_first_parent_edge;
256 if (m_parent_info & PI_Edge)
257 m_first_parent_face += m_nb_edge*2;
258 m_first_parent_cell = m_first_parent_face;
259 if (m_parent_info & PI_Face)
260 m_first_parent_cell += m_nb_face*2;
261 m_memory_used = m_first_parent_cell;
262 if (m_parent_info & PI_Cell)
Infos sur un type d'entité du maillage.
Integer nbLocalEdge() const
Nombre d'arêtes de l'entité
Integer nbLocalNode() const
Nombre de noeuds de l'entité
Integer nbLocalFace() const
Nombre de faces de l'entité
Gestionnaire des types d'entités de maillage.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
FullCellInfo(Int64ConstArrayView cells_infos, Integer cell_index, ItemTypeMng *itm, Integer parent_info, bool has_edge, bool has_amr, bool with_flags=false)
Référence les infos d'une maille.
Integer m_first_hParent_cell
AMR.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Vue constante d'un tableau de type T.
Interface d'un sérialiseur.
ConstArrayView< Int64 > Int64ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
Int32 Integer
Type représentant un entier.