Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IGeometryMng.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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#ifndef ARCGEOSIM_GEOMETRY_IGEOMETRYSERVICE_H
8#define ARCGEOSIM_GEOMETRY_IGEOMETRYSERVICE_H
9/* Author : havep at Wed Nov 14 13:41:31 2007
10 * Generated by createNew
11 */
12
13#include <arcane/ItemGroup.h>
14#include <arcane/ArcaneTypes.h>
15#include <arcane/MeshVariable.h>
16#include <arcane/VariableTypedef.h>
17#include <arcane/utils/String.h>
18
19using namespace Arcane;
20
21namespace Arcane
22{
23namespace Numerics
24{
25
27class IGeometry;
28
30
38struct ARCANE_GEOMETRY_EXPORT IGeometryProperty
39{
40 enum eProperty
41 {
42 PNone = 0,
43 PMeasure = (1 << 0),
44 PLength = (1 << 1),
45 PArea = (1 << 2),
46 PVolume = (1 << 3),
47 PCenter = (1 << 4),
48 PNormal = (1 << 5),
49 PVolumeSurfaceRatio = (1 << 6),
50 PEnd = (1 << 7)
51 };
52
53 enum eStorage
54 {
55 PNoStorage = 0,
56 PVariable = (1 << 0)
57 };
58
59 static bool isScalar(const eProperty p)
60 {
61 return (p & (PMeasure|PLength|PArea|PVolume|PVolumeSurfaceRatio)) != 0;
62 }
63
64 static bool isVectorial(const eProperty p)
65 {
66 return (p & (PCenter|PNormal)) != 0;
67 }
68
70 {
71 public:
72 Enumerator() : m_state(1) { }
73 eProperty operator*() const { return (eProperty)m_state; }
74 void operator++() { m_state <<= 1; }
75 bool end() const { return m_state == PEnd; }
76 private:
77 Integer m_state;
78 };
79
80 static String name(const eProperty p) {
81 switch (p) {
82 case PNone:
83 return "None";
84 case PMeasure:
85 return "Measure";
86 case PLength:
87 return "Length";
88 case PArea:
89 return "Area";
90 case PVolume:
91 return "Volume";
92 case PCenter:
93 return "Center";
94 case PNormal:
95 return "Normal";
96 case PVolumeSurfaceRatio:
97 return "VolumeSurfaceRatio";
98 case PEnd:
99 default:
100 ARCANE_FATAL("Undefined property");
101 }
102 }
103
104 static String name(const eStorage p) {
105 switch (p) {
106 case PNoStorage:
107 return "NoStorage";
108 case PVariable:
109 return "Variable";
110 default:
111 ARCANE_FATAL("Undefined storage");
112 }
113 }
114};
118class ARCANE_GEOMETRY_EXPORT IGeometryMng
119{
120 public:
123
124 public:
127
129 virtual ~IGeometryMng() {};
130
131public:
133 virtual void init() = 0;
134
136
138 virtual void addItemGroupProperty(ItemGroup group, Integer property, Integer storage = IGeometryProperty::PVariable) = 0;
139
141 virtual void addItemGroupProperty(ItemGroup group, IGeometryProperty::eProperty property, RealVariable var) = 0;
142
144 virtual void addItemGroupProperty(ItemGroup group, IGeometryProperty::eProperty property, Real3Variable var) = 0;
145
148
150 virtual bool hasItemGroupProperty(ItemGroup group, Integer property) = 0;
151
153 virtual Integer getItemGroupPropertyStorage(ItemGroup group, IGeometryProperty::eProperty property) = 0;
154
156
158
160 virtual const RealVariable & getRealVariableProperty(ItemGroup group, IGeometryProperty::eProperty property) = 0;
161
163 virtual const Real3Variable & getReal3VariableProperty(ItemGroup group, IGeometryProperty::eProperty property) = 0;
164
166
168
170 virtual void update(ItemGroup group, Integer property) = 0;
171
173 virtual void reset(ItemGroup group, Integer property) = 0;
174
176
178
180 virtual void update(ItemGroup group) = 0;
181
183 virtual void reset(ItemGroup group) = 0;
184
186
188
190 virtual void update() = 0;
191
193 virtual void reset() = 0;
194
196
198 virtual IGeometry * geometry() = 0;
199};
200
201} // End namespace Arcane
202
203} // End namespace Numerics
204
205#endif /* ARCGEOSIM_GEOMETRY_IGEOMETRYSERVICE_H */
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Groupe d'entités de maillage.
Definition ItemGroup.h:49
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Gestionnaire des calculs géométriques.
virtual const RealVariable & getRealVariableProperty(ItemGroup group, IGeometryProperty::eProperty property)=0
Get geometric property values for a Real field.
virtual void reset(ItemGroup group)=0
Reset property for an ItemGroup.
virtual Integer getItemGroupPropertyStorage(ItemGroup group, IGeometryProperty::eProperty property)=0
Check if a storage is available on an ItemGroup.
virtual bool hasItemGroupProperty(ItemGroup group, Integer property)=0
Check if a property is activated on an ItemGroup.
virtual void update()=0
Update property values for all ItemGroups.
virtual void update(ItemGroup group, Integer property)=0
Update property values for an ItemGroup.
virtual void reset(ItemGroup group, Integer property)=0
Reset property for an ItemGroup.
virtual void update(ItemGroup group)=0
Update property values for an ItemGroup.
virtual Integer getItemGroupProperty(ItemGroup group)=0
Get set of properties of an ItemGroup.
virtual void reset()=0
Reset property for all ItemGroups.
virtual void init()=0
Initialisation.
virtual void addItemGroupProperty(ItemGroup group, IGeometryProperty::eProperty property, RealVariable var)=0
Set geometric properties on a ItemGroup with an external container (real field)
virtual IGeometry * geometry()=0
Get underlying geometry.
virtual void addItemGroupProperty(ItemGroup group, Integer property, Integer storage=IGeometryProperty::PVariable)=0
Set geometric properties on a ItemGroup.
virtual void addItemGroupProperty(ItemGroup group, IGeometryProperty::eProperty property, Real3Variable var)=0
Set geometric properties on a ItemGroup with an external container (real3 field)
virtual const Real3Variable & getReal3VariableProperty(ItemGroup group, IGeometryProperty::eProperty property)=0
Get geometric property values for a Real3 field.
Interface de calculs géométriques.
Definition IGeometry.h:25
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.