Documentation 6b54b78464
Loading...
Searching...
No Matches
CPrimalGridWithConnectivity< Connectivity > Class Template Reference

Override the connectivity getters of CPrimalGrid. More...

#include <CPrimalGrid.hpp>

Inheritance diagram for CPrimalGridWithConnectivity< Connectivity >:
[legend]

Public Member Functions

 CPrimalGridWithConnectivity (bool FEM)
 
unsigned short GetnNodes () const final
 Get number of nodes of the element.
 
unsigned short GetnFaces () const final
 Get number of faces of the element.
 
unsigned short GetnNodesFace (unsigned short val_face) const final
 Get number of nodes of a face of the element.
 
unsigned short GetMaxNodesFace () const final
 Get the maximum number of nodes contained in a face of the element.
 
unsigned short GetFaces (unsigned short val_face, unsigned short val_index) const final
 Get nodes contained in a face.
 
unsigned short GetnNeighbor_Nodes (unsigned short val_node) const final
 Get number of neighbor nodes of a node.
 
unsigned short GetNeighbor_Nodes (unsigned short val_node, unsigned short val_index) const final
 Get neighbor nodes of a node.
 
unsigned short GetVTK_Type () const final
 Get VTK type.
 
- Public Member Functions inherited from CPrimalGrid
 CPrimalGrid ()=delete
 
 CPrimalGrid (bool FEM, unsigned short nNodes, unsigned short nNeighbor_Elements)
 Constructor of the class.
 
virtual ~CPrimalGrid ()=default
 Destructor of the class.
 
unsigned long GetNode (unsigned short val_node) const
 Get the nodes shared by the primal grid element.
 
void SetNode (unsigned short val_node, unsigned long val_point)
 Set the nodes shared by the primal grid element.
 
long GetNeighbor_Elements (unsigned short val_face) const
 Get the elements that surround an element.
 
void SetNeighbor_Elements (unsigned long val_elem, unsigned short val_face)
 Set the elements that surround an element.
 
su2double GetLengthScale () const
 Make available the length scale of the element.
 
void SetLengthScale (su2double val_lenScale)
 Set the length scale of the element.
 
unsigned short GetTimeLevel () const
 Make available the time level of the element.
 
void SetTimeLevel (unsigned short val_timeLevel)
 Set the time level of the element.
 
bool GetOwnerFace (unsigned short val_face) const
 Get the boolean to indicate whether or not this element owns the face between the current and the adjacent element with index val_face.
 
void SetOwnerFace (bool val_owner, unsigned short val_face)
 Set the boolean to indicate whether or not this element owns the face between the current and the adjacent element with index val_face.
 
short GetPeriodicIndex (unsigned short val_face) const
 Get the index of the periodic transformation to the neighboring element.
 
void SetPeriodicIndex (unsigned short val_periodic, unsigned short val_face)
 Set the index of the periodic transformation to the neighboring element.
 
bool GetJacobianConstantFace (unsigned short val_face) const
 Get whether or not the Jacobian of the given face is considered constant.
 
void SetJacobianConstantFace (bool val_JacFaceIsConstant, unsigned short val_face)
 Set whether or not the Jacobian of the given face is considered constant.
 
template<class T >
su2double * SetCoord_CG (unsigned short nDim, const T &val_coord)
 Set the center of gravity of an element (including edges).
 
su2double GetCG (unsigned short val_dim) const
 Get the center of gravity of an element (including edges).
 
const su2double * GetCG () const
 
void SetVolume (su2double val_volume)
 Set the center of gravity of an element (including edges).
 
su2double GetVolume () const
 Get the center of gravity of an element (including edges).
 
void ResetJacobianConstantFaces ()
 Reset the array, which stores whether or not the faces have a constant Jacobian, to false.
 
void InitializeNeighbors (unsigned short val_nFaces)
 Initialize the information about the neighboring elements.
 
virtual void SetColor (unsigned long val_color)
 A virtual member.
 
virtual unsigned long GetColor () const
 A virtual member.
 
unsigned long GetGlobalIndex () const
 Get the element global index in a parallel computation.
 
void SetGlobalIndex (unsigned long val_globalindex)
 Set the global index for an element in a parallel computation.
 
void SetDomainElement (unsigned long val_domainelement)
 Set the index of the domain element of which this boundary element is a face.
 
unsigned long GetDomainElement () const
 Get the index of the domain element of which this boundary element is a face.
 
virtual void Change_Orientation ()=0
 A pure virtual member.
 
virtual unsigned short GetRotation_Type () const
 A pure virtual member.
 
virtual void SetRotation_Type (unsigned short val_rotation_type)
 A pure virtual member.
 
virtual void GetCornerPointsAllFaces (unsigned short &nFaces, unsigned short nPointsPerFace[], unsigned long faceConn[6][4]) const
 Virtual function, that must be overwritten by the derived class, if needed.
 
virtual unsigned long GetGlobalElemID () const
 Virtual function to make available the global ID of this element.
 
virtual unsigned long GetGlobalOffsetDOFsSol () const
 Virtual function to make available the global offset of the solution DOFs.
 
virtual unsigned short GetNPolyGrid () const
 Virtual function to make available the polynomial degree of the grid.
 
virtual unsigned short GetNPolySol () const
 Virtual function to make available the polynomial degree of the solution.
 
virtual unsigned short GetNDOFsGrid () const
 Virtual function to make available the number of DOFs of the grid in the element.
 
virtual unsigned short GetNDOFsSol () const
 Virtual function to make available the number of DOFs of the solution in the element.
 
virtual bool GetJacobianConsideredConstant () const
 Virtual function to get whether or not the Jacobian is considered constant.
 
