Arcane  v4.1.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
src/arcane/geometry/GeomShapeMutableView.h
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/* GeomShapeMutableView.h (C) 2000-2026 */
9/* */
10/* Vue modifiable sur un GeomShape. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_GEOMETRIC_GEOMSHAPEMUTABLEVIEW_H
13#define ARCANE_GEOMETRIC_GEOMSHAPEMUTABLEVIEW_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/ITraceMng.h"
18#include "arcane/utils/ArrayView.h"
19#include "arcane/utils/Real3.h"
20
21#include "arcane/core/Item.h"
22
23#include "arcane/geometry/GeometricConnectic.h"
24#include "arcane/geometry/GeomElement.h"
25#include "arcane/geometry/CellConnectivity.h"
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30namespace Arcane::geometric
31{
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
49class GeomShapeMutableView
50{
51 public:
52
53 friend class GeomShapeMng;
54 friend class GeomShape;
55
56 public:
57
58 GeomShapeMutableView()
59 : m_node_ptr(0), m_face_ptr(0), m_center_ptr(0){}
60
61 private:
62
63 GeomShapeMutableView(Real3* node_ptr,Real3* face_ptr,Real3* center_ptr)
64 : m_node_ptr(node_ptr), m_face_ptr(face_ptr), m_center_ptr(center_ptr){}
65
66 public:
67
68 inline const Real3 node(Integer id) const
69 {
70 return m_node_ptr[id];
71 }
72
73 inline const Real3 face(Integer id) const
74 {
75 return m_face_ptr[id];
76 }
77
78 inline const Real3 center() const
79 {
80 return *m_center_ptr;
81 }
82
83 inline void setNode(Integer id,const Real3& v)
84 {
85 m_node_ptr[id] = v;
86 }
87
88 inline void setFace(Integer id,const Real3& v)
89 {
90 m_face_ptr[id] = v;
91 }
92
93 inline void setCenter(const Real3& v)
94 {
95 (*m_center_ptr) = v;
96 }
97
98 private:
99
100 Real3* m_node_ptr;
101 Real3* m_face_ptr;
102 Real3* m_center_ptr;
103
104 private:
105
106 inline void _setArray(Real3* node_ptr,Real3* face_ptr,Real3* center_ptr)
107 {
108 m_node_ptr = node_ptr;
109 m_face_ptr = face_ptr;
110 m_center_ptr = center_ptr;
111 }
112};
113
114/*---------------------------------------------------------------------------*/
115/*---------------------------------------------------------------------------*/
116
117} // namespace Arcane::geometric
118
119/*---------------------------------------------------------------------------*/
120/*---------------------------------------------------------------------------*/
121
122#endif
Classe gérant un vecteur de réel de dimension 3.
Definition Real3.h:132
Int32 Integer
Type représentant un entier.