DGFemPhysics
The GeMA Discontinuous Galerkin FEM Physics Plugin
Loading...
Searching...
No Matches
GmpDGFemPhysics Class Reference

Basic class for discontinuous Galerkin fem physics. More...

#include <gmpDGFemPhysics.h>

Inheritance diagram for GmpDGFemPhysics:
Collaboration diagram for GmpDGFemPhysics:

Public Types

enum  StateVarIds { C_ID }
 IDs fo physics state vars. More...
 
enum  PhysicsAttributeIds {
  NodsX_ID , NodsY_ID , NodsZ_ID , Upwind_ID ,
  Implicit_ID , Limiter_ID , Regular_Mesh_ID , Periodic_Bnd_ID ,
  Couple_ID
}
 IDs for physics attributes. More...
 
enum  ElementPropertyIds {
  PHI_ID , V_ID , R_ID , F_ID ,
  IC_ID , A_ID
}
 
enum  GaussAttributeIds { V_D_ID , C_D_ID }
 IDs for physics Gauss attributes. More...
 
enum  BoundaryContidionsIds {
  BC_C_Inflow_1D_ID , BC_C_Outflow_1D_ID , BC_C_Periodic_1D_ID , BC_C_Inflow_ID ,
  BC_C_Outflow_ID , BC_Periodic_ID , BC_C_NODE_ID
}
 
enum  BoundaryConditionsValueIds {
  BC_CELL_1D_ID , BC_C_CELL_ID , BC_CELL_FREE_1D_ID , BC_C_FREE_CELL_ID ,
  BC_C_PERIODIC_1D_ID , BC_C_PERIODIC_CELL_ID , BC_C_ID , BC_C_FREE_ID ,
  BC_C_PERIODIC_ID , BC_C_NODE_V_ID
}
 

