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"
24#include "arcane/core/materials/internal/IMeshMaterialVariableInternal.h"
26#include "arcane/core/VariableDataTypeTraits.h"
42 using ItemType =
typename TrueType::ItemTypeType;
43 using DataType =
typename TrueType::DataTypeType;
44 int dim = TrueType::dimension();
46 eDataType dt = VariableDataTypeTraitsT<DataType>::type();
53template<
typename TrueType> TrueType*
59 MeshHandle mesh_handle = v.meshHandle();
60 if (mesh_handle.isNull())
72 auto* true_var =
dynamic_cast<TrueType*
>(var);
80#define ARCANE_INSTANTIATE_MAT(type) \
81 template class ARCANE_TEMPLATE_EXPORT MeshMaterialVariableBuildTraits<IScalarMeshMaterialVariable<Cell,type>>; \
82 template class ARCANE_TEMPLATE_EXPORT MeshMaterialVariableBuildTraits<IArrayMeshMaterialVariable<Cell,type>>
84ARCANE_INSTANTIATE_MAT(
Byte);
85ARCANE_INSTANTIATE_MAT(
Int8);
86ARCANE_INSTANTIATE_MAT(
Int16);
87ARCANE_INSTANTIATE_MAT(
Int32);
88ARCANE_INSTANTIATE_MAT(
Int64);
89ARCANE_INSTANTIATE_MAT(BFloat16);
92ARCANE_INSTANTIATE_MAT(
Real);
93ARCANE_INSTANTIATE_MAT(Real2);
94ARCANE_INSTANTIATE_MAT(Real3);
95ARCANE_INSTANTIATE_MAT(Real2x2);
96ARCANE_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.
static eItemKind kind()
Genre de l'entité
Interface du gestionnaire des matériaux et des milieux d'un maillage.
static IMeshMaterialMng * getReference(const MeshHandleOrMesh &mesh_handle, bool create=true)
Récupère ou créé la référence associée à mesh.
Interface d'une variable matériau d'un maillage.
Informations caractérisant le type d'une variable matériau.
Classe pour gérer la création du type concret de la variable matériaux.
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.
@ Float16
Donnée de type Float16.
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.