vs Namespace Reference

Kynema-SGF API: kynema_sgf::vs Namespace Reference
Kynema-SGF API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
kynema_sgf::vs Namespace Reference

Classes

struct  DTraits
struct  DTraits< double >
struct  DTraits< float >
struct  DTraits< int >
struct  Quaternion
struct  TensorT
struct  VectorT

Typedefs

using Tensor = TensorT<amrex::Real>
using Vector = VectorT<amrex::Real>

Functions

amrex::Real dot (const Quaternion &a, const Quaternion &b)
Quaternion operator* (const Quaternion &lhs, const Quaternion &rhs)
 Rotation composition: apply rhs first, followed by lhs.
Tensor tensor (const Quaternion &input)
Quaternion from_roll_pitch_yaw (const Vector &angles)
Quaternion slerp (Quaternion a, Quaternion b, const amrex::Real fraction)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor tensor_unit (const Quaternion &q)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Quaternion from_axis_angle (const Vector &axis, const amrex::Real angle_degrees)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor quaternion (const Vector &axis, const amrex::Real angle_degrees)
 Compatibility interface for existing axis-angle tensor rotations.
template<typename T, typename OStream>
OStream & operator<< (OStream &out, const TensorT< T > &t)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > operator& (const TensorT< T > &t, const VectorT< T > &v)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > operator& (const VectorT< T > &v, const TensorT< T > &t)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TensorT< T > operator& (const TensorT< T > &t1, const TensorT< T > &t2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TensorT< T > operator+ (const TensorT< T > &t1, const TensorT< T > &t2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TensorT< T > operator- (const TensorT< T > &t1, const TensorT< T > &t2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T operator&& (const TensorT< T > &t1, const TensorT< T > &t2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T mag_sqr (const TensorT< T > &t)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T mag (const TensorT< T > &t)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor xrot (const amrex::Real angle)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor yrot (const amrex::Real angle)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor zrot (const amrex::Real angle)
template<typename T, typename OStream>
OStream & operator<< (OStream &out, const VectorT< T > &vec)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > operator+ (const VectorT< T > &v1, const VectorT< T > &v2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > operator- (const VectorT< T > &v1, const VectorT< T > &v2)
template<typename T1, typename T2>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T1 > operator* (const VectorT< T1 > &inp, const T2 fac)
template<typename T1, typename T2>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T1 > operator* (const T2 fac, const VectorT< T1 > &inp)
template<typename T1, typename T2>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T1 > operator/ (const VectorT< T1 > &inp, const T2 fac)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T operator& (const VectorT< T > &v1, const VectorT< T > &v2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > operator^ (const VectorT< T > &v1, const VectorT< T > &v2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > operator* (const VectorT< T > &v1, const VectorT< T > &v2)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T mag_sqr (const VectorT< T > &v)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T mag (const VectorT< T > &v)
template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > sqrt (const VectorT< T > &v)

Typedef Documentation

◆ Tensor

using kynema_sgf::vs::Tensor = TensorT<amrex::Real>

◆ Vector

using kynema_sgf::vs::Vector = VectorT<amrex::Real>

Function Documentation

◆ dot()

amrex::Real kynema_sgf::vs::dot ( const Quaternion & a,
const Quaternion & b )

◆ from_axis_angle()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Quaternion kynema_sgf::vs::from_axis_angle ( const Vector & axis,
const amrex::Real angle_degrees )

◆ from_roll_pitch_yaw()

Quaternion kynema_sgf::vs::from_roll_pitch_yaw ( const Vector & angles)

Construct Rz(yaw) Ry(pitch) Rx(roll), with angles in degrees.

◆ mag() [1/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T kynema_sgf::vs::mag ( const TensorT< T > & t)

◆ mag() [2/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T kynema_sgf::vs::mag ( const VectorT< T > & v)

◆ mag_sqr() [1/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T kynema_sgf::vs::mag_sqr ( const TensorT< T > & t)

◆ mag_sqr() [2/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T kynema_sgf::vs::mag_sqr ( const VectorT< T > & v)

◆ operator&() [1/4]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > kynema_sgf::vs::operator& ( const TensorT< T > & t,
const VectorT< T > & v )

◆ operator&() [2/4]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TensorT< T > kynema_sgf::vs::operator& ( const TensorT< T > & t1,
const TensorT< T > & t2 )

◆ operator&() [3/4]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > kynema_sgf::vs::operator& ( const VectorT< T > & v,
const TensorT< T > & t )

◆ operator&() [4/4]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T kynema_sgf::vs::operator& ( const VectorT< T > & v1,
const VectorT< T > & v2 )

◆ operator&&()

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T kynema_sgf::vs::operator&& ( const TensorT< T > & t1,
const TensorT< T > & t2 )

◆ operator*() [1/4]

Quaternion kynema_sgf::vs::operator* ( const Quaternion & lhs,
const Quaternion & rhs )

Rotation composition: apply rhs first, followed by lhs.

◆ operator*() [2/4]

template<typename T1, typename T2>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T1 > kynema_sgf::vs::operator* ( const T2 fac,
const VectorT< T1 > & inp )

◆ operator*() [3/4]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > kynema_sgf::vs::operator* ( const VectorT< T > & v1,
const VectorT< T > & v2 )

◆ operator*() [4/4]

template<typename T1, typename T2>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T1 > kynema_sgf::vs::operator* ( const VectorT< T1 > & inp,
const T2 fac )

◆ operator+() [1/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TensorT< T > kynema_sgf::vs::operator+ ( const TensorT< T > & t1,
const TensorT< T > & t2 )

◆ operator+() [2/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > kynema_sgf::vs::operator+ ( const VectorT< T > & v1,
const VectorT< T > & v2 )

◆ operator-() [1/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE TensorT< T > kynema_sgf::vs::operator- ( const TensorT< T > & t1,
const TensorT< T > & t2 )

◆ operator-() [2/2]

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > kynema_sgf::vs::operator- ( const VectorT< T > & v1,
const VectorT< T > & v2 )

◆ operator/()

template<typename T1, typename T2>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T1 > kynema_sgf::vs::operator/ ( const VectorT< T1 > & inp,
const T2 fac )

◆ operator<<() [1/2]

template<typename T, typename OStream>
OStream & kynema_sgf::vs::operator<< ( OStream & out,
const TensorT< T > & t )

◆ operator<<() [2/2]

template<typename T, typename OStream>
OStream & kynema_sgf::vs::operator<< ( OStream & out,
const VectorT< T > & vec )

◆ operator^()

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > kynema_sgf::vs::operator^ ( const VectorT< T > & v1,
const VectorT< T > & v2 )

◆ quaternion()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor kynema_sgf::vs::quaternion ( const Vector & axis,
const amrex::Real angle_degrees )

Compatibility interface for existing axis-angle tensor rotations.

◆ slerp()

Quaternion kynema_sgf::vs::slerp ( Quaternion a,
Quaternion b,
const amrex::Real fraction )

◆ sqrt()

template<typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT< T > kynema_sgf::vs::sqrt ( const VectorT< T > & v)

◆ tensor()

Tensor kynema_sgf::vs::tensor ( const Quaternion & input)

◆ tensor_unit()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor kynema_sgf::vs::tensor_unit ( const Quaternion & q)

◆ xrot()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor kynema_sgf::vs::xrot ( const amrex::Real angle)

◆ yrot()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor kynema_sgf::vs::yrot ( const amrex::Real angle)

◆ zrot()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Tensor kynema_sgf::vs::zrot ( const amrex::Real angle)