SU2
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CElement Class Reference

Main class for defining the element structure. More...

#include <element_structure.hpp>

Inheritance diagram for CElement:
CBOUND2D CHEXA8 CQUAD4 CTETRA1 CTRIA1 CHEXA8P1 CQUAD4P1

Public Member Functions

 CElement (void)
 Constructor of the class.
 
 CElement (unsigned short val_nDim, CConfig *config)
 
virtual ~CElement (void)
 Destructor of the class.
 
unsigned short GetnNodes (void)
 Retrieve the number of nodes of the element. More...
 
unsigned short GetnGaussPoints (void)
 Retrieve the number of nodes of the element. More...
 
unsigned short GetnGaussPointsP (void)
 Retrieve the number of nodes of the element. More...
 
void SetRef_Coord (su2double val_CoordRef, unsigned short iNode, unsigned short iDim)
 Set the value of the coordinate of the nodes in the reference configuration. More...
 
void SetCurr_Coord (su2double val_CoordCurr, unsigned short iNode, unsigned short iDim)
 Set the value of the coordinate of the nodes in the current configuration. More...
 
void SetElement_Pressure (su2double val_ElPressure)
 Set the value of the pressure in the element for incompressible materials. More...
 
su2double GetRef_Coord (unsigned short iNode, unsigned short iDim)
 Set the value of the coordinate of the nodes in the reference configuration. More...
 
su2double GetCurr_Coord (unsigned short iNode, unsigned short iDim)
 Get the value of the coordinate of the nodes in the current configuration. More...
 
su2double GetWeight (unsigned short iGauss)
 Get the weight of the corresponding Gaussian Point. More...
 
su2double GetWeight_P (unsigned short iGaussP)
 Get the weight of the corresponding Gaussian Point for pressure subintegration. More...
 
su2double GetJ_X (unsigned short iGauss)
 Get the jacobian respect to the reference configuration for the Gaussian Point iGauss. More...
 
su2double GetJ_x (unsigned short iGauss)
 Get the jacobian respect to the current configuration for the Gaussian Point iGauss. More...
 
su2double GetJ_X_P (unsigned short iGauss)
 Get the jacobian respect to the reference configuration for the Gaussian Point iGauss and the pressure term. More...
 
su2double GetJ_x_P (unsigned short iGauss)
 Get the jacobian respect to the current configuration for the Gaussian Point iGauss and the pressure term. More...
 
su2double GetElement_Pressure (void)
 Retrieve the value of the pressure in the element for incompressible materials. More...
 
void Add_Mab (su2double val_Mab, unsigned short nodeA, unsigned short nodeB)
 Add the value of the diagonal term for the mass matrix. More...
 
void Add_Kab (su2double **val_Kab, unsigned short nodeA, unsigned short nodeB)
 Add the value of a submatrix K relating nodes a and b, for the constitutive term. More...
 
void Add_Kab_T (su2double **val_Kab, unsigned short nodeA, unsigned short nodeB)
 Add the value of a submatrix K relating nodes a and b, for the constitutive term (symmetric terms need transpose) More...
 
void Add_Ks_ab (su2double val_Ks_ab, unsigned short nodeA, unsigned short nodeB)
 Add the value of the diagonal term for the stress contribution to the stiffness of the system. More...
 
void Add_Kt_a (su2double *val_Kt_a, unsigned short nodeA)
 Add the value of the nodal stress term for the computation of the residual. More...
 
void Add_FDL_a (su2double *val_FDL_a, unsigned short nodeA)
 Add the value of the dead load for the computation of the residual. More...
 
void Set_Kk_ab (su2double **val_Kk_ab, unsigned short nodeA, unsigned short nodeB)
 Set the value of a submatrix K relating nodes a and b, for the pressure term (this term is subintegrated). More...
 
void clearElement (void)
 Restarts the values in the element.
 
void clearStress (void)
 Restarts the values of stress in the element.
 
su2double Get_Mab (unsigned short nodeA, unsigned short nodeB)
 Return the value of the diagonal term for the mass matrix, relating nodes a and b. More...
 
