14#include "arcane/core/UnstructuredMeshAllocateBuildInfo.h"
15#include "arcane/core/internal/UnstructuredMeshAllocateBuildInfoInternal.h"
17#include "arcane/utils/Array.h"
18#include "arcane/utils/ITraceMng.h"
19#include "arcane/utils/FatalErrorException.h"
21#include "arcane/core/IPrimaryMesh.h"
22#include "arcane/core/ItemTypeId.h"
23#include "arcane/core/IMeshInitialAllocator.h"
41 m_internal.m_p =
this;
46 m_cells_infos.add(type_id);
47 m_cells_infos.add(cell_uid);
48 m_cells_infos.addRange(nodes_uid);
55 Int32 m_mesh_dimension = -1;
58 UnstructuredMeshAllocateBuildInfoInternal m_internal;
70 return m_p->m_cells_infos;
76Int32 UnstructuredMeshAllocateBuildInfoInternal::
79 return m_p->m_mesh_dimension;
85Int32 UnstructuredMeshAllocateBuildInfoInternal::
88 return m_p->m_nb_cell;
97UnstructuredMeshAllocateBuildInfo::
106UnstructuredMeshAllocateBuildInfo::
107~UnstructuredMeshAllocateBuildInfo()
118 m_p->m_mesh_dimension = v;
127 m_p->addCell(type_id, cell_uid, nodes_uid);
140 ARCANE_FATAL(
"Mesh implementation has no IMeshInitialAllocator");
143 if (!specific_allocator)
144 ARCANE_FATAL(
"Mesh does not support 'IUnstructuredMeshInitialAllocator'");
146 pm->
traceMng()->
info() <<
"Allocate mesh from UnstructuredMeshAllocateBuildInfo";
147 specific_allocator->allocate(*
this);
156 m_p->m_cells_infos.reserve((nb_cell * 2) + nb_connectivity_node);
165 return &m_p->m_internal;
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Vue constante d'un tableau de type T.
virtual ITraceMng * traceMng()=0
Gestionnaire de message associé
Interface d'allocation des entités du maillage.
virtual IUnstructuredMeshInitialAllocator * unstructuredMeshAllocator()
Allocateur pour les maillages non structurés.
virtual IMeshInitialAllocator * initialAllocator()
Allocateur initial spécifique.
virtual TraceMessage info()=0
Flot pour un message d'information.
Allocateur pour les maillages non structurés.
Type d'une entité (Item).
Vue d'un tableau d'éléments de type T.
Vecteur 1D de données avec sémantique par valeur (style STL).
void allocateMesh()
Alloue le maillage avec les mailles ajoutées lors de l'appel à addCell().
UnstructuredMeshAllocateBuildInfoInternal * _internal()
Partie interne réservée à Arcane.
void setMeshDimension(Int32 v)
Positionne la dimension du maillage.
void preAllocate(Int32 nb_cell, Int64 nb_connectivity_node)
Pre-alloue la mémoire.
void addCell(ItemTypeId type_id, Int64 cell_uid, SmallSpan< const Int64 > nodes_uid)
Ajoute une maille au maillage.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
std::int32_t Int32
Type entier signé sur 32 bits.