Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ItemGroupGeometryProperty.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#ifndef ARCGEOSIM_GEOMETRY_IMPL_ITEMGROUPGEOMETRYPROPERTY_H
8#define ARCGEOSIM_GEOMETRY_IMPL_ITEMGROUPGEOMETRYPROPERTY_H
9/* Author : havep at Tue Apr 1 17:25:52 2008
10 * Generated by createNew
11 */
12
13#include "arcane/geometry/IGeometryMng.h"
14#include <map>
15
16using namespace Arcane::Numerics;
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arcane::Numerics
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
29{
30 public:
31
34
37
38 public:
39
40 struct StorageInfo
41 {
42 StorageInfo()
43 : storageType(0)
44 , externStorage(0)
45 , ownStorage(0)
46 , usageVarCount(0)
47 , usageMapCount(0)
48 {}
49 Integer storageType;
50 Integer externStorage;
51 Integer ownStorage;
52 UInt32 usageVarCount;
53 UInt32 usageMapCount;
54 std::shared_ptr<IGeometryMng::RealVariable> realVar;
55 std::shared_ptr<IGeometryMng::Real3Variable> real3Var;
56 //boost::shared_ptr<IGeometryMng::RealGroupMap> realMap;
57 //boost::shared_ptr<IGeometryMng::Real3GroupMap> real3Map;
58 };
59
60 typedef std::map<IGeometryProperty::eProperty, StorageInfo> StorageInfos;
61
62 Integer defined;
63 Integer computed;
64 Integer delegated;
65 StorageInfos storages;
66
67 bool hasProperty(const IGeometryProperty::eProperty p) const;
68 Integer getStorage(const IGeometryProperty::eProperty p) const;
69 void resetFlags();
70};
71
73template <typename T>
76
77template <>
79{
80 typedef IGeometryMng::RealVariable RealTVariable;
81 //typedef IGeometryMng::RealGroupMap RealTGroupMap;
82 inline static std::shared_ptr<RealTVariable>& getVarContainer(ItemGroupGeometryProperty::StorageInfo& storage) { return storage.realVar; }
83 //inline static boost::shared_ptr<RealTGroupMap> & getMapContainer(ItemGroupGeometryProperty::StorageInfo & storage) { return storage.realMap; }
84};
85
86template <>
88{
89 typedef IGeometryMng::Real3Variable RealTVariable;
90 //typedef IGeometryMng::Real3GroupMap RealTGroupMap;
91 inline static std::shared_ptr<RealTVariable>& getVarContainer(ItemGroupGeometryProperty::StorageInfo& storage) { return storage.real3Var; }
92 //inline static boost::shared_ptr<IGeometryMng::Real3GroupMap> & getMapContainer(ItemGroupGeometryProperty::StorageInfo & storage) { return storage.real3Map; }
93};
94
95/*---------------------------------------------------------------------------*/
96/*---------------------------------------------------------------------------*/
97
98} // namespace Arcane::Numerics
99
100/*---------------------------------------------------------------------------*/
101/*---------------------------------------------------------------------------*/
102
103#endif
Generic (empty) model for accessing StorageInfo by storage type.
Class managing a 3-dimensional real vector.
Definition Real3.h:132
std::uint32_t UInt32
Unsigned integer type of 32 bits.
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.