Arcane  v3.16.2.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
DynamicMeshInternal.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* Partie interne à Arcane de DynamicMesh. */
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 pour envoyer une exception avec formattage.
Vue modifiable d'un tableau d'un type T.
Vue constante d'un tableau de type T.
constexpr Integer size() const noexcept
Nombre d'éléments du tableau.
Type d'une entité (Item).
Definition ItemTypeId.h:32
Identifiant unique d'une entité.
Caractéristiques d'un maillage.
Definition MeshKind.h:104
Exception lorsqu'une fonction n'est pas implémentée.
Implémentation d'un maillage.
Definition DynamicMesh.h:98
std::int32_t Int32
Type entier signé sur 32 bits.