AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
Vector.hpp File Reference

Classes

class  axom::primal::Vector< T, NDIMS >
 Represents a vector, \( v \in \mathcal{R}^d \). It provides access methods for setting and querying the vector components as well as vector math operators, e.g., adding, subtracting, dot_product and cross_product. More...
 
class  axom::primal::Point< T, NDIMS >
 The point class represents a point, \( p \in \mathcal{R}^d \) . It provides access methods to set and query the point coordinates. More...
 
class  axom::primal::Vector< T, NDIMS >
 Represents a vector, \( v \in \mathcal{R}^d \). It provides access methods for setting and querying the vector components as well as vector math operators, e.g., adding, subtracting, dot_product and cross_product. More...
 

Namespaces

 axom
 
 axom::primal
 

Typedefs

Pre-defined Vector types
typedef Vector< double, 2 > axom::primal::Vector2D
 
typedef Vector< double, 3 > axom::primal::Vector3D
 

Functions

template<typename T , int NDIMS>
Vector< T, NDIMS > axom::primal::operator* (const Vector< T, NDIMS > &vec, const T scalar)
 Free functions involving vectors. More...
 
template<typename T , int NDIMS>
Vector< T, NDIMS > axom::primal::operator* (const T scalar, const Vector< T, NDIMS > &vec)
 Scalar multiplication of vector; Scalar on lhs. More...
 
template<typename T , int NDIMS>
Vector< T, NDIMS > axom::primal::operator+ (const Vector< T, NDIMS > &vec1, const Vector< T, NDIMS > &vec2)
 Adds vectors A, B and stores the result into a new vector C. More...
 
template<typename T , int NDIMS>
Vector< T, NDIMS > axom::primal::operator- (const Vector< T, NDIMS > &vec1, const Vector< T, NDIMS > &vec2)
 Subtracts vectors A, B and stores the result into a new vector C. More...
 
Forward Declared Overloaded Operators
template<typename T , int NDIMS>
AXOM_HOST_DEVICE Vector< T, NDIMS > axom::primal::operator+ (const Vector< T, NDIMS > &A, const Vector< T, NDIMS > &B)
 Adds vectors A, B and stores the result into a new vector C. More...
 
template<typename T , int NDIMS>
AXOM_HOST_DEVICE Point< T, NDIMS > axom::primal::operator+ (const Point< T, NDIMS > &P, const Vector< T, NDIMS > &V)
 Adds vector V to point P and stores the result into a new point. More...
 
template<typename T , int NDIMS>
AXOM_HOST_DEVICE Point< T, NDIMS > axom::primal::operator+ (const Vector< T, NDIMS > &V, const Point< T, NDIMS > &P)
 Adds vector V to point P and stores the result into a new point. More...
 
template<typename T , int NDIMS>
AXOM_HOST_DEVICE Vector< T, NDIMS > axom::primal::operator- (const Vector< T, NDIMS > &A, const Vector< T, NDIMS > &B)
 Subtracts vectors A, B and stores the result into a new vector C. More...
 
template<typename T , int NDIMS>
AXOM_HOST_DEVICE Vector< T, NDIMS > axom::primal::operator- (const Point< T, NDIMS > &h, const Point< T, NDIMS > &t)
 Subtracts Point t from Point h, yielding a vector. More...
 
template<typename T , int NDIMS>
Vector< T, NDIMS > axom::primal::operator- (const Vector< T, NDIMS > &vec1)
 Unary negation of a vector instance. More...
 
template<typename T , int NDIMS>
AXOM_HOST_DEVICE Vector< T, NDIMS > axom::primal::operator* (const Vector< T, NDIMS > &vec, const T scalar)
 Scalar multiplication of vector; Scalar on rhs. More...
 
template<typename T , int NDIMS>
AXOM_HOST_DEVICE Vector< T, NDIMS > axom::primal::operator* (const T scalar, const Vector< T, NDIMS > &vec)
 Scalar multiplication of vector; Scalar on lhs. More...
 
template<typename T , int NDIMS>
Vector< T, NDIMS > axom::primal::operator/ (const Vector< T, NDIMS > &vec, const T scalar)
 Scalar division of vector; Scalar on rhs. More...
 
template<typename T , int NDIMS>
std::ostream & axom::primal::operator<< (std::ostream &os, const Vector< T, NDIMS > &vec)
 Overloaded output operator for vectors. More...