AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
Vector.hpp File Reference
#include "axom/core/Macros.hpp"
#include "axom/core/numerics/Determinants.hpp"
#include "axom/core/numerics/matvecops.hpp"
#include "axom/core/utilities/Utilities.hpp"
#include "axom/fmt.hpp"
#include "axom/primal/constants.hpp"
#include "axom/primal/geometry/NumericArray.hpp"
#include "axom/primal/geometry/Point.hpp"
#include <cmath>

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...
 
struct  axom::fmt::formatter< axom::primal::Vector< T, NDIMS > >
 Overload to format a primal::Vector using fmt. More...
 

Namespaces

 axom
 
 axom::primal
 

Typedefs

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

Functions

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 Point< T, NDIMS > axom::primal::operator- (const Point< T, NDIMS > &P, const Vector< T, NDIMS > &V)
 Subtracts vector V from 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...