14#include "arcane/core/materials/IMeshMaterialVariable.h"
16#include "arcane/utils/FatalErrorException.h"
18#include "arcane/core/materials/IScalarMeshMaterialVariable.h"
19#include "arcane/core/materials/IArrayMeshMaterialVariable.h"
20#include "arcane/core/materials/MaterialVariableTypeInfo.h"
21#include "arcane/core/materials/MaterialVariableBuildInfo.h"
22#include "arcane/core/materials/IMeshMaterialMng.h"
23#include "arcane/core/materials/IMeshMaterialVariableFactoryMng.h"
25#include "arcane/core/VariableDataTypeTraits.h"
26#include "arcane/core/IVariable.h"
41 using ItemType =
typename TrueType::ItemTypeType;
42 using DataType =
typename TrueType::DataTypeType;
43 int dim = TrueType::dimension();
45 eDataType dt = VariableDataTypeTraitsT<DataType>::type();
57template <
typename TrueType> TrueType*
76 auto* true_var =
dynamic_cast<TrueType*
>(var);
89template <
typename TrueType>
TrueType*
94 auto* true_var =
dynamic_cast<TrueType*
>(var);
103#define ARCANE_INSTANTIATE_MAT(type) \
104 template class ARCANE_TEMPLATE_EXPORT MeshMaterialVariableBuildTraits<IScalarMeshMaterialVariable<Cell,type>>; \
105 template class ARCANE_TEMPLATE_EXPORT MeshMaterialVariableBuildTraits<IArrayMeshMaterialVariable<Cell,type>>
107ARCANE_INSTANTIATE_MAT(
Byte);
108ARCANE_INSTANTIATE_MAT(
Int8);
109ARCANE_INSTANTIATE_MAT(
Int16);
110ARCANE_INSTANTIATE_MAT(
Int32);
111ARCANE_INSTANTIATE_MAT(
Int64);
113ARCANE_INSTANTIATE_MAT(
Float16);
114ARCANE_INSTANTIATE_MAT(
Float32);
115ARCANE_INSTANTIATE_MAT(
Real);
116ARCANE_INSTANTIATE_MAT(
Real2);
117ARCANE_INSTANTIATE_MAT(
Real3);
118ARCANE_INSTANTIATE_MAT(
Real2x2);
119ARCANE_INSTANTIATE_MAT(
Real3x3);
#define ARCANE_CHECK_POINTER(ptr)
Macro retournant le pointeur ptr s'il est non nul ou lancant une exception s'il est nul.
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Type flottant demi-précision.
virtual String fullName() const =0
Nom complet de la variable (avec le préfixe de la famille).
static eItemKind kind()
Genre de l'entité
Interface du gestionnaire des matériaux et des milieux d'un maillage.
virtual IMeshMaterialVariableFactoryMng * variableFactoryMng() const =0
Interface de la fabrique de variables.
static IMeshMaterialMng * getReference(const MeshHandleOrMesh &mesh_handle, bool create=true)
Récupère ou créé la référence associée à mesh.
virtual IMeshMaterialVariable * createVariable(const String &storage_type, const MaterialVariableBuildInfo &build_info)=0
Créé une variable matériau.
Interface d'une variable matériau d'un maillage.
virtual IVariable * globalVariable() const =0
Variable globale sur le maillage associée.
Informations caractérisant le type d'une variable matériau.
String fullName() const
Nom complet du type de la variable.
static TrueType * getVariableReference(const MaterialVariableBuildInfo &v, MatVarSpace mvs)
Retourne une variable associée à un constituant.
bool isNull() const
Indique si le handle est nul (il ne référence aucun maillage existant ou non).
Classe gérant un vecteur réel 2-dimensionnel.
Classe gérant une matrice 2x2 de réels.
Classe gérant un vecteur réel de 3 dimensions.
Classe gérant une matrice réelle 3x3.
Active toujours les traces dans les parties Arcane concernant les matériaux.
MatVarSpace
Espace de définition d'une variable matériau.
std::int8_t Int8
Type entier signé sur 8 bits.
std::int64_t Int64
Type entier signé sur 64 bits.
eItemKind
Genre d'entité de maillage.
std::int16_t Int16
Type entier signé sur 16 bits.
double Real
Type représentant un réel.
unsigned char Byte
Type d'un octet.
float Float32
Type flottant IEEE-753 simple précision.
eDataType
Type d'une donnée.
std::int32_t Int32
Type entier signé sur 32 bits.