su2double * Get_Kab (unsigned short nodeA, unsigned short nodeB)
 Return the value of the submatrix K relating nodes a and b. More...
 
su2double Get_Ks_ab (unsigned short nodeA, unsigned short nodeB)
 Return the value of the diagonal term for the stress contribution, relating nodes a and b. More...
 
su2double * Get_Kk_ab (unsigned short nodeA, unsigned short nodeB)
 Return the value of a submatrix K relating nodes a and b, for the pressure term (this term is subintegrated). More...
 
su2double * Get_Kt_a (unsigned short nodeA)
 Return the value of the nodal stress component of the residual for node a. More...
 
su2double * Get_FDL_a (unsigned short nodeA)
 Return the value of the dead load component of the residual for node a. More...
 
su2double GetNi (unsigned short iNode, unsigned short iGauss)
 Retrieve the value of the shape functions. More...
 
su2double GetGradNi_X (unsigned short iNode, unsigned short iGauss, unsigned short iDim)
 Retrieve the value of the gradient of the shape functions respect to the reference configuration. More...
 
su2double GetGradNi_x (unsigned short iNode, unsigned short iGauss, unsigned short iDim)
 Retrieve the value of the gradient of the shape functions respect to the reference configuration. More...
 
su2double GetGradNi_x_P (unsigned short iNode, unsigned short iGaussP, unsigned short iDim)
 Retrieve the value of the gradient of the shape functions respect to the reference configuration. More...
 
su2double GetNi_Extrap (unsigned short iNode, unsigned short iGauss)
 Retrieve the value of the gradient of the shape functions respect to the reference configuration. More...
 
void Add_NodalStress (su2double val_Stress, unsigned short iNode, unsigned short iVar)
 Add a value to the nodal stress for an element. More...
 
su2double Get_NodalStress (unsigned short iNode, unsigned short iVar)
 Retrieve the value of the nodal stress for an element. More...
 
virtual void ComputeGrad_Linear (void)
 Set the value of the gradient of the shape functions respect to the reference configuration. More...
 
virtual void ComputeGrad_NonLinear (void)
 Set the value of the gradient of the shape functions respect to the current configuration. More...
 
virtual void ComputeGrad_Pressure (void)
 Virtual member.
 

Protected Attributes

unsigned short nGaussPoints
 Number of gaussian points.
 
unsigned short nGaussPointsP
 Number of gaussian points for the pressure term.
 
unsigned short nNodes
 Number of gaussian points.
 
su2double ** CurrentCoord
 Coordinates in the current frame.
 
su2double ** RefCoord
 Coordinates in the reference frame.
 
su2double ** GaussCoord
 Parent coordinates of the Gaussian Points.
 
su2double * GaussWeight
 Weight of the Gaussian Points for the integration.
 
su2double ** GaussCoordP
 Parent coordinates of the Gaussian Points for the pressure subintegration..
 
su2double * GaussWeightP
 Weight of the Gaussian Points for the pressure subintegration.
 
su2double ** NodalExtrap
 Coordinates of the nodal points for Gaussian extrapolation.
 
su2double ** NodalStress
 Stress at the nodes.
 
CGaussVariable ** GaussPoint
 Structure for the Gaussian Points.
 
CGaussVariable ** GaussPointP
 Structure for the Gaussian Points for the pressure subintegration.
 
su2double ** Mab
 Structure for the nodal components of the mass matrix.
 
su2double *** Kab
 Structure for the constitutive component of the tangent matrix.
 
su2double ** Ks_ab
 Structure for the stress component of the tangent matrix.
 
su2double *** Kk_ab
 Structure for the pressure component of the tangent matrix.
 
su2double ** Kt_a
 Structure for the nodal stress term for the residual computation.
 
su2double ** FDL_a
 Structure for the dead loads for the residual computation.
 
su2double el_Pressure
 Pressure in the element.
 

Static Protected Attributes

static unsigned short nDim = 0
 Number of dimension of the problem.
 

