Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::Materials::MatVarIndex Class Reference

Represents an index on material and environment variables. More...

#include <arcane/core/materials/MatVarIndex.h>

Public Member Functions

constexpr __host__ __device__ MatVarIndex (Int32 array_index, Int32 value_index)
constexpr __host__ __device__ Int32 arrayIndex () const
 Returns the index of the value array in the list of variables.
constexpr __host__ __device__ Int32 valueIndex () const
 Returns the index in the value array.
constexpr __host__ __device__ void setIndex (Int32 array_index, Int32 value_index)
 Sets the index.
constexpr __host__ __device__ void reset ()
 Sets the entity to the null instance.
constexpr __host__ __device__ bool null () const
 Indicates if the instance represents the null entity.
constexpr __host__ __device__ bool isNull () const
 Indicates if the instance represents the null entity.

Friends

constexpr __host__ __device__ friend bool operator== (MatVarIndex mv1, MatVarIndex mv2)
 Comparison operator.
constexpr __host__ __device__ friend bool operator!= (MatVarIndex mv1, MatVarIndex mv2)
 Comparison operator.
std::ostream & operator<< (std::ostream &o, const MatVarIndex &mvi)
 Output operator.

Detailed Description

Represents an index on material and environment variables.

The index includes 2 values:

  • the first (arrayIndex()) is the number in the list of the variable's arrays.
  • the second (valueIndex()) is the index in the array of values of this variable.
Note
For performance reasons, the default constructor does not initialize the members of this class. Therefore, reset() must be called to initialize to an invalid value.

Definition at line 39 of file core/materials/MatVarIndex.h.

Constructor & Destructor Documentation

◆ MatVarIndex() [1/2]

__host__ __device__ Arcane::Materials::MatVarIndex::MatVarIndex ( Int32 array_index,
Int32 value_index )
inlineconstexpr

Definition at line 43 of file core/materials/MatVarIndex.h.

◆ MatVarIndex() [2/2]

__host__ __device__ Arcane::Materials::MatVarIndex::MatVarIndex ( )
inline

Definition at line 48 of file core/materials/MatVarIndex.h.

Member Function Documentation

◆ arrayIndex()

◆ isNull()

__host__ __device__ bool Arcane::Materials::MatVarIndex::isNull ( ) const
inlineconstexpr

Indicates if the instance represents the null entity.

Definition at line 79 of file core/materials/MatVarIndex.h.

◆ null()

__host__ __device__ bool Arcane::Materials::MatVarIndex::null ( ) const
inlineconstexpr

Indicates if the instance represents the null entity.

Definition at line 73 of file core/materials/MatVarIndex.h.

◆ reset()

__host__ __device__ void Arcane::Materials::MatVarIndex::reset ( )
inlineconstexpr

Sets the entity to the null instance.

Definition at line 66 of file core/materials/MatVarIndex.h.

◆ setIndex()

__host__ __device__ void Arcane::Materials::MatVarIndex::setIndex ( Int32 array_index,
Int32 value_index )
inlineconstexpr

Sets the index.

Definition at line 59 of file core/materials/MatVarIndex.h.

◆ valueIndex()

◆ operator!=

__host__ __device__ friend bool operator!= ( MatVarIndex mv1,
MatVarIndex mv2 )
friend

Comparison operator.

Definition at line 95 of file core/materials/MatVarIndex.h.

References operator==.

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const MatVarIndex & mvi )
friend

Output operator.

Definition at line 27 of file MatVarIndex.cc.

References arrayIndex(), operator<<, and valueIndex().

Referenced by operator<<.

◆ operator==

__host__ __device__ friend bool operator== ( MatVarIndex mv1,
MatVarIndex mv2 )
friend

Comparison operator.

Definition at line 86 of file core/materials/MatVarIndex.h.

References arrayIndex(), and valueIndex().

Referenced by operator!=.


The documentation for this class was generated from the following file: