12#ifndef ARCANE_MESH_DOFFAMILY_H
13#define ARCANE_MESH_DOFFAMILY_H
18#include "arcane/core/IMesh.h"
19#include "arcane/core/IParallelMng.h"
20#include "arcane/core/IDoFFamily.h"
22#include "arcane/mesh/ItemFamily.h"
25#include "arcane/mesh/DynamicMeshIncrementalBuilder.h"
45 static Int64 uid(
Int64 connected_item_uid) {
return connected_item_uid; }
49 Int64 max_connected_item_family_uid,
50 Int64 connected_item_uid,
51 Int32 dof_index_in_item)
53 return connected_item_uid + (max_connected_item_family_uid + 1) * dof_index_in_item + max_dof_family_uid + 1;
88 return _allocDoF(uid);
93 return _allocDoF(uid);
99 auto dof = _findOrAllocDoF(uid, is_alloc);
103 ItemInternal* findOrAllocOne(Int64 uid,
bool& is_alloc)
105 return _findOrAllocDoF(uid, is_alloc);
109 IItemFamily* family()
override {
return this; }
120 void computeSynchronizeInfos()
override;
123 DoFGroup ownDoFs() {
return ItemFamily::allItems().own(); }
124 DoFGroup ghostDoFs() {
return ItemFamily::allItems().ghost(); }
126 void removeDoFs(Int32ConstArrayView items_local_id)
override;
130 void build()
override;
131 void _addItems(Int64ConstArrayView unique_ids, Int32ArrayView items);
132 void addGhostItems(Int64ConstArrayView unique_ids, Int32ArrayView items, Int32ConstArrayView owners)
override;
133 void _removeItems(Int32ConstArrayView local_ids,
bool keep_ghost =
false) { internalRemoveItems(local_ids, keep_ghost); };
134 void internalRemoveItems(Int32ConstArrayView local_ids,
bool keep_ghost =
false)
override;
138 void _printInfos(Integer nb_added);
142 void preAllocate(Integer nb_item);
143 ItemInternal* _allocDoF(
const Int64 uid);
144 ItemInternal* _allocDoFGhost(
const Int64 uid,
const Int32 owner);
145 ItemInternal* _findOrAllocDoF(
const Int64 uid,
bool& is_alloc);
147 ItemSharedInfoWithType* m_shared_info;
149 friend class DynamicMesh;
Declarations of types on entities.
Interface of a DoF family.
Interface for modifying a family.
Interface of an entity family.
Internal structure of a mesh entity.
Type of an entity (Item).
Base class for a mesh element.
Unicode character string.
void endUpdate() override
Notifies the end of modification of the entity list.
DoFFamily(IMesh *mesh, const String &name)
The family cannot be created directly; the DoFManager must be used.
String fullName() const override
Full family name (with the mesh's name).
Integer nbItem() const override
Number of entities.
ItemGroup allItems() const override
Group of all entities.
IDoFFamily * toDoFFamily() override
Returns the interface of the particle family for this family.
Item allocOne(Int64 uid, ItemTypeId, MeshInfos &) override
Allocates an element in the family and updates the corresponding mesh_info.
String name() const override
Family name.
static Int64 uid(Int64 connected_item_uid)
Implementation of a mesh.
IMesh * mesh() const override
Associated mesh.
String fullName() const override
Full family name (with the mesh's name).
void endUpdate() override
Notifies the end of modification of the entity list.
ItemGroup allItems() const override
Group of all entities.
Integer nbItem() const override
Number of entities.
String name() const override
Family name.
Class containing mesh information.
ItemVectorViewT< DoF > DoFVectorView
View over a vector of degrees of freedom.
ItemGroupT< DoF > DoFGroup
Group of Degrees of Freedom.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
std::int32_t Int32
Signed integer type of 32 bits.