Arcane
4.1.12.0
User documentation
Loading...
Searching...
No Matches
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
/* Mutable view on a 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
30
namespace
Arcane::geometric
31
{
32
/*---------------------------------------------------------------------------*/
33
/*---------------------------------------------------------------------------*/
34
35
class
GeomShapeConnectivity
;
36
37
/*---------------------------------------------------------------------------*/
38
/*---------------------------------------------------------------------------*/
39
/*!
40
* \ingroup ArcaneGeometric
41
* \brief Mutable view on a GeomShape.
42
*
43
* An instance of this class allows modification of the coordinates
44
* of nodes, faces, and the center of a GeomShape.
45
*
46
* To retrieve an instance of this object, you must call
47
* GeomShapeMng::mutableShapeView() or GeomShape::toMutableView().
48
*/
49
class
GeomShapeMutableView
50
{
51
public
:
52
53
friend
class
GeomShapeMng;
54
friend
class
GeomShape;
55
56
public
:
57
58
GeomShapeMutableView()
59
: m_node_ptr(0)
60
, m_face_ptr(0)
61
, m_center_ptr(0)
62
{}
63
64
private
:
65
66
GeomShapeMutableView(
Real3
* node_ptr,
Real3
* face_ptr,
Real3
* center_ptr)
67
: m_node_ptr(node_ptr)
68
, m_face_ptr(face_ptr)
69
, m_center_ptr(center_ptr)
70
{}
71
72
public
:
73
74
inline
const
Real3
node(
Integer
id
)
const
75
{
76
return
m_node_ptr[id];
77
}
78
79
inline
const
Real3
face(
Integer
id
)
const
80
{
81
return
m_face_ptr[id];
82
}
83
84
inline
const
Real3
center()
const
85
{
86
return
*m_center_ptr;
87
}
88
89
inline
void
setNode(
Integer
id
,
const
Real3
& v)
90
{
91
m_node_ptr[id] = v;
92
}
93
94
inline
void
setFace(
Integer
id
,
const
Real3
& v)
95
{
96
m_face_ptr[id] = v;
97
}
98
99
inline
void
setCenter(
const
Real3
& v)
100
{
101
(*m_center_ptr) = v;
102
}
103
104
private
:
105
106
Real3
* m_node_ptr;
107
Real3
* m_face_ptr;
108
Real3
* m_center_ptr;
109
110
private
:
111
112
inline
void
_setArray(
Real3
* node_ptr,
Real3
* face_ptr,
Real3
* center_ptr)
113
{
114
m_node_ptr = node_ptr;
115
m_face_ptr = face_ptr;
116
m_center_ptr = center_ptr;
117
}
118
};
119
120
/*---------------------------------------------------------------------------*/
121
/*---------------------------------------------------------------------------*/
122
123
}
// namespace Arcane::geometric
124
125
/*---------------------------------------------------------------------------*/
126
/*---------------------------------------------------------------------------*/
127
128
#endif
Arcane::Real3
Class managing a 3-dimensional real vector.
Definition
Real3.h:132
Arcane::geometric::GeomShapeConnectivity
Definition
GeomShapeView.cc:36
Arcane::Integer
Int32 Integer
Type representing an integer.
Definition
ArccoreGlobal.h:293
arcane
geometry
GeomShapeMutableView.h
Generated on
for Arcane by
1.16.1