Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IScalarMeshMaterialVariable.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/* IScalarMeshMaterialVariable.h (C) 2000-2022 */
9/* */
10/* Interface for a scalar material variable. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MATERIALS_ISCALARMESHMATERIALVARIABLE_H
13#define ARCANE_MATERIALS_ISCALARMESHMATERIALVARIABLE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/NotImplementedException.h"
18#include "arcane/utils/Array.h"
19
20#include "arcane/core/materials/MaterialsCoreGlobal.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane::Materials
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31/*!
32 * \internal
33 * \brief Access interface for CellMaterialVariableScalarRef.
34 */
35template <typename ItemType, typename DataType>
37{
38 public:
39
41 using ItemTypeType = ItemType;
42 using DataTypeType = DataType;
43 using VariableRefType = MeshVariableScalarRefT<ItemType, DataType>;
45 static constexpr int dimension() { return 0; }
46
47 public:
48
49 virtual ~IScalarMeshMaterialVariable() = default;
50
51 public:
52
53 virtual ArrayView<ArrayView<DataType>> _internalFullValuesView() = 0;
54 virtual void fillFromArray(IMeshMaterial* mat, ConstArrayView<DataType> values) = 0;
55 virtual void fillFromArray(IMeshMaterial* mat, ConstArrayView<DataType> values, Int32ConstArrayView indexes) = 0;
56 virtual void fillToArray(IMeshMaterial* mat, ArrayView<DataType> values) = 0;
57 virtual void fillToArray(IMeshMaterial* mat, ArrayView<DataType> values, Int32ConstArrayView indexes) = 0;
58 virtual void fillPartialValues(const DataType& value) = 0;
59 virtual VariableRefType* globalVariableReference() const = 0;
60 virtual void incrementReference() = 0;
61 virtual IMeshMaterialVariable* toMeshMaterialVariable() = 0;
62};
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67} // End namespace Arcane::Materials
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72#endif
Modifiable view of an array of type T.
Constant view of an array of type T.
Interface of a material variable on a mesh.
Scalar variable on a mesh entity type.
Always enables tracing in Arcane parts concerning materials.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482