Detailed Description

Main class for defining the element structure.

Author
R. Sanchez
Version
5.0.0 "Raven"

Constructor & Destructor Documentation

§ CElement()

CElement::CElement ( unsigned short  val_nDim,
CConfig config 
)

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_nDim- Number of dimensions of the problem.
[in]config- Definition of the particular problem.

Member Function Documentation

§ Add_FDL_a()

void CElement::Add_FDL_a ( su2double *  val_FDL_a,
unsigned short  nodeA 
)

Add the value of the dead load for the computation of the residual.

Parameters
[in]nodeA- index of Node a.
[in]val_FDL_a- value of the term that will constitute the diagonal of the stress contribution.

§ Add_Kab()

void CElement::Add_Kab ( su2double **  val_Kab,
unsigned short  nodeA,
unsigned short  nodeB 
)

Add the value of a submatrix K relating nodes a and b, for the constitutive term.

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[in]val_Kab- value of the matrix K.

§ Add_Kab_T()

void CElement::Add_Kab_T ( su2double **  val_Kab,
unsigned short  nodeA,
unsigned short  nodeB 
)

Add the value of a submatrix K relating nodes a and b, for the constitutive term (symmetric terms need transpose)

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[in]val_Kab- value of the matrix K.

§ Add_Ks_ab()

void CElement::Add_Ks_ab ( su2double  val_Ks_ab,
unsigned short  nodeA,
unsigned short  nodeB 
)
inline

Add the value of the diagonal term for the stress contribution to the stiffness of the system.

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[in]val_Ks_ab- value of the term that will constitute the diagonal of the stress contribution.

§ Add_Kt_a()

void CElement::Add_Kt_a ( su2double *  val_Kt_a,
unsigned short  nodeA 
)

Add the value of the nodal stress term for the computation of the residual.

Parameters
[in]nodeA- index of Node a.
[in]val_Kt_a- value of the term that will constitute the diagonal of the stress contribution.

§ Add_Mab()

void CElement::Add_Mab ( su2double  val_Mab,
unsigned short  nodeA,
unsigned short  nodeB 
)
inline

Add the value of the diagonal term for the mass matrix.

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[in]val_Ks_ab- value of the term that will constitute the diagonal of the stress contribution.

§ Add_NodalStress()

void CElement::Add_NodalStress ( su2double  val_Stress,
unsigned short  iNode,
unsigned short  iVar 
)
inline

Add a value to the nodal stress for an element.

Parameters
[in]iNode- Index of the node.
[in]iGauss- Index of the variable.
[in]val_Stress- Value of the stress added.

§ ComputeGrad_Linear()

void CElement::ComputeGrad_Linear ( void  )
inlinevirtual

Set the value of the gradient of the shape functions respect to the reference configuration.

Parameters
[in]val_solution- Solution of the problem.
[out]J_X- Jacobian of the element evaluated at the current Gauss Point respect to the reference configuration

Reimplemented in CBOUND2D, CHEXA8, CTETRA1, CQUAD4, and CTRIA1.

§ ComputeGrad_NonLinear()

void CElement::ComputeGrad_NonLinear ( void  )
inlinevirtual

Set the value of the gradient of the shape functions respect to the current configuration.

Parameters
[in]val_solution- Solution of the problem.
[out]J_x- Jacobian of the element evaluated at the current Gauss Point respect to the current configuration

Reimplemented in CBOUND2D, CHEXA8, CTETRA1, CQUAD4, and CTRIA1.

§ Get_FDL_a()

su2double * CElement::Get_FDL_a ( unsigned short  nodeA)
inline

Return the value of the dead load component of the residual for node a.

Parameters
[in]nodeA- index of Node a.
[out]val_Kt_a- value of the stress term.

§ Get_Kab()

su2double * CElement::Get_Kab ( unsigned short  nodeA,
unsigned short  nodeB 
)
inline

Return the value of the submatrix K relating nodes a and b.

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[out]val_Kab- value of the matrix K.

§ Get_Kk_ab()

