Documentation 6b54b78464
Loading...
Searching...
No Matches
CEdge Class Reference

Class for defining the edges of the dual grid. More...

#include <CEdge.hpp>

Public Types

enum  NodePosition : unsigned long { LEFT = 0 , RIGHT = 1 }
 

Public Member Functions

 CEdge (unsigned long nEdge, unsigned long nDim)
 Constructor of the class.
 
 CEdge ()=delete
 No default construction.
 
unsigned long GetNode (unsigned long iEdge, unsigned long iNode) const
 Get left/right node index defining the edge.
 
template<class T , size_t N>
simd::Array< T, N > GetNode (simd::Array< T, N > iEdge, unsigned long iNode) const
 SIMD version of GetNode, iNode returned for contiguous iEdges.
 
void SetPaddingNodes ()
 Sets the tail of "Nodes" to repeat one of the last edges.
 
void SetNodes (unsigned long iEdge, unsigned long iPoint, unsigned long jPoint)
 Set the node indices of an edge.
 
unsigned long GetnNodes () const
 Get the number of nodes of an edge (2).
 
void SetNodes_Coord (unsigned long iEdge, const su2double *coord_Edge_CG, const su2double *coord_FaceElem_CG, const su2double *coord_Elem_CG)
 Set the face that corresponds to an edge (3D version).
 
void SetNodes_Coord (unsigned long iEdge, const su2double *coord_Edge_CG, const su2double *coord_Elem_CG)
 Set the face that corresponds to an edge (2D version).
 
template<class T >
void GetNormal (unsigned long iEdge, T &normal) const
 Copy the the normal vector of a face.
 
const su2double * GetNormal (unsigned long iEdge) const
 Get the normal to a face of the control volume asociated with an edge.
 
const su2activematrix & GetNormal () const
 Get the entire matrix of edge normals.
 
void SetZeroValues (void)
 Initialize normal vector to 0.
 
template<class T >
void SetNormal (unsigned long iEdge, const T &normal)
 Set the normal vector of an edge.
 
template<class T >
void AddNormal (unsigned long iEdge, const T &normal)
 Add a vector to the normal vector of an edge.
 
template<class T >
void SubNormal (unsigned long iEdge, const T &normal)
 Subtract a vector to the normal vector of an edge.
 

Static Public Member Functions

static su2double GetVolume (const su2double *coord_Edge_CG, const su2double *coord_FaceElem_CG, const su2double *coord_Elem_CG, const su2double *coord_Point)
 Compute the volume associated with an edge (3D version).
 
static su2double GetVolume (const su2double *coord_Edge_CG, const su2double *coord_Elem_CG, const su2double *coord_Point)
 Compute the volume associated with an edge (2D version).
 

Friends

class CPhysicalGeometry
 

Detailed Description

Class for defining the edges of the dual grid.

Author
F. Palacios

Member Enumeration Documentation

◆ NodePosition

enum CEdge::NodePosition : unsigned long
Enumerator
LEFT 
RIGHT 

Constructor & Destructor Documentation

◆ CEdge() [1/2]

CEdge::CEdge ( unsigned long  nEdge,
unsigned long  nDim 
)

Constructor of the class.

Parameters
[in]nEdge- Number of edges
[in]nDim- Number of dimensions of the problem.

◆ CEdge() [2/2]

CEdge::CEdge ( )
delete

No default construction.

Member Function Documentation

◆ AddNormal()

template<class T >
void CEdge::AddNormal ( unsigned long  iEdge,
const T &  normal 
)
inline

Add a vector to the normal vector of an edge.

Parameters
[in]iEdge- Edge index.
[in]normal- Vector to add to the normal vector.

◆ GetnNodes()

unsigned long CEdge::GetnNodes ( ) const
inline

Get the number of nodes of an edge (2).

◆ GetNode() [1/2]

template<class T , size_t N>
simd::Array< T, N > CEdge::GetNode ( simd::Array< T, N >  iEdge,
unsigned long  iNode 
) const
inline

SIMD version of GetNode, iNode returned for contiguous iEdges.

◆ GetNode() [2/2]

unsigned long CEdge::GetNode ( unsigned long  iEdge,
unsigned long  iNode 
) const
inline

Get left/right node index defining the edge.

Parameters
[in]iEdge- Edge index.
[in]iNode- Node index 0 or 1, LEFT or RIGHT.
Returns
Index of the node that composes the edge.

◆ GetNormal() [1/3]

const su2activematrix & CEdge::GetNormal ( ) const
inline

