TensorT< T > Struct Template Reference

AMR-Wind API: amr_wind::vs::TensorT< T > Struct Template Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <tensor.H>

Public Types

using size_type = int
 
using value_type = T
 
using reference = T&
 
using iterator = T*
 
using const_iterator = const T*
 
using Traits = DTraits<T>
 

Public Member Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE constexpr TensorT ()=default
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE constexpr TensorT (const T &xx, const T &xy, const T &xz, const T &yx, const T &yy, const T &yz, const T &zx, const T &zy, const T &zz)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TensorT (const VectorT< T > &x, const VectorT< T > &y, const VectorT< T > &z, const bool transpose=false)
 
 ~TensorT ()=default
 
 TensorT (const TensorT &)=default
 
 TensorT (TensorT &&)=default
 
TensorToperator= (const TensorT &) &=default
 
TensorToperator= (const TensorT &) &&=delete
 
TensorToperator= (TensorT &&) &=default
 
TensorToperator= (TensorT &&) &&=delete
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void rows (const VectorT< T > &x, const VectorT< T > &y, const VectorT< T > &z) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void cols (const VectorT< T > &x, const VectorT< T > &y, const VectorT< T > &z) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > x () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > y () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > z () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > cx () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > cy () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > cz () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & xx () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & xy () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & xz () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & yx () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & yy () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & yz () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & zx () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & zy () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & zz () &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & xx () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & xy () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & xz () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & yx () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & yy () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & yz () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & zx () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & zy () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & zz () const &noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & operator[] (size_type pos) &
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & operator[] (size_type pos) const &
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * data () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T * data () const noexcept
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
size_type size () const noexcept
 

Static Public Member Functions

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr TensorT< T > zero () noexcept
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr TensorT< T > identity () noexcept
 

Public Attributes

amrex::GpuArray< T, 9 > vv
 

Static Public Attributes

static constexpr int ncomp = 9
 

Detailed Description

template<typename T>
struct amr_wind::vs::TensorT< T >

Tensor in 3D vector space

Member Typedef Documentation

◆ const_iterator

template<typename T >
using amr_wind::vs::TensorT< T >::const_iterator = const T*

◆ iterator

template<typename T >
using amr_wind::vs::TensorT< T >::iterator = T*

◆ reference

template<typename T >
using amr_wind::vs::TensorT< T >::reference = T&

◆ size_type

template<typename T >
using amr_wind::vs::TensorT< T >::size_type = int

◆ Traits

template<typename T >
using amr_wind::vs::TensorT< T >::Traits = DTraits<T>

◆ value_type

template<typename T >
using amr_wind::vs::TensorT< T >::value_type = T

Constructor & Destructor Documentation

◆ TensorT() [1/5]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE constexpr amr_wind::vs::TensorT< T >::TensorT ( )
constexprdefault

◆ TensorT() [2/5]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE constexpr amr_wind::vs::TensorT< T >::TensorT ( const T & xx,
const T & xy,
const T & xz,
const T & yx,
const T & yy,
const T & yz,
const T & zx,
const T & zy,
const T & zz )
inlineconstexpr

◆ TensorT() [3/5]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amr_wind::vs::TensorT< T >::TensorT ( const VectorT< T > & x,
const VectorT< T > & y,
const VectorT< T > & z,
const bool transpose = false )

◆ ~TensorT()

template<typename T >
amr_wind::vs::TensorT< T >::~TensorT ( )
default

◆ TensorT() [4/5]

template<typename T >
amr_wind::vs::TensorT< T >::TensorT ( const TensorT< T > & )
default

◆ TensorT() [5/5]

template<typename T >
amr_wind::vs::TensorT< T >::TensorT ( TensorT< T > && )
default

Member Function Documentation

◆ begin()

template<typename T >
iterator amr_wind::vs::TensorT< T >::begin ( )
inlinenoexcept

◆ cbegin()

template<typename T >
const_iterator amr_wind::vs::TensorT< T >::cbegin ( ) const
inlinenoexcept

◆ cend()

template<typename T >
const_iterator amr_wind::vs::TensorT< T >::cend ( ) const
inlinenoexcept

