Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
alsutils::vec3< T > Struct Template Reference

#include <alsutils/vec3.hpp>

Public Member Functions

__device__ __host__ vec3 ()
 
__device__ __host__ vec3 (T t)
 
__device__ __host__ vec3 (T x, T y, T z)
 
__device__ __host__ vec3 (T x, vec1< T > y, T z)
 
__device__ __host__ vec3 (const vec3< T &> &other)
 
template<class S >
__device__ __host__ vec3operator= (const vec3< S > &other)
 
__device__ __host__ bool operator== (const vec3 &other) const
 
template<class S >
__device__ __host__ vec3< S > convert () const
 
__device__ __host__ const T & operator[] (size_t i) const
 
__device__ __host__ T & operator[] (size_t i)
 
__device__ __host__dot (const vec3< T > &other) const
 
template<class S >
__device__ __host__ vec3< T > & operator+= (const vec3< S > &b)
 
__host__ std::string str () const
 

Static Public Member Functions

__device__ static __host__ constexpr size_t size ()
 

Public Attributes

x
 
y
 
z
 

Detailed Description

template<class T>
struct alsutils::vec3< T >

Small vector class to hold 3D data

Constructor & Destructor Documentation

◆ vec3() [1/5]

template<class T>
__device__ __host__ alsutils::vec3< T >::vec3 ( )
inline

◆ vec3() [2/5]

template<class T>
__device__ __host__ alsutils::vec3< T >::vec3 ( t)
inline

◆ vec3() [3/5]

template<class T>
__device__ __host__ alsutils::vec3< T >::vec3 ( x,
y,
z 
)
inline

◆ vec3() [4/5]

template<class T>
__device__ __host__ alsutils::vec3< T >::vec3 ( x,
vec1< T >  y,
z 
)
inline

◆ vec3() [5/5]

template<class T>
__device__ __host__ alsutils::vec3< T >::vec3 ( const vec3< T &> &  other)
inline

Member Function Documentation

◆ convert()

template<class T>
template<class S >
__device__ __host__ vec3<S> alsutils::vec3< T >::convert ( ) const
inline

Converts the vector to the other type

◆ dot()

template<class T>
__device__ __host__ T alsutils::vec3< T >::dot ( const vec3< T > &  other) const
inline

Computes the dot (scalar) product

◆ operator+=()

template<class T>
template<class S >
__device__ __host__ vec3<T>& alsutils::vec3< T >::operator+= ( const vec3< S > &  b)
inline

◆ operator=()

template<class T>
template<class S >
__device__ __host__ vec3& alsutils::vec3< T >::operator= ( const vec3< S > &  other)
inline

◆ operator==()

template<class T>
__device__ __host__ bool alsutils::vec3< T >::operator== ( const vec3< T > &  other) const
inline

◆ operator[]() [1/2]

template<class T>
__device__ __host__ const T& alsutils::vec3< T >::operator[] ( size_t  i) const
inline

Returns the i-th component of the vector.

◆ operator[]() [2/2]

template<class T>
__device__ __host__ T& alsutils::vec3< T >::operator[] ( size_t  i)
inline

Returns the i-th component of the vector.

◆ size()

template<class T>
__device__ static __host__ constexpr size_t alsutils::vec3< T >::size ( )
inlinestatic

Returns 3 (number of components)

◆ str()

template<class T >
__host__ std::string alsutils::vec3< T >::str ( ) const
inline

Member Data Documentation

◆ x

template<class T>
T alsutils::vec3< T >::x

◆ y

template<class T>
T alsutils::vec3< T >::y

◆ z

template<class T>
T alsutils::vec3< T >::z

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