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.
 
double dot (const Vector< double > &a, const Vector< double > &b)
 Probably not always best/fastest because not optimised for dimension but useful...
 
double magnitude (const Vector< double > &a)
 Get the magnitude of a vector.
 
double angle (const Vector< double > &a, const Vector< double > &b)
 Get the angle between two vector.
 
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).
 
Vector< doublecross (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.
 

Detailed Description

Namespace for helper functions for Vector<double>

Function Documentation

◆ angle()

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

Get the angle between two vector.

Definition at line 309 of file Vector.h.

References dot().

Referenced by 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 
)
inlineprivate

Check the lengths if two Vectors are the same length.

Definition at line 271 of file Vector.h.

References oomph::FiniteElement::size().

Referenced by dot().

◆ cross() [1/2]

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

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 cross().

◆ cross() [2/2]

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

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

Definition at line 319 of file Vector.h.

References oomph::FiniteElement::size().

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 
)
inlineprivate

Probably not always best/fastest because not optimised for dimension but useful...

Definition at line 291 of file Vector.h.

References check_lengths_match(), i, and oomph::FiniteElement::size().

Referenced by angle(), oomph::FaceElement::continuous_tangent_and_outer_unit_normal(), and magnitude().

◆ magnitude()

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

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().