NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NeoN::SymmTensor Class Reference

A class for the representation of a symmetric 3x3 tensor. More...

#include <symmTensor.hpp>

Public Member Functions

KOKKOS_INLINE_FUNCTION SymmTensor ()
 
KOKKOS_INLINE_FUNCTION SymmTensor (const scalar diag)
 Construct scalar-times-identity symmetric tensor.
 
KOKKOS_INLINE_FUNCTION SymmTensor (scalar xx, scalar xy, scalar xz, scalar yy, scalar yz, scalar zz)
 
KOKKOS_INLINE_FUNCTION scalardata ()
 
KOKKOS_INLINE_FUNCTION const scalardata () const
 
KOKKOS_INLINE_FUNCTION constexpr size_t size () const
 
KOKKOS_INLINE_FUNCTION scalar operator() (const size_t i, const size_t j) const
 Component access — maps (i,j) to the stored upper-triangle.
 
KOKKOS_INLINE_FUNCTION scalaroperator() (const size_t i, const size_t j)
 
KOKKOS_INLINE_FUNCTION bool operator== (const SymmTensor &rhs) const
 
KOKKOS_INLINE_FUNCTION SymmTensor operator+ (const SymmTensor &rhs) const
 
KOKKOS_INLINE_FUNCTION SymmTensoroperator+= (const SymmTensor &rhs)
 
KOKKOS_INLINE_FUNCTION SymmTensor operator- (const SymmTensor &rhs) const
 
KOKKOS_INLINE_FUNCTION SymmTensoroperator-= (const SymmTensor &rhs)
 
KOKKOS_INLINE_FUNCTION SymmTensor operator* (const scalar s) const
 
KOKKOS_INLINE_FUNCTION SymmTensoroperator*= (const scalar s)
 
KOKKOS_INLINE_FUNCTION scalar trace () const
 Trace: xx + yy + zz.
 
KOKKOS_INLINE_FUNCTION SymmTensor dev () const
 Deviatoric part: S - (1/3)*tr(S)*I.
 
KOKKOS_INLINE_FUNCTION SymmTensor dev2 () const
 dev2: S - (2/3)*tr(S)*I (used in viscous stress)
 

Detailed Description

A class for the representation of a symmetric 3x3 tensor.

Upper-triangle storage order: [xx, xy, xz, yy, yz, zz] i.e. data_[0]=xx, data_[1]=xy, data_[2]=xz, data_[3]=yy, data_[4]=yz, data_[5]=zz.

Definition at line 27 of file symmTensor.hpp.

Constructor & Destructor Documentation

◆ SymmTensor() [1/3]

KOKKOS_INLINE_FUNCTION NeoN::SymmTensor::SymmTensor ( )
inline

Definition at line 32 of file symmTensor.hpp.

◆ SymmTensor() [2/3]

KOKKOS_INLINE_FUNCTION NeoN::SymmTensor::SymmTensor ( const scalar  diag)
inlineexplicit

Construct scalar-times-identity symmetric tensor.

Definition at line 42 of file symmTensor.hpp.

◆ SymmTensor() [3/3]

KOKKOS_INLINE_FUNCTION NeoN::SymmTensor::SymmTensor ( scalar  xx,
scalar  xy,
scalar  xz,
scalar  yy,
scalar  yz,
scalar  zz 
)
inline

Definition at line 53 of file symmTensor.hpp.

Member Function Documentation

◆ data() [1/2]

KOKKOS_INLINE_FUNCTION scalar * NeoN::SymmTensor::data ( )
inline

Definition at line 63 of file symmTensor.hpp.

◆ data() [2/2]

KOKKOS_INLINE_FUNCTION const scalar * NeoN::SymmTensor::data ( ) const
inline

Definition at line 64 of file symmTensor.hpp.

◆ dev()

KOKKOS_INLINE_FUNCTION SymmTensor NeoN::SymmTensor::dev ( ) const
inline

Deviatoric part: S - (1/3)*tr(S)*I.

Definition at line 164 of file symmTensor.hpp.

◆ dev2()

KOKKOS_INLINE_FUNCTION SymmTensor NeoN::SymmTensor::dev2 ( ) const
inline

dev2: S - (2/3)*tr(S)*I (used in viscous stress)

Definition at line 174 of file symmTensor.hpp.

◆ operator()() [1/2]

KOKKOS_INLINE_FUNCTION scalar & NeoN::SymmTensor::operator() ( const size_t  i,
const size_t  j 
)
inline

Definition at line 79 of file symmTensor.hpp.

◆ operator()() [2/2]

KOKKOS_INLINE_FUNCTION scalar NeoN::SymmTensor::operator() ( const size_t  i,
const size_t  j 
) const
inline

Component access — maps (i,j) to the stored upper-triangle.

Definition at line 70 of file symmTensor.hpp.

◆ operator*()

KOKKOS_INLINE_FUNCTION SymmTensor NeoN::SymmTensor::operator* ( const scalar  s) const
inline

Definition at line 138 of file symmTensor.hpp.

◆ operator*=()

KOKKOS_INLINE_FUNCTION SymmTensor & NeoN::SymmTensor::operator*= ( const scalar  s)
inline

Definition at line 149 of file symmTensor.hpp.

◆ operator+()

KOKKOS_INLINE_FUNCTION SymmTensor NeoN::SymmTensor::operator+ ( const SymmTensor rhs) const
inline

Definition at line 96 of file symmTensor.hpp.

◆ operator+=()

KOKKOS_INLINE_FUNCTION SymmTensor & NeoN::SymmTensor::operator+= ( const SymmTensor rhs)
inline

Definition at line 107 of file symmTensor.hpp.

◆ operator-()

KOKKOS_INLINE_FUNCTION SymmTensor NeoN::SymmTensor::operator- ( const SymmTensor rhs) const
inline

Definition at line 117 of file symmTensor.hpp.

◆ operator-=()

KOKKOS_INLINE_FUNCTION SymmTensor & NeoN::SymmTensor::operator-= ( const SymmTensor rhs)
inline

Definition at line 128 of file symmTensor.hpp.

◆ operator==()

KOKKOS_INLINE_FUNCTION bool NeoN::SymmTensor::operator== ( const SymmTensor rhs) const
inline

Definition at line 86 of file symmTensor.hpp.

◆ size()

KOKKOS_INLINE_FUNCTION constexpr size_t NeoN::SymmTensor::size ( ) const
inlineconstexpr

Definition at line 66 of file symmTensor.hpp.

◆ trace()

KOKKOS_INLINE_FUNCTION scalar NeoN::SymmTensor::trace ( ) const
inline

Trace: xx + yy + zz.

Definition at line 160 of file symmTensor.hpp.


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