su2double * CElement::Get_Kk_ab ( unsigned short  nodeA,
unsigned short  nodeB 
)
inline

Return the value of a submatrix K relating nodes a and b, for the pressure term (this term is subintegrated).

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[in]val_Kab- value of the matrix K.

§ Get_Ks_ab()

su2double CElement::Get_Ks_ab ( unsigned short  nodeA,
unsigned short  nodeB 
)
inline

Return the value of the diagonal term for the stress contribution, relating nodes a and b.

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[out]val_Kab- value of the matrix K.

§ Get_Kt_a()

su2double * CElement::Get_Kt_a ( unsigned short  nodeA)
inline

Return the value of the nodal stress component of the residual for node a.

Parameters
[in]nodeA- index of Node a.
[out]val_Kt_a- value of the stress term.

§ Get_Mab()

su2double CElement::Get_Mab ( unsigned short  nodeA,
unsigned short  nodeB 
)
inline

Return the value of the diagonal term for the mass matrix, relating nodes a and b.

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[out]val_Mab- value of the diagonal term of Mab.

§ Get_NodalStress()

su2double CElement::Get_NodalStress ( unsigned short  iNode,
unsigned short  iVar 
)
inline

Retrieve the value of the nodal stress for an element.

Parameters
[in]iNode- Index of the node.
[in]iGauss- Index of the variable.
[in]val_Stress- Value of the stress added.

§ GetCurr_Coord()

su2double CElement::GetCurr_Coord ( unsigned short  iNode,
unsigned short  iDim 
)
inline

Get the value of the coordinate of the nodes in the current configuration.

Parameters
[in]val_CoordRef- Value of the coordinate.
[in]iNode- Number of node.
[in]iDim- Dimension
[out]Coordinate

§ GetElement_Pressure()

su2double CElement::GetElement_Pressure ( void  )
inline

Retrieve the value of the pressure in the element for incompressible materials.

Parameters
[out]Valueof the pressure.

§ GetGradNi_X()

su2double CElement::GetGradNi_X ( unsigned short  iNode,
unsigned short  iGauss,
unsigned short  iDim 
)
inline

Retrieve the value of the gradient of the shape functions respect to the reference configuration.

Parameters
[in]iNode- Index of the node.
[in]iNode- Index of the Gaussian Point.
[out]GradNi_X- Gradient of the shape function related to node iNode and evaluated at Gaussian Point iGauss

§ GetGradNi_x()

su2double CElement::GetGradNi_x ( unsigned short  iNode,
unsigned short  iGauss,
unsigned short  iDim 
)
inline

Retrieve the value of the gradient of the shape functions respect to the reference configuration.

Parameters
[in]iNode- Index of the node.
[in]iNode- Index of the Gaussian Point.
[out]GradNi_X- Gradient of the shape function related to node iNode and evaluated at Gaussian Point iGauss

§ GetGradNi_x_P()

su2double CElement::GetGradNi_x_P ( unsigned short  iNode,
unsigned short  iGaussP,
unsigned short  iDim 
)
inline

Retrieve the value of the gradient of the shape functions respect to the reference configuration.

Parameters
[in]iNode- Index of the node.
[in]iNode- Index of the Gaussian Point.
[out]GradNi_x- Gradient of the shape function related to node iNode and evaluated at Gaussian Point iGauss

§ GetJ_X()

su2double CElement::GetJ_X ( unsigned short  iGauss)
inline

Get the jacobian respect to the reference configuration for the Gaussian Point iGauss.

Parameters
[in]iGauss- index of the Gaussian point.
[out]Weight.

§ GetJ_x()

su2double CElement::GetJ_x ( unsigned short  iGauss)
inline

Get the jacobian respect to the current configuration for the Gaussian Point iGauss.

Parameters
[in]iGauss- index of the Gaussian point.
[out]Weight.

§ GetJ_X_P()

su2double CElement::GetJ_X_P ( unsigned short  iGauss)
inline

Get the jacobian respect to the reference configuration for the Gaussian Point iGauss and the pressure term.

