Arcane  4.2.3.0
Developer documentation
Loading...
Searching...
No Matches
DynamicMeshInternal.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* DynamicMeshInternal.cc (C) 2000-2026 */
9/* */
10/* Internal part of DynamicMesh for Arcane. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/mesh/internal/DynamicMeshInternal.h"
15
16#include "arcane/mesh/DynamicMesh.h"
17#include "arcane/mesh/DynamicMeshIncrementalBuilder.h"
18#include "arcane/mesh/ItemConnectivityMng.h"
19#include "arcane/mesh/FaceFamily.h"
20
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane::mesh
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31DynamicMeshInternal::
32DynamicMeshInternal(DynamicMesh* mesh)
33: m_mesh(mesh)
34, m_connectivity_mng(std::make_unique<ItemConnectivityMng>(mesh->traceMng()))
35{}
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40/*---------------------------------------------------------------------------*/
41/*---------------------------------------------------------------------------*/
42
43void DynamicMeshInternal::
44build()
45{
46}
47
48/*---------------------------------------------------------------------------*/
49/*---------------------------------------------------------------------------*/
50
51void DynamicMeshInternal::
52setMeshKind(const MeshKind& v)
53{
54 m_mesh->m_mesh_kind = v;
55}
56
57/*---------------------------------------------------------------------------*/
58/*---------------------------------------------------------------------------*/
59
60IItemConnectivityMng* DynamicMeshInternal::
61dofConnectivityMng() const noexcept
62{
63 return m_connectivity_mng.get();
64}
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69IPolyhedralMeshModifier* DynamicMeshInternal::
70polyhedralMeshModifier() const noexcept
71{
72 return nullptr;
73}
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78void DynamicMeshInternal::
79removeNeedRemoveMarkedItems()
80{
81 m_mesh->incrementalBuilder()->removeNeedRemoveMarkedItems();
82}
83
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87NodeLocalId DynamicMeshInternal::
88addNode([[maybe_unused]] ItemUniqueId unique_id)
89{
91}
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
95
96FaceLocalId DynamicMeshInternal::
97addFace([[maybe_unused]] ItemUniqueId unique_id,
98 [[maybe_unused]] ItemTypeId type_id,
99 [[maybe_unused]] ConstArrayView<Int64> nodes_uid)
100{
102}
103
104/*---------------------------------------------------------------------------*/
105/*---------------------------------------------------------------------------*/
106
107CellLocalId DynamicMeshInternal::
108addCell(ItemUniqueId unique_id, ItemTypeId type_id, ConstArrayView<Int64> nodes_uid)
109{
110 Int32 nb_node = nodes_uid.size();
111 m_items_infos.resize(nb_node + 2);
112 m_items_infos[0] = type_id;
113 m_items_infos[1] = unique_id;
114 m_items_infos.subView(2, nb_node).copy(nodes_uid);
115 Int32 cell_local_id = NULL_ITEM_LOCAL_ID;
116 m_mesh->addCells(1, m_items_infos, ArrayView<Int32>(1, &cell_local_id));
117 return CellLocalId(cell_local_id);
118}
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
124{
125 return m_mesh->nodesMap();
126}
127/*---------------------------------------------------------------------------*/
128/*---------------------------------------------------------------------------*/
129
130ItemInternalMap& DynamicMeshInternal::edgesMap()
131{
132 return m_mesh->edgesMap();
133}
134
135ItemInternalMap& DynamicMeshInternal::facesMap()
136{
137 return m_mesh->facesMap();
138}
139
140ItemInternalMap& DynamicMeshInternal::cellsMap()
141{
142 return m_mesh->cellsMap();
143}
144
145FaceFamily& DynamicMeshInternal::trueFaceFamily()
146{
147 return m_mesh->trueFaceFamily();
148}
149
150void DynamicMeshInternal::printStats(Int32 level)
151{
152 m_mesh->incrementalBuilder()->printStats(level);
153}
154
155} // namespace Arcane::mesh
156
157/*---------------------------------------------------------------------------*/
158/*---------------------------------------------------------------------------*/
#define ARCANE_THROW(exception_class,...)
Macro for throwing an exception with formatting.
Modifiable view of an array of type T.
Constant view of an array of type T.
constexpr Integer size() const noexcept
Number of elements in the array.
Type of an entity (Item).
Definition ItemTypeId.h:33
Unique identifier of an entity.
Characteristics of a mesh.
Definition MeshKind.h:113
mesh::ItemInternalMap & nodesMap() override
Implementation of a mesh.
Definition DynamicMesh.h:98
Associative array of ItemInternal.
std::int32_t Int32
Signed integer type of 32 bits.