SU2
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CPrimalGrid Class Referenceabstract

Class to define the numerical primal grid. More...

#include <primal_grid_structure.hpp>

Inheritance diagram for CPrimalGrid:
CHexahedron CLine CPrism CPyramid CQuadrilateral CTetrahedron CTriangle CVertexMPI

Public Member Functions

 CPrimalGrid (void)
 Constructor of the class.
 
 CPrimalGrid (unsigned short val_nNodes, unsigned short val_nFaces, unsigned short val_VTK_Type)
 
virtual ~CPrimalGrid (void)
 Destructor of the class.
 
long GetNeighbor_Elements (unsigned short val_face)
 Get the elements that surround an element. More...
 
void SetNeighbor_Elements (unsigned long val_elem, unsigned short val_face)
 Set the elements that surround an element. More...
 
void SetCoord_CG (su2double **val_coord)
 Set the center of gravity of an element (including edges). More...
 
su2double GetCG (unsigned short val_dim)
 Get the center of gravity of an element (including edges). More...
 
void SetVolume (su2double val_volume)
 Set the center of gravity of an element (including edges). More...
 
su2double GetVolume (void)
 Get the center of gravity of an element (including edges). More...
 
su2double GetFaceCG (unsigned short val_face, unsigned short val_dim)
 Get the CG of a face of an element. More...
 
void GetAllNeighbor_Elements (void)
 Get all the neighbors of an element. More...
 
void SetDivide (bool val_divide)
 Set that an element must be divided in the adaptation stage. More...
 
bool GetDivide (void)
 Get if an element must be divided in the adaptation stage. More...
 
unsigned long GetGlobalIndex (void)
 Get the element global index in a parallel computation. More...
 
void SetGlobalIndex (unsigned long val_globalindex)
 Set the global index for an element in a parallel computation. More...
 
virtual void SetDomainElement (unsigned long val_domainelement)
 A virtual member. More...
 
virtual unsigned long GetDomainElement (void)
 A virtual member. More...
 
virtual void Change_Orientation (void)=0
 A pure virtual member.
 
virtual unsigned short GetVTK_Type (void)=0
 A pure virtual member. More...
 
virtual unsigned short GetRotation_Type (void)
 A pure virtual member. More...
 
virtual void SetRotation_Type (unsigned short val_rotation_type)
 A pure virtual member. More...
 
virtual unsigned short GetnNeighbor_Nodes (unsigned short val_node)=0
 A pure virtual member. More...
 
virtual unsigned short GetnNeighbor_Elements (void)=0
 A pure virtual member. More...
 
virtual unsigned short GetnNodes (void)=0
 A pure virtual member. More...
 
virtual unsigned short GetnFaces (void)=0
 A pure virtual member. More...
 
virtual unsigned short GetnNodesFace (unsigned short val_face)=0
 A pure virtual member. More...
 
virtual unsigned short GetMaxNodesFace (void)=0
 A pure virtual member. More...
 
virtual unsigned long GetNode (unsigned short val_node)=0
 A pure virtual member. More...
 
virtual void SetNode (unsigned short val_node, unsigned long val_point)
 A pure virtual member. More...
 
virtual unsigned short GetFaces (unsigned short val_face, unsigned short val_index)=0
 A pure virtual member. More...
 
virtual unsigned short GetNeighbor_Nodes (unsigned short val_node, unsigned short val_index)=0
 A pure virtual member. More...
 

Protected Attributes

unsigned long * Nodes
 Vector to store the global nodes of an element.
 
unsigned long GlobalIndex
 The global index of an element.
 
long * Neighbor_Elements
 Vector to store the elements surronding an element.
 
su2double * Coord_CG
 Coordinates of the center-of-gravity of the element.
 
su2double ** Coord_FaceElems_CG
 Coordinates of the center-of-gravity of the face of the elements.
 
unsigned long DomainElement
 Only for boundaries, in this variable the 3D elements which correspond with a boundary element is stored.
 
bool Divide
 Marker used to know if we are going to divide this element in the adaptation proccess.
 
su2double Volume
 Volume of the element.
 

Static Protected Attributes

static unsigned short nDim
 Dimension of the element (2D or 3D) useful for triangles, quadrilateral and edges.
 

Detailed Description

Class to define the numerical primal grid.

Author
F. Palacios, T. Economon
Version
5.0.0 "Raven"

Constructor & Destructor Documentation

§ CPrimalGrid()

CPrimalGrid::CPrimalGrid ( unsigned short  val_nNodes,
unsigned short  val_nFaces,
unsigned short  val_VTK_Type 
)

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

Parameters
[in]val_nNodes- Number of nodes of the element.
[in]val_nFaces- Number of faces of the element.
[in]val_VTK_Type- Type of the element using the vtk nomenclature.

Member Function Documentation

§ GetAllNeighbor_Elements()

void CPrimalGrid::GetAllNeighbor_Elements ( void  )

Get all the neighbors of an element.

Returns
List of all the neighbor of an element.

§ GetCG()

su2double CPrimalGrid::GetCG ( unsigned short  val_dim)
inline

Get the center of gravity of an element (including edges).

Parameters
[in]val_dim- Coordinate of the center of gravity.
Returns
Coordinates of the center of gravity.

§ GetDivide()

bool CPrimalGrid::GetDivide ( void  )
inline

Get if an element must be divided in the adaptation stage.

Returns
TRUE if the element must be divided; otherwise FALSE.

§ GetDomainElement()

unsigned long CPrimalGrid::GetDomainElement ( void  )
inlinevirtual

A virtual member.

Returns
Relate the boundary element which a face of a domain element.

Reimplemented in CQuadrilateral, CTriangle, and CLine.

§ GetFaceCG()

