Arcane  4.1.12.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-2025 */
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
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane::mesh
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29DynamicMeshInternal::
30DynamicMeshInternal(DynamicMesh* mesh)
31: m_mesh(mesh)
32, m_connectivity_mng(std::make_unique<ItemConnectivityMng>(mesh->traceMng()))
33{}
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
41void DynamicMeshInternal::
42build()
43{
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49void DynamicMeshInternal::
50setMeshKind(const MeshKind& v)
51{
52 m_mesh->m_mesh_kind = v;
53}
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
57
58IItemConnectivityMng* DynamicMeshInternal::
59dofConnectivityMng() const noexcept
60{
61 return m_connectivity_mng.get();
62}
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67IPolyhedralMeshModifier* DynamicMeshInternal::
68polyhedralMeshModifier() const noexcept
69{
70 return nullptr;
71}
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76void DynamicMeshInternal::
77removeNeedRemoveMarkedItems()
78{
79 m_mesh->incrementalBuilder()->removeNeedRemoveMarkedItems();
80}
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85NodeLocalId DynamicMeshInternal::
86addNode([[maybe_unused]] ItemUniqueId unique_id)
87{
89}
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
93
94FaceLocalId DynamicMeshInternal::
95addFace([[maybe_unused]] ItemUniqueId unique_id,
96 [[maybe_unused]] ItemTypeId type_id,
97 [[maybe_unused]] ConstArrayView<Int64> nodes_uid)
98{
100}
101
102/*---------------------------------------------------------------------------*/
103/*---------------------------------------------------------------------------*/
104
105CellLocalId DynamicMeshInternal::
106addCell(ItemUniqueId unique_id, ItemTypeId type_id, ConstArrayView<Int64> nodes_uid)
107{
108 Int32 nb_node = nodes_uid.size();
109 m_items_infos.resize(nb_node + 2);
110 m_items_infos[0] = type_id;
111 m_items_infos[1] = unique_id;
112 m_items_infos.subView(2, nb_node).copy(nodes_uid);
113 Int32 cell_local_id = NULL_ITEM_LOCAL_ID;
114 m_mesh->addCells(1, m_items_infos, ArrayView<Int32>(1, &cell_local_id));
115 return CellLocalId(cell_local_id);
116}
117
118/*---------------------------------------------------------------------------*/
119/*---------------------------------------------------------------------------*/
120
121} // namespace Arcane::mesh
122
123/*---------------------------------------------------------------------------*/
124/*---------------------------------------------------------------------------*/
#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
Implementation of a mesh.
Definition DynamicMesh.h:98
std::int32_t Int32
Signed integer type of 32 bits.