ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
Coord Class Reference

Class for a coordinate system object such as coordinates of the vertex or a vector. More...

#include <Coord.h>

Collaboration diagram for Coord:
[legend]

Public Member Functions

 Coord ()
 Coord (const double &x, const double &y=0., const double &z=0.)
 Coord constructor.
 ~Coord ()
void setXYZ (const double &x, const double &y, const double &z)
 Set the values of the Coord object.
void setX (const double &x)
 Set the value in the x-direction of the Coord object.
void setY (const double &y)
 Set the value in the y-direction of the Coord object.
void setZ (const double &z)
 Set the value in the z-direction of the Coord object.
const double & getX () const
 Return the value in the x-direction of the Coord object.
const double & getY () const
 Return the value in the y-direction of the Coord object.
const double & getZ () const
 Return the value in the z-direction of the Coord object.
double norm () const
 Return the value of the norm of the Coord object.
double squaredNorm () const
 Return the value of the squared norm of the Coord object.
Coord abs () const
 Return a Coord object with absolute values of each component.
double scalar (const Coord &a) const
 Scalar product between the present vector and vector a.
Coord scalar (const Tensor &t) const
 Scalar product between the present vector and a tensor t.
Coord cross (const Coord &a) const
 Cross product between the present vector and vector a.
void localProjection (const Coord &normal, const Coord &tangent, const Coord &binormal)
 Projection in the local coordinate system which is defined by the transmitted normal, tangent and binormal.
void reverseProjection (const Coord &normal, const Coord &tangent, const Coord &binormal)
 Reverse projection in the absolute Cartesian coordinate system.
void setFromSubtractedVectors (const Coord &a, const Coord &b)
 Set a vector from the result of the substraction of the vector a from the vector b.
void changeSign ()
 Change the sign if the present vector.
void normalized ()
 Divide the present vector by its norm.
void printInfo () const
 Print the information of the vector.
void buildRelativeVelForRiemannMRF (const Coord &omega, const Coord &normal, const Coord &tangent, const Coord &binormal, const Coord &position)
 Build relative velocity from absolute one (relevant with MRF only).
Coord & operator= (const double &scalar)
Coord & operator+= (const double &scalar)
Coord & operator-= (const double &scalar)
Coord & operator*= (const double &scalar)
Coord & operator/= (const double &scalar)
Coord operator* (const double &scalar) const
Coord operator/ (const double &scalar) const
Coord & operator+= (const Coord &a)
Coord & operator-= (const Coord &a)

Static Public Member Functions

static double scalarProduct (const Coord &v1, const Coord &v2)
 Return the scalar product bewteen two vectors.
static Coord crossProduct (const Coord &v1, const Coord &v2)
 Return the cross product bewteen two vectors.
static double determinant (const Coord &v1, const Coord &v2, const Coord &v3)
 Compute the determinant of the matrix formed by the vectors v1, v2 and v3.
static double cos (const Coord &v1, const Coord &v2)
 Compute some sort of cosinus between two vectors.
static Coord sin (const Coord &v1, const Coord &v2)
 Compute some sort of sinus between two vectors.

Static Public Attributes

static const Coord defaultCoord = Coord()
 Default Coord object (const version).
static Coord defaultCoordNonConst = Coord()
 Default Coord object (non-const version).

Protected Attributes

double m_x
double m_y
 Value in the x-direction.
double m_z
 Value in the y-direction.

Detailed Description

Class for a coordinate system object such as coordinates of the vertex or a vector.

Constructor & Destructor Documentation

◆ Coord() [1/2]

Coord::Coord ( )
Here is the caller graph for this function:

◆ Coord() [2/2]

Coord::Coord ( const double & x,
const double & y = 0.,
const double & z = 0. )

Coord constructor.

Parameters
xvalue of the x-direction coordinate
yvalue of the y-direction coordinate (if it is not assigned it is set to 0.)
zvalue of the z-direction coordinate (if it is not assigned it is set to 0.)

◆ ~Coord()

Coord::~Coord ( )

Member Function Documentation

◆ abs()

Coord Coord::abs ( ) const

Return a Coord object with absolute values of each component.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildRelativeVelForRiemannMRF()

void Coord::buildRelativeVelForRiemannMRF ( const Coord & omega,
const Coord & normal,
const Coord & tangent,
const Coord & binormal,
const Coord & position )

Build relative velocity from absolute one (relevant with MRF only).

Parameters
omegarotating velocity
normalface normal
tangentface tangent
binormalface binormal
positionface position
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSign()

void Coord::changeSign ( )

Change the sign if the present vector.

◆ cos()

double Coord::cos ( const Coord & v1,
const Coord & v2 )
static

Compute some sort of cosinus between two vectors.

Parameters
v1vector (Coord)
v2vector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cross()

Coord Coord::cross ( const Coord & a) const

Cross product between the present vector and vector a.

Parameters
avector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crossProduct()

Coord Coord::crossProduct ( const Coord & v1,
const Coord & v2 )
static

Return the cross product bewteen two vectors.

Parameters
v1vector (Coord)
v2vector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ determinant()