Get the entire matrix of edge normals.

◆ GetNormal() [2/3]

const su2double * CEdge::GetNormal ( unsigned long  iEdge) const
inline

Get the normal to a face of the control volume asociated with an edge.

Parameters
[in]iEdge- Edge index.
Returns
Dimensional normal vector, the modulus is the area of the face.

◆ GetNormal() [3/3]

template<class T >
void CEdge::GetNormal ( unsigned long  iEdge,
T &  normal 
) const
inline

Copy the the normal vector of a face.

Parameters
[in]iEdge- Edge index.
[out]normal- Object into which the normal (dimensional) will be copied.

◆ GetVolume() [1/2]

su2double CEdge::GetVolume ( const su2double *  coord_Edge_CG,
const su2double *  coord_Elem_CG,
const su2double *  coord_Point 
)
static

Compute the volume associated with an edge (2D version).

Parameters
[in]coord_Edge_CG- Coordinates of the centre of gravity of the edge.
[in]coord_Elem_CG- Coordinates of the centre of gravity of the element.
[in]coord_Point- Coordinates of the point that form the control volume.
Returns
Local volume associated to the edge.

◆ GetVolume() [2/2]

su2double CEdge::GetVolume ( const su2double *  coord_Edge_CG,
const su2double *  coord_FaceElem_CG,
const su2double *  coord_Elem_CG,
const su2double *  coord_Point 
)
static

Compute the volume associated with an edge (3D version).

Parameters
[in]coord_Edge_CG- Coordinates of the centre of gravity of the edge.
[in]coord_FaceElem_CG- Coordinates of the centre of gravity of the face of an element.
[in]coord_Elem_CG- Coordinates of the centre of gravity of the element.
[in]coord_Point- Coordinates of the point that form the control volume.
Returns
Local volume associated to the edge.

◆ SetNodes()

void CEdge::SetNodes ( unsigned long  iEdge,
unsigned long  iPoint,
unsigned long  jPoint 
)
inline

Set the node indices of an edge.

Parameters
[in]iEdge- Edge index.
[in]iPoint- Index of left node.
[in]jPoint- Index of right node.

◆ SetNodes_Coord() [1/2]

void CEdge::SetNodes_Coord ( unsigned long  iEdge,
const su2double *  coord_Edge_CG,
const su2double *  coord_Elem_CG 
)

Set the face that corresponds to an edge (2D version).

Parameters
[in]iEdge- Edge index.
[in]coord_Edge_CG- Coordinates of the centre of gravity of the edge.
[in]coord_Elem_CG- Coordinates of the centre of gravity of the element.
[in]config- Definition of the particular problem.
Returns
Compute the normal (dimensional) to the face that makes the contorl volume boundaries.

◆ SetNodes_Coord() [2/2]

void CEdge::SetNodes_Coord ( unsigned long  iEdge,
const su2double *  coord_Edge_CG,
const su2double *  coord_FaceElem_CG,
const su2double *  coord_Elem_CG 
)

Set the face that corresponds to an edge (3D version).

Parameters
[in]iEdge- Edge index.
[in]coord_Edge_CG- Coordinates of the centre of gravity of the edge.
[in]coord_FaceElem_CG- Coordinates of the centre of gravity of the face of an element.
[in]coord_Elem_CG- Coordinates of the centre of gravity of the element.
[in]config- Definition of the particular problem.
Returns
Compute the normal (dimensional) to the face that makes the control volume boundaries.

◆ SetNormal()

template<class T >
void CEdge::SetNormal ( unsigned long  iEdge,
const T &  normal 
)
inline

Set the normal vector of an edge.

Parameters
[in]iEdge- Edge index.
[in]normal- Vector to initialize the normal vector.
Returns
Value of the normal vector.

◆ SetPaddingNodes()

void CEdge::SetPaddingNodes ( )
inline

Sets the tail of "Nodes" to repeat one of the last edges.

Note
This is needed when using the SIMD version of GetNode and the number of edges is not a multiple of the simd width.

◆ SetZeroValues()

void CEdge::SetZeroValues ( void  )

Initialize normal vector to 0.

◆ SubNormal()

template<class T >
void CEdge::SubNormal ( unsigned long  iEdge,
const T &  normal 
)
inline

Subtract a vector to the normal vector of an edge.

Parameters
[in]iEdge- Edge index.
[in]normal- Vector to add to the normal vector.

Friends And Related Symbol Documentation

◆ CPhysicalGeometry

friend class CPhysicalGeometry
friend

The documentation for this class was generated from the following files: