AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::inlet::InletVector Struct Reference

A wrapper over Primal's Vector3D that also includes dimension information. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/inlet/InletVector.hpp>

Public Member Functions

 InletVector ()=default
 Constructs an empty vector (size defaults to 3) More...
 
 InletVector (std::initializer_list< double > values)
 Constructs a vector with an initializer list. More...
 
 InletVector (primal::Vector3D &&v, int d=3)
 Constructs a vector with an existing Primal vector and a dimension. More...
 
 InletVector (const double *values, int d=3)
 Constructs a vector with a pointer and a dimension. More...
 
double operator[] (const int i) const
 Retrieves an element of the vector. More...
 
double & operator[] (const int i)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
 operator axom::primal::Vector3D & ()
 Retrieves the underlying Primal vector. More...
 
 operator const axom::primal::Vector3D & () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Public Attributes

primal::Vector3D vec
 
int dim = 3
 

Detailed Description

A wrapper over Primal's Vector3D that also includes dimension information.

Vector3D is a statically-sized (stack-allocated) three-element vector. To represent two-element vectors using this type, additional dimension information is required

Note
To use vector operations on this class, perform them using the vec member directly

Constructor & Destructor Documentation

◆ InletVector() [1/4]

axom::inlet::InletVector::InletVector ( )
default

Constructs an empty vector (size defaults to 3)

◆ InletVector() [2/4]

axom::inlet::InletVector::InletVector ( std::initializer_list< double >  values)
inline

Constructs a vector with an initializer list.

Parameters
[in]valuesThe vector components to construct with

◆ InletVector() [3/4]

axom::inlet::InletVector::InletVector ( primal::Vector3D &&  v,
int  d = 3 
)
inlineexplicit

Constructs a vector with an existing Primal vector and a dimension.

Parameters
[in]vThe existing Primal vector
[in]dThe dimension of the vector

◆ InletVector() [4/4]

axom::inlet::InletVector::InletVector ( const double *  values,
int  d = 3 
)
inlineexplicit

Constructs a vector with a pointer and a dimension.

Parameters
[in]valuesThe pointer to the vector data
[in]dThe dimension of the vector (length of the data)
Note
Data is copied from the pointer - lifetime of the constructed InletVector is not dependent on the lifetime of the pointer.

Member Function Documentation

◆ operator[]() [1/2]

double axom::inlet::InletVector::operator[] ( const int  i) const
inline

Retrieves an element of the vector.

Parameters
[in]iThe index of the element to retrieve (zero-indexed)

References vec.

◆ operator[]() [2/2]

double& axom::inlet::InletVector::operator[] ( const int  i)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References vec.

◆ operator axom::primal::Vector3D &()

axom::inlet::InletVector::operator axom::primal::Vector3D & ( )
inline

Retrieves the underlying Primal vector.

References vec.

◆ operator const axom::primal::Vector3D &()

axom::inlet::InletVector::operator const axom::primal::Vector3D & ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References vec.

Member Data Documentation

◆ vec

primal::Vector3D axom::inlet::InletVector::vec

◆ dim

int axom::inlet::InletVector::dim = 3

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