◆ cols()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::vs::TensorT< T >::cols ( const VectorT< T > & x,
const VectorT< T > & y,
const VectorT< T > & z )
noexcept

◆ cx()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::TensorT< T >::cx ( ) const
noexcept

◆ cy()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::TensorT< T >::cy ( ) const
noexcept

◆ cz()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::TensorT< T >::cz ( ) const
noexcept

◆ data() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T * amr_wind::vs::TensorT< T >::data ( ) const
inlinenoexcept

◆ data() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * amr_wind::vs::TensorT< T >::data ( )
inlinenoexcept

◆ end()

template<typename T >
iterator amr_wind::vs::TensorT< T >::end ( )
inlinenoexcept

◆ identity()

template<typename T >
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr TensorT< T > amr_wind::vs::TensorT< T >::identity ( )
inlinestaticconstexprnoexcept

◆ operator=() [1/4]

template<typename T >
TensorT & amr_wind::vs::TensorT< T >::operator= ( const TensorT< T > & ) &&
delete

◆ operator=() [2/4]

template<typename T >
TensorT & amr_wind::vs::TensorT< T >::operator= ( const TensorT< T > & ) &
default

◆ operator=() [3/4]

template<typename T >
TensorT & amr_wind::vs::TensorT< T >::operator= ( TensorT< T > && ) &&
delete

◆ operator=() [4/4]

template<typename T >
TensorT & amr_wind::vs::TensorT< T >::operator= ( TensorT< T > && ) &
default

◆ operator[]() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::operator[] ( size_type pos) &
inline

◆ operator[]() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::operator[] ( size_type pos) const &
inline

◆ rows()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::vs::TensorT< T >::rows ( const VectorT< T > & x,
const VectorT< T > & y,
const VectorT< T > & z )
noexcept

◆ size()

template<typename T >
size_type amr_wind::vs::TensorT< T >::size ( ) const
inlinenoexcept

◆ x()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::TensorT< T >::x ( ) const
noexcept

◆ xx() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::xx ( ) &
inlinenoexcept

◆ xx() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::xx ( ) const &
inlinenoexcept

◆ xy() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::xy ( ) &
inlinenoexcept

◆ xy() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::xy ( ) const &
inlinenoexcept

◆ xz() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::xz ( ) &
inlinenoexcept

◆ xz() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::xz ( ) const &
inlinenoexcept

◆ y()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::TensorT< T >::y ( ) const
noexcept

◆ yx() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::yx ( ) &
inlinenoexcept

◆ yx() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::yx ( ) const &
inlinenoexcept

◆ yy() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::yy ( ) &
inlinenoexcept

◆ yy() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::yy ( ) const &
inlinenoexcept

◆ yz() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::yz ( ) &
inlinenoexcept

◆ yz() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::yz ( ) const &
inlinenoexcept

◆ z()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::TensorT< T >::z ( ) const
noexcept

◆ zero()

template<typename T >
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr TensorT< T > amr_wind::vs::TensorT< T >::zero ( )
inlinestaticconstexprnoexcept

◆ zx() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::zx ( ) &
inlinenoexcept

◆ zx() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::zx ( ) const &
inlinenoexcept

◆ zy() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::zy ( ) &
inlinenoexcept

◆ zy() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::zy ( ) const &
inlinenoexcept

◆ zz() [1/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & amr_wind::vs::TensorT< T >::zz ( ) &
inlinenoexcept

◆ zz() [2/2]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & amr_wind::vs::TensorT< T >::zz ( ) const &
inlinenoexcept

Member Data Documentation

◆ ncomp

template<typename T >
int amr_wind::vs::TensorT< T >::ncomp = 9
staticconstexpr

◆ vv

template<typename T >
amrex::GpuArray<T, 9> amr_wind::vs::TensorT< T >::vv
Initial value:
= {Traits::zero(), Traits::zero(), Traits::zero(),
Traits::zero(), Traits::zero(), Traits::zero(),
Traits::zero(), Traits::zero(), Traits::zero()}

The documentation for this struct was generated from the following files:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/core/vs/tensor.H
  • /home/runner/work/amr-wind/amr-wind/amr-wind/core/vs/tensorI.H