OFELI's Logo

An Object Oriented Finite Element Library

Builds finite element arrays for wave propagation in 2-D using 3-Node elements. More...

#include <Pres2DT3.h>

Inherits Equa_Acoustics< NEN_, NEE_, NSN_, NSE_ >.

Public Member Functions

 Pres2DT3 ()
 Default Constructor. Constructs an empty equation.
 
 Pres2DT3 (Mesh &ms)
 Constructor using Mesh data. More...
 
 Pres2DT3 (Mesh &ms, Vect< real_t > &u)
 Constructor using Mesh and initial condition. More...
 
 ~Pres2DT3 ()
 Destructor.
 
void LMass (real_t coef=1)
 Add lumped mass matrix to element matrix after multiplying it by coefficient coef More...
 
void Mass (real_t coef=1)
 Add Consistent mass matrix to element matrix after multiplying it by coefficient coef More...
 
void Diffusion (real_t coef=1)
 Add diffusion matrix to element matrix after multiplying it by coefficient coef More...
 
void BodyRHS (const Vect< real_t > &f)
 Add body right-hand side term to right hand side. More...
 
void BodyRHS (real_t f)
 Add body right-hand side term to right hand side. More...
 
void BoundaryRHS (real_t flux)
 Add boundary right-hand side flux to right hand side. More...
 
void BoundaryRHS (const Vect< real_t > &f)
 Add boundary right-hand side term to right hand side after multiplying it by coefficient coef More...
 
Point< real_t > & Flux () const
 Return (constant) heat flux in element.
 
void Grad (Vect< Point< real_t > > &g)
 Compute gradient of solution. More...
 
Point< real_t > & Grad (const Vect< real_t > &u) const
 Return gradient of a vector in element. More...
 
void setInput (EqDataType opt, Vect< real_t > &u)
 Set equation input data. More...
 

Detailed Description

Builds finite element arrays for wave propagation in 2-D using 3-Node elements.

Note that members calculating element arrays have as an argument a real coef that will be multiplied by the contribution of the current element. This makes possible testing different algorithms.

Constructor & Destructor Documentation

◆ Pres2DT3() [1/2]

Pres2DT3 ( Mesh ms)

Constructor using Mesh data.

Parameters
[in]msMesh instance

◆ Pres2DT3() [2/2]

Pres2DT3 ( Mesh ms,
Vect< real_t > &  u 
)

Constructor using Mesh and initial condition.

Parameters
[in]msMesh instance
[in]uVect instance containing initial solution

Member Function Documentation

◆ BodyRHS() [1/2]

void BodyRHS ( const Vect< real_t > &  f)

Add body right-hand side term to right hand side.

Parameters
[in]fVector containing source at nodes.

◆ BodyRHS() [2/2]

void BodyRHS ( real_t  f)

Add body right-hand side term to right hand side.

Case where the body right-hand side is piecewise constant.

Parameters
[in]fValue of thermal source (Constant in element).

◆ BoundaryRHS() [1/2]

void BoundaryRHS ( const Vect< real_t > &  f)

Add boundary right-hand side term to right hand side after multiplying it by coefficient coef

Parameters
[in]fVector containing source at nodes

◆ BoundaryRHS() [2/2]

void BoundaryRHS ( real_t  flux)

Add boundary right-hand side flux to right hand side.

Parameters
[in]fluxVector containing source at side nodes.

◆ Diffusion()

void Diffusion ( real_t  coef = 1)

Add diffusion matrix to element matrix after multiplying it by coefficient coef

Parameters
[in]coefCoefficient to multiply by added term [Default: 1]

◆ Grad() [1/2]

Point< real_t > & Grad ( const Vect< real_t > &  u) const

Return gradient of a vector in element.

Parameters
[in]uGlobal vector for which gradient is computed. Vector u has as size the total number of nodes

◆ Grad() [2/2]

void Grad ( Vect< Point< real_t > > &  g)

Compute gradient of solution.

Parameters
[in]gElementwise vector containing gradient of solution.

◆ LMass()

void LMass ( real_t  coef = 1)

Add lumped mass matrix to element matrix after multiplying it by coefficient coef

Parameters
[in]coefCoefficient to multiply by added term [Default: 1].

◆ Mass()

void Mass ( real_t  coef = 1)

Add Consistent mass matrix to element matrix after multiplying it by coefficient coef

Parameters
[in]coefCoefficient to multiply by added term [Default: 1]

◆ setInput()

void setInput ( EqDataType  opt,
Vect< real_t > &  u 
)

Set equation input data.

Parameters
[in]optParameter to select type of input (enumerated values)
  • INITIAL_FIELD: Initial temperature
  • BOUNDARY_CONDITION_DATA: Boundary condition (Dirichlet)
  • SOURCE_DATA: Heat source
  • FLUX_DATA: Heat flux (Neumann boundary condition)
  • SPEED: Speed vector (for the convection term)
[in]uVector containing input data





Copyright © 1998-2023 Rachid Touzani