SU2
Public Member Functions | List of all members
CTriangle Class Reference

Class for triangle element definition. More...

#include <primal_grid_structure.hpp>

Inheritance diagram for CTriangle:
CPrimalGrid

Public Member Functions

 CTriangle (unsigned long val_point_0, unsigned long val_point_1, unsigned long val_point_2, unsigned short val_nDim)
 Constructor using the nodes and index. More...
 
 ~CTriangle (void)
 Destructor of the class.
 
unsigned long GetNode (unsigned short val_node)
 Get the nodes shared by the triangle. More...
 
void SetNode (unsigned short val_node, unsigned long val_point)
 Set the point associated at a node. More...
 
unsigned short GetFaces (unsigned short val_face, unsigned short val_index)
 Get the face index of and element. More...
 
unsigned short GetNeighbor_Nodes (unsigned short val_node, unsigned short val_index)
 Get the local index of the neighbors to a node (given the local index). More...
 
unsigned short GetnNeighbor_Nodes (unsigned short val_node)
 Get the number of neighbors nodes of a node. More...
 
unsigned short GetnNodesFace (unsigned short val_face)
 Get the number of nodes that composes a face of an element. More...
 
unsigned short GetnNodes (void)
 Get the number of nodes of an element. More...
 
unsigned short GetnFaces (void)
 Get the number of faces of an element. More...
 
unsigned short GetMaxNodesFace (void)
 Get the Maximum number of nodes of a face of an element. More...
 
unsigned short GetVTK_Type (void)
 Get the type of the element using VTK nomenclature. More...
 
unsigned short GetnNeighbor_Elements (void)
 Get the number of element that are neighbor to this element. More...
 
void Change_Orientation (void)
 Change the orientation of an element.
 
void SetDomainElement (unsigned long val_domainelement)
 Set the domain element which shares a face with the boundary element. More...
 
unsigned long GetDomainElement (void)
 Get the domain element which shares a face with the boundary element. More...
 
- Public Member Functions inherited from CPrimalGrid
 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 unsigned short GetRotation_Type (void)
 A pure virtual member. More...
 
virtual void SetRotation_Type (unsigned short val_rotation_type)
 A pure virtual member. More...
 

Additional Inherited Members

- Protected Attributes inherited from CPrimalGrid
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 inherited from CPrimalGrid
static unsigned short nDim
 Dimension of the element (2D or 3D) useful for triangles, quadrilateral and edges.
 

Detailed Description

Class for triangle element definition.

Author
F. Palacios
Version
5.0.0 "Raven"

Constructor & Destructor Documentation

§ CTriangle()

CTriangle::CTriangle ( unsigned long  val_point_0,
unsigned long  val_point_1,
unsigned long  val_point_2,
unsigned short  val_nDim 
)

Constructor using the nodes and index.

Parameters
[in]val_point_0- Index of the 1st triangle point read from the grid file.
[in]val_point_1- Index of the 2nd triangle point read from the grid file.
[in]val_point_2- Index of the 3th triangle point read from the grid file.
[in]val_nDim- Number of dimension of the problem (2D or 3D), be careful a triangle could be 2D or 3D.

Member Function Documentation

§ GetDomainElement()

unsigned long CTriangle::GetDomainElement ( void  )
inlinevirtual

Get the domain element which shares a face with the boundary element.

Returns
Domain element which shares a face with the boundary element.

Reimplemented from CPrimalGrid.

§ GetFaces()

unsigned short CTriangle::GetFaces ( unsigned short  val_face,
unsigned short  val_index 
)
inlinevirtual

Get the face index of and element.

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

Implements CPrimalGrid.

§ GetMaxNodesFace()

unsigned short CTriangle::GetMaxNodesFace ( void  )
inlinevirtual

Get the Maximum number of nodes of a face of an element.

Returns
Maximum number of nodes of a face of an element.

Implements CPrimalGrid.

§ GetNeighbor_Nodes()

unsigned short CTriangle::GetNeighbor_Nodes ( unsigned short  val_node,
unsigned short  val_index 
)
inlinevirtual

Get the local index of the neighbors to a node (given the local index).

Parameters
[in]val_node- Local (to the triangle) 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 (each face is composed by 3 nodes).
Returns
Local (to the triangle) index of the nodes that are neighbor to val_node.

Implements CPrimalGrid.

§ GetnFaces()

unsigned short CTriangle::GetnFaces ( void  )
inlinevirtual

Get the number of faces of an element.

Returns
Number of faces of an element.

Implements CPrimalGrid.

§ GetnNeighbor_Elements()

unsigned short CTriangle::GetnNeighbor_Elements ( void  )
inlinevirtual

Get the number of element that are neighbor to this element.

Returns
Number of neighbor elements.

Implements CPrimalGrid.

§ GetnNeighbor_Nodes()

unsigned short CTriangle::GetnNeighbor_Nodes ( unsigned short  val_node)
inlinevirtual

Get the number of neighbors nodes of a node.

Parameters
[in]val_node- Local (to the triangle) index of a node.
Returns
Number if neighbors of a node val_node.

Implements CPrimalGrid.

§ GetnNodes()

unsigned short CTriangle::GetnNodes ( void  )
inlinevirtual

Get the number of nodes of an element.

Returns
Number of nodes that composes an element.

Implements CPrimalGrid.

§ GetnNodesFace()

unsigned short CTriangle::GetnNodesFace ( unsigned short  val_face)
inlinevirtual

Get the number of nodes that composes a face of an element.

Parameters
[in]val_face- Local index of the face.
Returns
Number of nodes that composes a face of an element.

Implements CPrimalGrid.

§ GetNode()

unsigned long CTriangle::GetNode ( unsigned short  val_node)
inlinevirtual

Get the nodes shared by the triangle.

Parameters
[in]val_node- Local (to the triangle) index of the node (a triangle has 3 nodes).
Returns
Global index of the triangle node.

Implements CPrimalGrid.

§ GetVTK_Type()

unsigned short CTriangle::GetVTK_Type ( void  )
inlinevirtual

Get the type of the element using VTK nomenclature.

Returns
Type of the element using VTK nomenclature.

Implements CPrimalGrid.

§ SetDomainElement()

void CTriangle::SetDomainElement ( unsigned long  val_domainelement)
inlinevirtual

Set the domain element which shares a face with the boundary element.

Parameters
[in]val_domainelement- Global index of the element.

Reimplemented from CPrimalGrid.

§ SetNode()

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

Set the point associated at a node.

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

Reimplemented from CPrimalGrid.


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