Galeri Development
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Galeri::FiniteElements::GalerkinVariational< T > Class Template Reference

Defines a pure Galerkin variational form of a scalar PDE. More...

#include <Galeri_GalerkinVariational.h>

Inheritance diagram for Galeri::FiniteElements::GalerkinVariational< T >:
Inheritance graph
[legend]
Collaboration diagram for Galeri::FiniteElements::GalerkinVariational< T >:
Collaboration graph
[legend]

Public Member Functions

 GalerkinVariational (const int NumQuadratureNodes, double(*diff)(const double &, const double &, const double &), double(*source)(const double &, const double &, const double &), double(*force)(const double &, const double &, const double &), double(*bc)(const double &, const double &, const double &, const int &), int(*bc_type)(const int &))
 Constructor.
 
 ~GalerkinVariational ()
 Destructor.

 
double diff (const double x, const double y, const double z) const
 Evaluates the diffusion coefficient at point (x, y, z).
 
double source (const double x, const double y, const double z) const
 Evaluates the source term at point (x, y, z).
 
double force (const double x, const double y, const double z) const
 Evaluates the force term at point (x, y, z).
 
virtual int IntegrateOverElement (const AbstractVariational &Variational, const double *x, const double *y, const double *z, const double *data, double *ElementMatrix, double *ElementRHS) const
 Integrates the variational form and the right-hand side.
 
virtual int ElementNorm (const double *LocalSol, const double *x, const double *y, const double *z, double *Norm) const
 Computes the norm of the numerical solution over an element.
 
virtual int ElementNorm (int(*ExactSolution)(double, double, double, double *), const double *x, const double *y, const double *z, double *Norm) const
 Computes the norm of the exact solution over an element.
 
virtual int ElementNorm (const double *LocalSol, int(*ExactSolution)(double, double, double, double *), const double *x, const double *y, const double *z, double *Norm) const
 Computes the norm of the error over an element.
 
double LHS (const double Phi, const double Psi, const double PhiX, const double PsiX, const double PhiY, const double PsiY, const double PhiZ, const double PsiZ, const double x, const double y, const double z) const
 Evaluates the left-hand side at point (x, y, z).
 
double RHS (const double Psi, const double PsiX, const double PsiY, const double PsiZ, const double x, const double y, const double z) const
 Evaluates the right-hand side at point (x, y, z).
 
int BC (const int PatchID) const
 Returns the boundary condition type of the specified patch.
 
double BC (const double x, const double y, const double z, const int PatchID) const
 Returns the value of the boundary condition at point (x, y, z).
 
- Public Member Functions inherited from Galeri::FiniteElements::AbstractVariational
virtual ~AbstractVariational ()
 Destructor.
 
virtual double LHS (const double Phi, const double Psi, const double PhiX, const double PsiX, const double PhiY, const double PsiY, const double PhiZ, const double PsiZ, const double x, const double y, const double z) const =0
 Evaluates the bilinear form (without integral) at point (x,y,z).
 
virtual double RHS (const double Psi, const double PsiX, const double PsiY, const double PsiZ, const double x, const double y, const double z) const =0
 Returns the value of the right-hand side (without integral) at point (x, y, z).
 
virtual int BC (const int PatchID) const =0
 Returns an integer identifying the boundary condition assigned to the specified patch.
 
virtual double BC (const double x, const double y, const double z, const int PatchID) const =0
 Returns the value of the boundary condition at point (x, y, z).
 
virtual int IntegrateOverElement (const AbstractVariational &Variational, const double *x, const double *y, const double *z, const double *data, double *ElementMatrix, double *ElementRHS) const =0
 Integrates the bilinear form and the right-hand side over the element.
 
virtual int ElementNorm (const double *LocalSol, const double *x, const double *y, const double *z, double *Norm) const =0
 Computes the norm of the computed solution over the element.
 
virtual int ElementNorm (int(*ExactSolution)(double, double, double, double *), const double *x, const double *y, const double *z, double *Norm) const =0
 Computed the norm of the exact solution over the element.
 
