Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor > Class Template Reference

Write view on a mesh scalar variable of type 'RealN'. More...

#include <arcane/core/VariableView.h>

Public Types

using DataType = typename Accessor::ValueType
using DataTypeReturnReference = DataType&
using ItemIndexType = typename ItemTraitsT<ItemType>::LocalIdType

Public Member Functions

 ItemVariableRealNScalarOutViewT (IVariable *var, Span< DataType > v)
 Constructs the view.
SimdSetter< DataType > operator[] (SimdItemIndexT< ItemType > simd_item) const
 Vector access operator with indirection.
SimdDirectSetter< DataType > operator[] (SimdItemDirectIndexT< ItemType > simd_item) const
 Vector access operator without indirection.
Accessor operator[] (ItemIndexType item) const
 Access operator for the item entity.
Accessor value (ItemIndexType item) const
 Access operator for the item entity.
void setValue (ItemIndexType item, const DataType &v) const
 Positions the value for the item entity at v.
Public Member Functions inherited from Arcane::VariableViewBase
 VariableViewBase (IVariable *)

Detailed Description

template<typename ItemType, typename Accessor>
class Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >

Write view on a mesh scalar variable of type 'RealN'.

This class specializes modifiable views for the reals 'Real2', 'Real3', 'Real2x2' and 'Real3x3'. The specialization ensures that only the entire vector of these real numbers can be modified. For example:

VariableNodeReal3View force_view = ...;
Node node = ...;
// OK:
force_view[node] = Real3(x,y,z);
// Forbidden:
// force_view[node].x = ...;
Node of a mesh.
Definition Item.h:598
Class managing a 3-dimensional real vector.
Definition Real3.h:132

Definition at line 327 of file VariableView.h.

Member Typedef Documentation

◆ DataType

template<typename ItemType, typename Accessor>
using Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::DataType = typename Accessor::ValueType

Definition at line 332 of file VariableView.h.

◆ DataTypeReturnReference

template<typename ItemType, typename Accessor>
using Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::DataTypeReturnReference = DataType&

Definition at line 333 of file VariableView.h.

◆ ItemIndexType

template<typename ItemType, typename Accessor>
using Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::ItemIndexType = typename ItemTraitsT<ItemType>::LocalIdType

Definition at line 334 of file VariableView.h.

Constructor & Destructor Documentation

◆ ItemVariableRealNScalarOutViewT()

template<typename ItemType, typename Accessor>
Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::ItemVariableRealNScalarOutViewT ( IVariable * var,
Span< DataType > v )
inline

Constructs the view.

Definition at line 339 of file VariableView.h.

Member Function Documentation

◆ operator[]() [1/3]

template<typename ItemType, typename Accessor>
Accessor Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::operator[] ( ItemIndexType item) const
inline

Access operator for the item entity.

Definition at line 358 of file VariableView.h.

◆ operator[]() [2/3]

template<typename ItemType, typename Accessor>
SimdDirectSetter< DataType > Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::operator[] ( SimdItemDirectIndexT< ItemType > simd_item) const
inline

Vector access operator without indirection.

Definition at line 352 of file VariableView.h.

◆ operator[]() [3/3]

template<typename ItemType, typename Accessor>
SimdSetter< DataType > Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::operator[] ( SimdItemIndexT< ItemType > simd_item) const
inline

Vector access operator with indirection.

Definition at line 346 of file VariableView.h.

◆ setValue()

template<typename ItemType, typename Accessor>
void Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::setValue ( ItemIndexType item,
const DataType & v ) const
inline

Positions the value for the item entity at v.

Definition at line 372 of file VariableView.h.

◆ value()

template<typename ItemType, typename Accessor>
Accessor Arcane::ItemVariableRealNScalarOutViewT< ItemType, Accessor >::value ( ItemIndexType item) const
inline

Access operator for the item entity.

Definition at line 365 of file VariableView.h.


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