Parameters
[in]iGauss- index of the Gaussian point.
[out]Weight.

§ GetJ_x_P()

su2double CElement::GetJ_x_P ( unsigned short  iGauss)
inline

Get the jacobian respect to the current configuration for the Gaussian Point iGauss and the pressure term.

Parameters
[in]iGauss- index of the Gaussian point.
[out]Weight.

§ GetnGaussPoints()

unsigned short CElement::GetnGaussPoints ( void  )
inline

Retrieve the number of nodes of the element.

Parameters
[out]nGaussPoints- Number of Gaussian Points of the element.

§ GetnGaussPointsP()

unsigned short CElement::GetnGaussPointsP ( void  )
inline

Retrieve the number of nodes of the element.

Parameters
[out]nGaussPointsP- Number of Gaussian Points for pressure underintegration.

§ GetNi()

su2double CElement::GetNi ( unsigned short  iNode,
unsigned short  iGauss 
)
inline

Retrieve the value of the shape functions.

Parameters
[in]iNode- Index of the node.
[in]iNode- Index of the Gaussian Point.
[out]GradNi_X- Gradient of the shape function related to node iNode and evaluated at Gaussian Point iGauss

§ GetNi_Extrap()

su2double CElement::GetNi_Extrap ( unsigned short  iNode,
unsigned short  iGauss 
)
inline

Retrieve the value of the gradient of the shape functions respect to the reference configuration.

Parameters
[in]iNode- Index of the node.
[in]iGauss- Index of the Gaussian Point.
[out]val_Ni_Ext- Value of the shape function at the nodes for extrapolation purposes

§ GetnNodes()

unsigned short CElement::GetnNodes ( void  )
inline

Retrieve the number of nodes of the element.

Parameters
[out]nNodes- Number of nodes of the element.

§ GetRef_Coord()

su2double CElement::GetRef_Coord ( unsigned short  iNode,
unsigned short  iDim 
)
inline

Set the value of the coordinate of the nodes in the reference configuration.

Parameters
[in]val_CoordRef- Value of the coordinate.
[in]iNode- Number of node.
[in]iDim- Dimension
[out]Coordinate

§ GetWeight()

su2double CElement::GetWeight ( unsigned short  iGauss)
inline

Get the weight of the corresponding Gaussian Point.

Parameters
[in]iGauss- index of the Gaussian point.
[out]Weight.

§ GetWeight_P()

su2double CElement::GetWeight_P ( unsigned short  iGaussP)
inline

Get the weight of the corresponding Gaussian Point for pressure subintegration.

Parameters
[in]iGaussP- index of the Gaussian point.
[out]Weight.

§ Set_Kk_ab()

void CElement::Set_Kk_ab ( su2double **  val_Kk_ab,
unsigned short  nodeA,
unsigned short  nodeB 
)

Set the value of a submatrix K relating nodes a and b, for the pressure term (this term is subintegrated).

Parameters
[in]nodeA- index of Node a.
[in]nodeB- index of Node b.
[in]val_Kab- value of the matrix K.

§ SetCurr_Coord()

void CElement::SetCurr_Coord ( su2double  val_CoordCurr,
unsigned short  iNode,
unsigned short  iDim 
)
inline

Set the value of the coordinate of the nodes in the current configuration.

Parameters
[in]val_CoordRef- Value of the coordinate.
[in]iNode- Number of node.
[in]iDim- Dimension

§ SetElement_Pressure()

void CElement::SetElement_Pressure ( su2double  val_ElPressure)
inline

Set the value of the pressure in the element for incompressible materials.

Parameters
[in]val_ElPressure- Value of the pressure.

§ SetRef_Coord()

void CElement::SetRef_Coord ( su2double  val_CoordRef,
unsigned short  iNode,
unsigned short  iDim 
)
inline

Set the value of the coordinate of the nodes in the reference configuration.

Parameters
[in]val_CoordRef- Value of the coordinate.
[in]iNode- Number of node.
[in]iDim- Dimension

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