su2double CPrimalGrid::GetFaceCG ( unsigned short  val_face,
unsigned short  val_dim 
)
inline

Get the CG of a face of an element.

Parameters
[in]val_face- Local index of the face.
[in]val_dim- Coordinate of the center of gravity.
Returns
Coordinates of the center of gravity.

§ GetFaces()

virtual unsigned short CPrimalGrid::GetFaces ( unsigned short  val_face,
unsigned short  val_index 
)
pure virtual

A pure virtual member.

Parameters
[in]val_face- Local index of the face.
[in]val_index- Local index of the nodes that compose the face.
Returns
- Local index of the nodes that compose the face.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetGlobalIndex()

unsigned long CPrimalGrid::GetGlobalIndex ( void  )
inline

Get the element global index in a parallel computation.

Returns
Global index of the element in a parallel computation.

§ GetMaxNodesFace()

virtual unsigned short CPrimalGrid::GetMaxNodesFace ( void  )
pure virtual

A pure virtual member.

Returns
Maximum number of nodes that compose a face.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetNeighbor_Elements()

long CPrimalGrid::GetNeighbor_Elements ( unsigned short  val_face)
inline

Get the elements that surround an element.

Parameters
[in]val_face- Local index of the face.
Returns
Global index of the element.

§ GetNeighbor_Nodes()

virtual unsigned short CPrimalGrid::GetNeighbor_Nodes ( unsigned short  val_node,
unsigned short  val_index 
)
pure virtual

A pure virtual member.

Parameters
[in]val_node- Local index of a node.
[in]val_index- Local (to the neighbor nodes of val_node) index of the nodes that are neighbor to val_node.
Returns
Local index of the nodes that are neighbor to val_node.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetnFaces()

virtual unsigned short CPrimalGrid::GetnFaces ( void  )
pure virtual

A pure virtual member.

Returns
Number of faces of an element.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetnNeighbor_Elements()

virtual unsigned short CPrimalGrid::GetnNeighbor_Elements ( void  )
pure virtual

A pure virtual member.

Returns
Number of neighbors elements of a element.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetnNeighbor_Nodes()

virtual unsigned short CPrimalGrid::GetnNeighbor_Nodes ( unsigned short  val_node)
pure virtual

A pure virtual member.

Parameters
[in]val_node- Local index of the node.
Returns
Number of neighbors nodes of a node in the element.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetnNodes()

virtual unsigned short CPrimalGrid::GetnNodes ( void  )
pure virtual

A pure virtual member.

Returns
Number of nodes of an element.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetnNodesFace()

unsigned short CPrimalGrid::GetnNodesFace ( unsigned short  val_face)
inlinepure virtual

A pure virtual member.

Parameters
[in]val_face- Local index of a face.
Returns
Local index of the nodes that compose a face.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetNode()

virtual unsigned long CPrimalGrid::GetNode ( unsigned short  val_node)
pure virtual

A pure virtual member.

Parameters
[in]val_node- Local index of a node.
Returns
Global index of the node.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ GetRotation_Type()

unsigned short CPrimalGrid::GetRotation_Type ( void  )
inlinevirtual

A pure virtual member.

Returns
Type of the element using VTK nomenclature.

Reimplemented in CVertexMPI.

§ GetVolume()

su2double CPrimalGrid::GetVolume ( void  )
inline

Get the center of gravity of an element (including edges).

Parameters
[in]val_dim- Coordinate of the center of gravity.
Returns
Coordinates of the center of gravity.

§ GetVTK_Type()

virtual unsigned short CPrimalGrid::GetVTK_Type ( void  )
pure virtual

A pure virtual member.

Returns
Kind of element using the vtk nomenclature.

Implemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ SetCoord_CG()

void CPrimalGrid::SetCoord_CG ( su2double **  val_coord)

Set the center of gravity of an element (including edges).

Parameters
[in]val_coord- Coordinates of the element.

§ SetDivide()

void CPrimalGrid::SetDivide ( bool  val_divide)
inline

Set that an element must be divided in the adaptation stage.

Parameters
[in]val_divide- TRUE if the element must be divided; otherwise FALSE.

§ SetDomainElement()

void CPrimalGrid::SetDomainElement ( unsigned long  val_domainelement)
inlinevirtual

A virtual member.

Parameters
[in]val_domainelementIndex of the domain element which has a face shared by this boundary element.

Reimplemented in CQuadrilateral, CTriangle, and CLine.

§ SetGlobalIndex()

void CPrimalGrid::SetGlobalIndex ( unsigned long  val_globalindex)
inline

Set the global index for an element in a parallel computation.

Returns
Global index of an element in a parallel computation.

§ SetNeighbor_Elements()

void CPrimalGrid::SetNeighbor_Elements ( unsigned long  val_elem,
unsigned short  val_face 
)
inline

Set the elements that surround an element.

Parameters
[in]val_elem- Global index of the element.
[in]val_face- Local index of the face.

§ SetNode()

void CPrimalGrid::SetNode ( unsigned short  val_node,
unsigned long  val_point 
)
inlinevirtual

A pure virtual member.

Parameters
[in]val_node- Local index of a node.
[in]val_point- Point associated to the node.

Reimplemented in CPyramid, CPrism, CHexahedron, CTetrahedron, CQuadrilateral, CTriangle, CLine, and CVertexMPI.

§ SetRotation_Type()

void CPrimalGrid::SetRotation_Type ( unsigned short  val_rotation_type)
inlinevirtual

A pure virtual member.

Parameters
[in]val_rotation_type- Kind of rotation/traslation that must be applied.

Reimplemented in CVertexMPI.

§ SetVolume()

void CPrimalGrid::SetVolume ( su2double  val_volume)
inline

Set the center of gravity of an element (including edges).

Parameters
[in]val_coord- Coordinates of the element.

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