VectorT< T > Struct Template Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
Loading...
Searching...
No Matches
Public Types |
Public Member Functions |
Static Public Member Functions |
Public Attributes |
Static Public Attributes |
List of all members
amr_wind::vs::VectorT< T > Struct Template Reference
#include <vector.H>
Inheritance diagram for amr_wind::vs::VectorT< T >:
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> |
using | VType = VectorT<T> |
Public Member Functions | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE | VectorT ()=default |
Construct a default vector, all components set to zero. | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE | VectorT (const T &x, const T &y, const T &z) |
~VectorT ()=default | |
VectorT (const VectorT &)=default | |
VectorT (VectorT &&)=default | |
VectorT & | operator= (const VectorT &) &=default |
VectorT & | operator= (const VectorT &) &&=delete |
VectorT & | operator= (VectorT &&) &=default |
VectorT & | operator= (VectorT &&) &&=delete |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > & | normalize () |
Normalize the vector to unit vector. | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > | sqrt (const VectorT &) |
Sqrt of each component. | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > | unit () const |
Return the unit vector parallel to this vector. | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & | x () &noexcept |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & | y () &noexcept |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T & | z () &noexcept |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & | x () const &noexcept |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & | y () const &noexcept |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const T & | z () const &noexcept |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > | operator- () const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > | operator*= (const T val) |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > | operator*= (const VectorT< T > &valvec) |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > | operator/= (const T val) |
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 VectorT< T > | zero () |
Zero vector. | |
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr VectorT< T > | one () |
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr VectorT< T > | ihat (const T &x=Traits::one()) |
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr VectorT< T > | jhat (const T &y=Traits::one()) |
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr VectorT< T > | khat (const T &z=Traits::one()) |
Public Attributes | |
amrex::GpuArray< T, 3 > | vv = {Traits::zero(), Traits::zero(), Traits::zero()} |
Static Public Attributes | |
static constexpr int | ncomp = 3 |
Number of components. | |
Detailed Description
template<typename T>
struct amr_wind::vs::VectorT< T >
struct amr_wind::vs::VectorT< T >
Vector in 3D space
Member Typedef Documentation
◆ const_iterator
template<typename T >
using amr_wind::vs::VectorT< T >::const_iterator = const T* |
◆ iterator
template<typename T >
using amr_wind::vs::VectorT< T >::iterator = T* |
◆ reference
template<typename T >
using amr_wind::vs::VectorT< T >::reference = T& |
◆ size_type
template<typename T >
using amr_wind::vs::VectorT< T >::size_type = int |
◆ Traits
template<typename T >
using amr_wind::vs::VectorT< T >::Traits = DTraits<T> |
◆ value_type
template<typename T >
using amr_wind::vs::VectorT< T >::value_type = T |
◆ VType
template<typename T >
using amr_wind::vs::VectorT< T >::VType = VectorT<T> |
Constructor & Destructor Documentation
◆ VectorT() [1/4]
template<typename T >
|
default |
Construct a default vector, all components set to zero.
◆ VectorT() [2/4]
template<typename T >
|
inline |
New vector given the three components
◆ ~VectorT()
template<typename T >
|
default |
◆ VectorT() [3/4]
template<typename T >
|
default |
◆ VectorT() [4/4]
template<typename T >
|
default |
Member Function Documentation
◆ begin()
template<typename T >
|
inlinenoexcept |
◆ cbegin()
template<typename T >
|
inlinenoexcept |
◆ cend()
template<typename T >
|
inlinenoexcept |
◆ data() [1/2]
template<typename T >
|
inlinenoexcept |
◆ data() [2/2]
template<typename T >
|
inlinenoexcept |
◆ end()
template<typename T >
|
inlinenoexcept |
◆ ihat()
template<typename T >
|
inlinestaticconstexpr |
Vector along x-axis
- Parameters
-
x Magnitude of vector
◆ jhat()
template<typename T >
|
inlinestaticconstexpr |
Vector along y-axis
- Parameters
-
y Magnitude of vector
◆ khat()
template<typename T >
|
inlinestaticconstexpr |
Vector along z-axis
- Parameters
-
z Magnitude of vector
◆ normalize()
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > & amr_wind::vs::VectorT< T >::normalize | ( | ) |
Normalize the vector to unit vector.
◆ one()
template<typename T >
|
inlinestaticconstexpr |
◆ operator*=() [1/2]
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::VectorT< T >::operator*= | ( | const T | val | ) |
◆ operator*=() [2/2]
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::VectorT< T >::operator*= | ( | const VectorT< T > & | valvec | ) |
◆ operator-()
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::VectorT< T >::operator- | ( | ) | const |
◆ operator/=()
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::VectorT< T >::operator/= | ( | const T | val | ) |
◆ operator=() [1/4]
template<typename T >
|
delete |
◆ operator=() [2/4]
template<typename T >
|
default |
◆ operator=() [3/4]
template<typename T >
|
delete |
◆ operator=() [4/4]
template<typename T >
|
default |
◆ operator[]() [1/2]
template<typename T >
|
inline |
◆ operator[]() [2/2]
template<typename T >
|
inline |
◆ size()
template<typename T >
|
inlinenoexcept |
◆ sqrt()
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > amr_wind::vs::VectorT< T >::sqrt | ( | const VectorT< T > & | ) |
Sqrt of each component.
◆ unit()
template<typename T >
|
inline |
Return the unit vector parallel to this vector.
◆ x() [1/2]
template<typename T >
|
inlinenoexcept |
◆ x() [2/2]
template<typename T >
|
inlinenoexcept |
◆ y() [1/2]
template<typename T >
|
inlinenoexcept |
◆ y() [2/2]
template<typename T >
|
inlinenoexcept |
◆ z() [1/2]
template<typename T >
|
inlinenoexcept |
◆ z() [2/2]
template<typename T >
|
inlinenoexcept |
◆ zero()
template<typename T >
|
inlinestaticconstexpr |
Zero vector.
Member Data Documentation
◆ ncomp
template<typename T >
|
staticconstexpr |
Number of components.
◆ vv
template<typename T >
amrex::GpuArray<T, 3> amr_wind::vs::VectorT< T >::vv = {Traits::zero(), Traits::zero(), Traits::zero()} |
The documentation for this struct was generated from the following files:
Generated by 1.12.0