Hermes2D  2.0
Hermes::Hermes2D::WeakForm< Scalar > Class Template Reference

Represents the weak formulation of a PDE problem. More...

#include <weakform.h>

+ Inheritance diagram for Hermes::Hermes2D::WeakForm< Scalar >:

Public Member Functions

 WeakForm (unsigned int neq=1, bool mat_free=false)
 
 ~WeakForm ()
 Destructor.
 
void add_matrix_form (MatrixFormVol< Scalar > *mfv)
 Adds volumetric matrix form.
 
void add_matrix_form_surf (MatrixFormSurf< Scalar > *mfs)
 Adds surface matrix form.
 
void add_matrix_form_DG (MatrixFormDG< Scalar > *mfDG)
 Adds DG matrix form.
 
void add_vector_form (VectorFormVol< Scalar > *vfv)
 Adds volumetric vector form.
 
void add_vector_form_surf (VectorFormSurf< Scalar > *vfs)
 Adds surface vector form.
 
void add_vector_form_DG (VectorFormDG< Scalar > *vfDG)
 Adds DG vector form.
 
unsigned int get_neq () const
 Returns the number of equations.
 
bool is_matrix_free () const
 
void set_current_time (double time)
 For time-dependent right-hand side functions.
 
void set_current_time_step (double time_step)
 
virtual double get_current_time () const
 
virtual double get_current_time_step () const
 
Hermes::vector< Form< Scalar > * > get_forms () const
 
Hermes::vector< MatrixFormVol
< Scalar > * > 
get_mfvol () const
 
Hermes::vector< MatrixFormSurf
< Scalar > * > 
get_mfsurf () const
 
Hermes::vector< MatrixFormDG
< Scalar > * > 
get_mfDG () const
 
Hermes::vector< VectorFormVol
< Scalar > * > 
get_vfvol () const
 
Hermes::vector< VectorFormSurf
< Scalar > * > 
get_vfsurf () const
 
Hermes::vector< VectorFormDG
< Scalar > * > 
get_vfDG () const
 
void delete_all ()
 Deletes all volumetric and surface forms.
 
void set_ext (MeshFunction< Scalar > *ext)
 external functions.
 
void set_ext (Hermes::vector< MeshFunction< Scalar > * > ext)
 
Hermes::vector< MeshFunction
< Scalar > * > 
get_ext () const
 
virtual WeakFormclone () const
 

Protected Member Functions

bool ** get_blocks (bool force_diagonal_blocks) const
 

Protected Attributes

Hermes::vector< MeshFunction
< Scalar > * > 
ext
 External solutions.
 
double current_time
 
double current_time_step
 
unsigned int neq
 
bool is_matfree
 
Hermes::vector< Form< Scalar > * > forms
 Holds all forms.
 
Hermes::vector< MatrixFormVol
< Scalar > * > 
mfvol
 Holds volumetric matrix forms.
 
Hermes::vector< MatrixFormSurf
< Scalar > * > 
mfsurf
 Holds surface matrix forms.
 
Hermes::vector< MatrixFormDG
< Scalar > * > 
mfDG
 Holds DG matrix forms.
 
Hermes::vector< VectorFormVol
< Scalar > * > 
vfvol
 Holds volumetric vector forms.
 
Hermes::vector< VectorFormSurf
< Scalar > * > 
vfsurf
 Holds surface vector forms.
 
Hermes::vector< VectorFormDG
< Scalar > * > 
vfDG
 Holds DG vector forms.
 
bool warned_nonOverride
 

Friends

class DiscreteProblem< Scalar >
 
class DiscreteProblemLinear< Scalar >
 
class RungeKutta< Scalar >
 
class OGProjection< Scalar >
 
class Hermes::Preconditioners::Precond< Scalar >
 

Detailed Description

template<typename Scalar>
class Hermes::Hermes2D::WeakForm< Scalar >

Represents the weak formulation of a PDE problem.

The WeakForm class represents the weak formulation of a system of linear PDEs.
The number of equations ("neq") in the system is fixed and is passed to the constructor.
The weak formulation of the system A(U, V) = L(V) has a block structure. A(U, V) is
a (neq x neq) matrix of bilinear forms a_mn(u, v) and L(V) is a neq-component vector
of linear forms l(v). U and V are the vectors of basis and test functions.

There is a single tutorial just on implementing the weak formulation.
For some basic ideas, please see the examples provided.

Definition at line 91 of file global.h.

Constructor & Destructor Documentation

template<typename Scalar >
Hermes::Hermes2D::WeakForm< Scalar >::WeakForm ( unsigned int  neq = 1,
bool  mat_free = false 
)

Constructor.

Parameters
[in]neqNumber of equations.
[in]mat_freeIf this weak formulation does not include a matrix - e.g. JFNK method.

Definition at line 37 of file weakform.cpp.


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