double Coord::determinant ( const Coord & v1,
const Coord & v2,
const Coord & v3 )
static

Compute the determinant of the matrix formed by the vectors v1, v2 and v3.

Parameters
v1vector (Coord)
v2vector (Coord)
v3vector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getX()

const double & Coord::getX ( ) const
inline

Return the value in the x-direction of the Coord object.

◆ getY()

const double & Coord::getY ( ) const
inline

Return the value in the y-direction of the Coord object.

◆ getZ()

const double & Coord::getZ ( ) const
inline

Return the value in the z-direction of the Coord object.

◆ localProjection()

void Coord::localProjection ( const Coord & normal,
const Coord & tangent,
const Coord & binormal )

Projection in the local coordinate system which is defined by the transmitted normal, tangent and binormal.

Parameters
normalnormal vector (Coord)
tangenttangent vector (Coord)
binormalbinormal vector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ norm()

double Coord::norm ( ) const

Return the value of the norm of the Coord object.

Here is the caller graph for this function:

◆ normalized()

void Coord::normalized ( )

Divide the present vector by its norm.

Here is the call graph for this function:

◆ operator*()

Coord Coord::operator* ( const double & scalar) const
Here is the call graph for this function:

◆ operator*=()

Coord & Coord::operator*= ( const double & scalar)
Here is the call graph for this function:

◆ operator+=() [1/2]

Coord & Coord::operator+= ( const Coord & a)
Here is the call graph for this function:

◆ operator+=() [2/2]

Coord & Coord::operator+= ( const double & scalar)
Here is the call graph for this function:

◆ operator-=() [1/2]

Coord & Coord::operator-= ( const Coord & a)
Here is the call graph for this function:

◆ operator-=() [2/2]

Coord & Coord::operator-= ( const double & scalar)
Here is the call graph for this function:

◆ operator/()

Coord Coord::operator/ ( const double & scalar) const
Here is the call graph for this function:

◆ operator/=()

Coord & Coord::operator/= ( const double & scalar)
Here is the call graph for this function:

◆ operator=()

Coord & Coord::operator= ( const double & scalar)
Here is the call graph for this function:

◆ printInfo()

void Coord::printInfo ( ) const

Print the information of the vector.

◆ reverseProjection()

void Coord::reverseProjection ( const Coord & normal,
const Coord & tangent,
const Coord & binormal )

Reverse projection in the absolute Cartesian coordinate system.

Parameters
normalnormal vector (Coord)
tangenttangent vector (Coord)
binormalbinormal vector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scalar() [1/2]

double Coord::scalar ( const Coord & a) const

Scalar product between the present vector and vector a.

Parameters
avector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scalar() [2/2]

Coord Coord::scalar ( const Tensor & t) const

Scalar product between the present vector and a tensor t.

Parameters
ttensor (tensor)
Here is the call graph for this function:

◆ scalarProduct()

double Coord::scalarProduct ( const Coord & v1,
const Coord & v2 )
static

Return the scalar product bewteen two vectors.

Parameters
v1vector (Coord)
v2vector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFromSubtractedVectors()

void Coord::setFromSubtractedVectors ( const Coord & a,
const Coord & b )

Set a vector from the result of the substraction of the vector a from the vector b.

Parameters
avector (Coord)
bvector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setX()

void Coord::setX ( const double & x)

Set the value in the x-direction of the Coord object.

Parameters
xvalue of the x-direction coordinate
Here is the caller graph for this function:

◆ setXYZ()

void Coord::setXYZ ( const double & x,
const double & y,
const double & z )

Set the values of the Coord object.

Parameters
xvalue of the x-direction coordinate
yvalue of the y-direction coordinate
zvalue of the z-direction coordinate
Here is the caller graph for this function:

◆ setY()

void Coord::setY ( const double & y)

Set the value in the y-direction of the Coord object.

Parameters
yvalue of the y-direction coordinate
Here is the caller graph for this function:

◆ setZ()

void Coord::setZ ( const double & z)

Set the value in the z-direction of the Coord object.

Parameters
zvalue of the z-direction coordinate
Here is the caller graph for this function:

◆ sin()

Coord Coord::sin ( const Coord & v1,
const Coord & v2 )
static

Compute some sort of sinus between two vectors.

Parameters
v1vector (Coord)
v2vector (Coord)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ squaredNorm()

double Coord::squaredNorm ( ) const

Return the value of the squared norm of the Coord object.

Here is the caller graph for this function:

Member Data Documentation

◆ defaultCoord

const Coord Coord::defaultCoord = Coord()
static

Default Coord object (const version).

Used when returning a const Coord&

◆ defaultCoordNonConst

Coord Coord::defaultCoordNonConst = Coord()
static

Default Coord object (non-const version).

Used when returning a const Coord&

◆ m_x

double Coord::m_x
protected

◆ m_y

double Coord::m_y
protected

Value in the x-direction.

◆ m_z

double Coord::m_z
protected

Value in the y-direction.


The documentation for this class was generated from the following files:
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Maths/Coord.h
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Maths/Coord.cpp