virtual int ElementNorm (const double *LocalSol, int(*ExactSolution)(double, double, double, double *), const double *x, const double *y, const double *z, double *Norm) const =0
 Computed the norm of the computed and exact solution over the element.
 

Detailed Description

template<class T>
class Galeri::FiniteElements::GalerkinVariational< T >

Defines a pure Galerkin variational form of a scalar PDE.

This class defines a pure Galerkin variational form of a second order, symmetric scalar PDE, discretized using Lagrange finite elements. The class is templated with an AbstractQuadrature class, which will be used to specify the quadrature formula, and the values of test and basis functions at the quadrature node. The constructor requires function pointers, that specify the values of the coefficients.

Author
Marzio Sala, SNL 9214.
Date
Last updated on Apr-05.

Member Function Documentation

◆ BC() [1/2]

template<class T >
double Galeri::FiniteElements::GalerkinVariational< T >::BC ( const double  x,
const double  y,
const double  z,
const int  PatchID 
) const
inlinevirtual

Returns the value of the boundary condition at point (x, y, z).

Implements Galeri::FiniteElements::AbstractVariational.

◆ BC() [2/2]

template<class T >
int Galeri::FiniteElements::GalerkinVariational< T >::BC ( const int  PatchID) const
inlinevirtual

Returns the boundary condition type of the specified patch.

Implements Galeri::FiniteElements::AbstractVariational.

◆ ElementNorm() [1/3]

template<class T >
virtual int Galeri::FiniteElements::GalerkinVariational< T >::ElementNorm ( const double *  LocalSol,
const double *  x,
const double *  y,
const double *  z,
double *  Norm 
) const
inlinevirtual

Computes the norm of the numerical solution over an element.

Implements Galeri::FiniteElements::AbstractVariational.

◆ ElementNorm() [2/3]

template<class T >
virtual int Galeri::FiniteElements::GalerkinVariational< T >::ElementNorm ( const double *  LocalSol,
int(*)(double, double, double, double *)  ExactSolution,
const double *  x,
const double *  y,
const double *  z,
double *  Norm 
) const
inlinevirtual

Computes the norm of the error over an element.

Implements Galeri::FiniteElements::AbstractVariational.

References Galeri::FiniteElements::GalerkinVariational< T >::diff().

◆ ElementNorm() [3/3]

template<class T >
virtual int Galeri::FiniteElements::GalerkinVariational< T >::ElementNorm ( int(*)(double, double, double, double *)  ExactSolution,
const double *  x,
const double *  y,
const double *  z,
double *  Norm 
) const
inlinevirtual

Computes the norm of the exact solution over an element.

Implements Galeri::FiniteElements::AbstractVariational.

◆ IntegrateOverElement()

template<class T >
virtual int Galeri::FiniteElements::GalerkinVariational< T >::IntegrateOverElement ( const AbstractVariational Variational,
const double *  x,
const double *  y,
const double *  z,
const double *  data,
double *  ElementMatrix,
double *  ElementRHS 
) const
inlinevirtual

◆ LHS()

template<class T >
double Galeri::FiniteElements::GalerkinVariational< T >::LHS ( const double  Phi,
const double  Psi,
const double  PhiX,
const double  PsiX,
const double  PhiY,
const double  PsiY,
const double  PhiZ,
const double  PsiZ,
const double  x,
const double  y,
const double  z 
) const
inlinevirtual

◆ RHS()

template<class T >
double Galeri::FiniteElements::GalerkinVariational< T >::RHS ( const double  Psi,
const double  PsiX,
const double  PsiY,
const double  PsiZ,
const double  x,
const double  y,
const double  z 
) const
inlinevirtual

Evaluates the right-hand side at point (x, y, z).

Implements Galeri::FiniteElements::AbstractVariational.

References Galeri::FiniteElements::GalerkinVariational< T >::force().


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