Functions
oomph::VectorHelpers Namespace Reference

Namespace for helper functions for Vector<double> More...

Functions

void check_lengths_match (const Vector< double > &a, const Vector< double > &b)
 Check the lengths if two Vectors are the same length. More...
 
double dot (const Vector< double > &a, const Vector< double > &b)
 Probably not always best/fastest because not optimised for dimension but useful... More...
 
double magnitude (const Vector< double > &a)
 Get the magnitude of a vector. More...
 
double angle (const Vector< double > &a, const Vector< double > &b)
 Get the angle between two vector. More...
 
void cross (const Vector< double > &A, const Vector< double > &B, Vector< double > &C)
 Cross product using "proper" output (move semantics means this is ok nowadays). More...
 
Vector< double > cross (const Vector< double > &A, const Vector< double > &B)
 Cross product using "proper" output (move semantics means this is ok This calls the other cross(...) function. More...
 

Detailed Description

Namespace for helper functions for Vector<double>

Function Documentation

◆ angle()

double oomph::VectorHelpers::angle ( const Vector< double > &  a,
const Vector< double > &  b 
)
inline

Get the angle between two vector.

Definition at line 309 of file Vector.h.

References dot().

Referenced by oomph::OcTree::construct_rotation_matrix(), and oomph::FaceElement::continuous_tangent_and_outer_unit_normal().

◆ check_lengths_match()

void oomph::VectorHelpers::check_lengths_match ( const Vector< double > &  a,
const Vector< double > &  b 
)
inline

Check the lengths if two Vectors are the same length.

Definition at line 271 of file Vector.h.

Referenced by dot().

◆ cross() [1/2]

Vector<double> oomph::VectorHelpers::cross ( const Vector< double > &  A,
const Vector< double > &  B 
)
inline

Cross product using "proper" output (move semantics means this is ok This calls the other cross(...) function.

Definition at line 344 of file Vector.h.

References oomph::OcTreeNames::B, cross(), and oomph::CommandLineArgs::output().

◆ cross() [2/2]

void oomph::VectorHelpers::cross ( const Vector< double > &  A,
const Vector< double > &  B,
Vector< double > &  C 
)
inline

Cross product using "proper" output (move semantics means this is ok nowadays).

Definition at line 319 of file Vector.h.

References oomph::OcTreeNames::B.

Referenced by oomph::FaceElement::continuous_tangent_and_outer_unit_normal(), cross(), and oomph::FaceElement::outer_unit_normal().

◆ dot()

double oomph::VectorHelpers::dot ( const Vector< double > &  a,
const Vector< double > &  b 
)
inline

◆ magnitude()

double oomph::VectorHelpers::magnitude ( const Vector< double > &  a)
inline

Get the magnitude of a vector.

Definition at line 303 of file Vector.h.

References dot().

Referenced by oomph::FaceElement::continuous_tangent_and_outer_unit_normal(), and oomph::FaceElement::outer_unit_normal().