Public Member Functions

 GmpDGFemPhysics (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 Constructor. Will be called by the plugin loading code.
 
virtual ~GmpDGFemPhysics ()
 Destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual bool loadPrivateData (LuaTable &table)
 
virtual const GmElementDofdofMapping (const GmElement *e) const
 
virtual const QVariantMap * physicsMetaDataMap ()
 Returns a pointer to the basic Disc. Galerkin physics attribute map, built when the function is called for the first time. Will be extended by sub-classes providing the reactive term.
 
virtual FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element stiffness matrix for element 'e'.
 
virtual FemResultType fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 
virtual bool fixedNodalDofsBc (QList< int > &nodes, QList< int > &dof, QList< double > &values, bool *constantValues) const
 
bool calcDerivedResults (bool)
 
bool calcElementDerivedResults ()
 

Protected Attributes

int BndIndex = -1
 Index for Boundary Node/Edge/Face in topology elements.
 
double TOLERANCE = +1.e-3
 Tolerance.
 

Private Member Functions

bool setNumFunctions ()
 Set of number of shape functions for each element.
 
int getNumFunctions () const
 
GmMatrix getAffineTransformationMAT ()
 
GmMatrix getInvAffineTransformationMAT ()
 
double getDetAffineTransformMatrix ()
 
bool TopologyMeshSetup ()
 Assembly of Topology Mesh using a regular geometrical discretization.
 
bool TopologyMeshSetup1D ()
 Assembly of Topology Mesh using a 1D regular geometrical discretization

 
bool TopologyMeshSetup2D ()
 Assembly of Topology Mesh using a 2D regular geometrical discretization.
 
bool TopologyMeshSetup3D ()
 Assembly of Topology Mesh using a 3D regular geometrical discretization.
 
bool AffineTransformationSetup ()
 In a regular topology mesh is used a unique Affine Transformation.
 
bool InitialConditionProjection ()
 Initial Condition Projection in the trial functions space.
 
bool NumericalFlux (const GmElement *e, int borderE, GmMatrix &MFluxBorderE, GmMatrix &MFluxBorderN)
 
bool LinearLimeter ()
 
GmMatrix MatAvrgCalc (const GmElement *e)
 
int TClassicElementToHigher (const GmElement *e, int) const
 
int ElemPosition (int i, int j, int k)
 
int Edge_Face_Ngh (int border)
 
GmVector DofEdge_Face (const GmElement *e, int border) const
 
bool PrintResult ()
 
bool ErrorAnalysis ()
 
bool PeriodicBND ()
 
bool Projection (void)
 
int EdgeVd (int i, int border)
 

Private Attributes

int numShapeFunctions
 Number of Shape functions for each element.
 
double detAffineTransformationMAT
 Determinant of Affine Transformation Matrix.
 
GmMatrix AffineTransformationMAT
 Affine Transformation Matrix used in regular mesh.
 
GmMatrix InvAffineTransformationMAT
 Inverse of Affine Transformation Matrix used in regular mesh.
 
GmMatrix MatFaceIntPoint
 
QList< GmVectorFNeighborhood
 Set of Element CellId's closest to geometric element E, using the euclidian norm.

 
QList< GmVectorSNeighborhood
 Set of Element CellId's ... Please see DG Fem Physics Documentation.

 
QList< GmVectorTNeighborhood
 Set of Element CellId's ... Please see DG Fem Physics Documentation.

 

Detailed Description

Basic class for discontinuous Galerkin fem physics.

Member Enumeration Documentation

◆ BoundaryContidionsIds

Enumerator
BC_C_Inflow_1D_ID 

Id for retrieving the acesso to the Inflow Boundary Condition in 1D Domain.

BC_C_Outflow_1D_ID 

Id for retrieving the acessor to the Concentration Free Boundary in 1D Domain.

BC_C_Inflow_ID 

Id for retrieving the acessor to the Inflow Boundary Condition Type.

BC_C_Outflow_ID 

Id for retrieving the acessor to the Concentration Free Boundary Condition.

BC_Periodic_ID 

Id for retrieving the acessor to the Periodic Boundary Condtion.

◆ ElementPropertyIds

Enumerator
PHI_ID 

Id for retrieving the acessor to the Porosity Scalar Value Function

V_ID 

Id for retrieving the acessor to the Velocity Vector Value Function.

R_ID 

Id for retrieving the accesor to the Reaction Scalar Value Function.

F_ID 

Id for retrieving the acessor to Source/Sink term

IC_ID 

Id for retrieving the accesor to Initial condition.

A_ID 

Id for retrieving the accesor to Analytic Solution

◆ GaussAttributeIds

IDs for physics Gauss attributes.

Enumerator
V_D_ID 

Id for retrieving the Gauss attribute providing the Darcy fluid velocity.

◆ PhysicsAttributeIds

IDs for physics attributes.

Enumerator
NodsX_ID 

Id for retrieving the number of nods in the x direction.

NodsY_ID 

Id for retrieving the number of nods in the y direction.

NodsZ_ID 

Id for retrieving the number of nods in the z direction.

Upwind_ID 

Id for retrieving if is Upwind Numerical Flux.

Implicit_ID 

Id for retrieving if of temporal solver is or not implicit.

Limiter_ID 

Id for retrieving if limiter of coefficient is setup.

Regular_Mesh_ID 

Id for retrieving if is a regular mesh of elements.

Periodic_Bnd_ID 

Id for retrieving if there is a Periodic Bnd Condition.

Couple_ID 

Id for retrieving if there a coupled with diffusive physics.

◆ StateVarIds

IDs fo physics state vars.

Enumerator
C_ID 

Id for retrieving the acessor to the concentration state var.

Member Function Documentation

◆ ErrorAnalysis()

bool GmpDGFemPhysics::ErrorAnalysis ( )
private

Higher Order Discontinuous Galerkin Element Call

◆ fillElementData()

GmpFemPhysics::FemResultType GmpDGFemPhysics::fillElementData ( const GmElement * e,
GmpFemMatrixSet & elemMatrices,
GmpFemVectorSet & elemVectors )
virtual

Fills the element stiffness matrix for element 'e'.

Higher Order Discontinuous Galerkin Element Call

Natural coordinates for the integration point. Size will be set by the integration rule

Natural coordinates for the integration boundary point. Size will be set by the integration rule

The Gauss point weight

The determinant of the Jacobian matrix already scaled due to element type

◆ fillElementDataForBc()

GmpFemPhysics::FemResultType GmpDGFemPhysics::fillElementDataForBc ( const GmElement * e,
const GmBoundaryCondition * bc,
int bcIndex,
int bcListIndex,
int border,
GmpFemMatrixSet & elemMatrices,
GmpFemVectorSet & elemVectors )
virtual

Higher Order Discontinuous Galerkin Element Call

Total Degree of Freedom belong to DG Element

Natural coordinates for the integration point. Size will be set by the integration rule

Natural coordinates for the integration boundary point. Size will be set by the integration rule

The Gauss point weight

The determinant of the Jacobian matrix already scaled due to element type

◆ fixedNodalDofsBc()

bool GmpDGFemPhysics::fixedNodalDofsBc ( QList< int > & nodes,
QList< int > & dof,
QList< double > & values,
bool * constantValues ) const
virtual

Higher Order Discontinuous Galerkin Element Call

Total Degree of Freedom belong to DG Element

Natural coordinates for the integration point. Size will be set by the integration rule

Natural coordinates for the integration boundary point. Size will be set by the integration rule

The Gauss point weight

The determinant of the Jacobian matrix already scaled due to element type

◆ loadPrivateData()

bool GmpDGFemPhysics::loadPrivateData ( LuaTable & table)
virtual

< Loop for each share node/edge/face.

< Neighbor Id.

< Cell belonging to the mesh.

◆ NumericalFlux()

bool GmpDGFemPhysics::NumericalFlux ( const GmElement * e,
int borderE,
GmMatrix & MFluxBorderE,
GmMatrix & MFluxBorderN )
private

< Neighboor Edge

< Upwind Numerical Flux Boolean.

Higher Order Discontinuous Galerkin Element Call

Total Degree of Freedom belong to DG Element

Natural coordinates for the integration point. Size will be set by the integration rule

Natural coordinates for the integration boundary point. Size will be set by the integration rule

Natural coordinates for the integration boundary point. Size will be set by the integration rule

The Gauss point weight

The determinant of the Jacobian matrix already scaled due to element type

◆ physicsMetaDataMap()

const QVariantMap * GmpDGFemPhysics::physicsMetaDataMap ( )
virtual

Returns a pointer to the basic Disc. Galerkin physics attribute map, built when the function is called for the first time. Will be extended by sub-classes providing the reactive term.

< Nods in X direction

< Nods in Y direction

< Nods in Z direction

< Upwind Flux control. See documentation of DGFEM.

< Bool to control implicit or explicit temporal integration.

< Limiter boolean. See documentation of DGFEM

< Regular Mesh control.

< Is there Periodic Bnd Condition?

< ID State Variable

< ID associated to Scalar-Value Function (Ex. Porosity)

< ID associated to Scalar-Value Function (Ex. Reactive)

< ID associated to Scalar-Value Function (Ex. Source/Sink)

< ID associated to Vector-Value Function (Ex. Velocity)

< ID associated to Initial Condition scalar value Function.

< ID associated to Analytic Solution.

< ID associated to PERIODIC Boundary Condition

< ID associated to INFLOW Boundary Condition

< ID associated to FREE Boundary Condition

< ID associated to PERIODIC Boundary Condition

◆ Projection()

bool GmpDGFemPhysics::Projection ( void )
private

Higher Order Discontinuous Galerkin Element Call

◆ setNumFunctions()

bool GmpDGFemPhysics::setNumFunctions ( )
private

Set of number of shape functions for each element.

Number of shape functions associated to each geometric element in mesh.

◆ TopologyMeshSetup()

bool GmpDGFemPhysics::TopologyMeshSetup ( )
private

Assembly of Topology Mesh using a regular geometrical discretization.

: Construction of a topological mesh from a spatial discretization of a regular domain in line/quadrilateral/hexahedral subelements.

◆ TopologyMeshSetup1D()

bool GmpDGFemPhysics::TopologyMeshSetup1D ( )
private

Assembly of Topology Mesh using a 1D regular geometrical discretization

: Topological Mesh Construction in 1 dimension.

< Number of vertex defined on 1 dimension element.

< First Elements Neighboring.

< In a polyhedrical and regular domain, can be defined a corner element set.

< Corner and Border Boolean.

< X-dimension loop

< If there is no neighbor element, it is marked as boundary.

< Border: (i = 0 or i = NumElementX).

◆ TopologyMeshSetup2D()

bool GmpDGFemPhysics::TopologyMeshSetup2D ( )
private

Assembly of Topology Mesh using a 2D regular geometrical discretization.

< Number of edges defined on Quadrilateral Elements.

< Number of vertex on Quadrilateral Elements.

< First Elements Neighboring.

< Second Elements Neighboring.

◆ TopologyMeshSetup3D()

bool GmpDGFemPhysics::TopologyMeshSetup3D ( )
private

Assembly of Topology Mesh using a 3D regular geometrical discretization.

< Number of edges defined on Hexahedral Elements.

< Number of faces defined on Hexahedral Elements.

< First Elements Neighboring.

< Second Elements Neighboring.


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