virtual void SetJacobianConsideredConstant (bool val_JacobianConsideredConstant)
 Virtual function to set the value of JacobianConsideredConstant.
 
virtual void AddOffsetGlobalDOFs (const unsigned long val_offsetRank)
 Virtual function to correct the offset of the global DOFs.
 
virtual void AddDonorWallFunctions (const unsigned long donorElement)
 Virtual function to add the given donor ID to the donor elements for the wall function treatment.
 
virtual unsigned short GetNDonorsWallFunctions () const
 Virtual function to make available the number of donor elements for the wall function treatment.
 
virtual unsigned long * GetDonorsWallFunctions ()
 Virtual function to make available the pointer to the vector for the donor elements for the wall function treatment.
 
virtual const unsigned long * GetDonorsWallFunctions () const
 
virtual void SetDonorsWallFunctions (const std::vector< unsigned long > &donorElements)
 Virtual function to set the global ID's of the donor elements for the wall function treatment.
 
virtual void RemoveMultipleDonorsWallFunctions ()
 Virtual function to remove the multiple donors for the wall function treatment.
 

Additional Inherited Members

- Protected Attributes inherited from CPrimalGrid
unsigned long GlobalIndex_DomainElement
 
std::unique_ptr< unsigned long[]> Nodes
 Global node indices of the element.
 
std::unique_ptr< long[]> Neighbor_Elements
 Vector to store the elements surronding this element.
 
su2double Coord_CG [3] = {0.0}
 Coordinates of the center-of-gravity of the element.
 
su2double Volume
 Volume of the element.
 
su2double LenScale
 Length scale of the element.
 
unsigned short TimeLevel
 Time level of the element for time accurate local time stepping.
 
int8_t PeriodIndexNeighbors [N_FACES_MAXIMUM]
 
bool JacobianFaceIsConstant [N_FACES_MAXIMUM]
 Whether or not the Jacobian of the faces can be considered constant in the transformation to the standard element.
 
bool ElementOwnsFace [N_FACES_MAXIMUM]
 Whether or not the element owns each face.
 
const bool FEM
 Whether this is a FEM element.
 

Detailed Description

template<typename Connectivity>
class CPrimalGridWithConnectivity< Connectivity >

Override the connectivity getters of CPrimalGrid.

Non-FEM primal grid classes like CLine, CTriangle etc are derived from CPrimalGridWithConnectivity<CLineConnectivity> etc. The Connectivity class must have the following static members of type unsigned short / unsigned short array, typically constexpr:

  • nNodes: Number of nodes of the element.
  • nFaces: Number of faces of the element.
  • nNodesFace[]: Number of nodes of each face of the element.
  • maxNodesFace: Maximum number of nodes for a face.
  • Faces[][]: Matrix to store the local nodes of all the faces.
  • nNeighbor_Nodes[]: Number of neighbor nodes of each node of the element.
  • Neighbor_Nodes[][]: Matrix to store the neighbors of all the nodes.
  • VTK_Type: Type of element using VTK nomenclature.

The getter functions for connectivity in CPrimalGrid have final overrides in this class, accessing the static members of Connectivity.

Template Parameters
Connectivity- class defining the connectivity structure

Constructor & Destructor Documentation

◆ CPrimalGridWithConnectivity()

template<typename Connectivity >
CPrimalGridWithConnectivity< Connectivity >::CPrimalGridWithConnectivity ( bool  FEM)
inline

Member Function Documentation

◆ GetFaces()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetFaces ( unsigned short  val_face,
unsigned short  val_index 
) const
inlinefinalvirtual

Get nodes contained in a face.

Parameters
[in]val_face- Index of the face among all faces of the element.
[in]val_index- Index of the node among all nodes of the face.
Returns
- Index of the node among all nodes of the element.

Implements CPrimalGrid.

◆ GetMaxNodesFace()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetMaxNodesFace ( ) const
inlinefinalvirtual

Get the maximum number of nodes contained in a face of the element.

Returns
Maximum number of nodes contained in a face.

Implements CPrimalGrid.

◆ GetNeighbor_Nodes()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetNeighbor_Nodes ( unsigned short  val_node,
unsigned short  val_index 
) const
inlinefinalvirtual

Get neighbor nodes of a node.

Parameters
[in]val_node- Index of node N among all nodes of the element.
[in]val_index- Index of the neighbor node among all neighbor nodes of the node N.
Returns
Index of neighbor node among all nodes of the element.

Implements CPrimalGrid.

◆ GetnFaces()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetnFaces ( ) const
inlinefinalvirtual

Get number of faces of the element.

Returns
Number of faces.

Implements CPrimalGrid.

◆ GetnNeighbor_Nodes()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetnNeighbor_Nodes ( unsigned short  val_node) const
inlinefinalvirtual

Get number of neighbor nodes of a node.

Parameters
[in]val_node- Index of node among all nodes of the element.
Returns
Number of neighbor nodes.

Implements CPrimalGrid.

◆ GetnNodes()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetnNodes ( ) const
inlinefinalvirtual

Get number of nodes of the element.

Returns
Number of nodes.

Implements CPrimalGrid.

◆ GetnNodesFace()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetnNodesFace ( unsigned short  val_face) const
inlinefinalvirtual

Get number of nodes of a face of the element.

Parameters
[in]val_face- Index of the face among all faces of the element.
Returns
Number of nodes contained in the face.

Reimplemented from CPrimalGrid.

◆ GetVTK_Type()

template<typename Connectivity >
unsigned short CPrimalGridWithConnectivity< Connectivity >::GetVTK_Type ( ) const
inlinefinalvirtual

Get VTK type.

Returns
Type of element using the VTK nomenclature.

Implements CPrimalGrid.


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