WeakForm Class Reference

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

#include <weakform.h>

List of all members.

Classes

struct  Area
struct  BiFormSurf
struct  BiFormVol
struct  JacFormSurf
struct  JacFormVol
struct  LiFormSurf
struct  LiFormVol
struct  ResFormSurf
struct  ResFormVol
struct  Stage

Public Types

typedef scalar(* biform_val_t )(int n, double *wt, Func< double > *u, Func< double > *v, Geom< double > *e, ExtData< scalar > *)
typedef Ord(* biform_ord_t )(int n, double *wt, Func< Ord > *u, Func< Ord > *v, Geom< Ord > *e, ExtData< Ord > *)
typedef scalar(* liform_val_t )(int n, double *wt, Func< double > *v, Geom< double > *e, ExtData< scalar > *v_ext_fnc)
typedef Ord(* liform_ord_t )(int n, double *wt, Func< Ord > *v, Geom< Ord > *e, ExtData< Ord > *v_ext_fnc)
typedef scalar(* liform_val_extended_t )(int n, double *wt, Func< double > *v, Geom< double > *e, ExtData< scalar > *v_ext_fnc, Element *element, Shapeset *shape_set, int shape_inx)
typedef Ord(* liform_ord_extended_t )(int n, double *wt, Func< Ord > *v, Geom< Ord > *e, ExtData< Ord > *v_ext_fnc, Element *element, Shapeset *shape_set, int shape_inx)
typedef scalar(* jacform_val_t )(int n, double *wt, Func< scalar > *u[], Func< double > *vi, Func< double > *vj, Geom< double > *e, ExtData< scalar > *)
typedef Ord(* jacform_ord_t )(int n, double *wt, Func< Ord > *u[], Func< Ord > *vi, Func< Ord > *vj, Geom< Ord > *e, ExtData< Ord > *)
typedef scalar(* resform_val_t )(int n, double *wt, Func< scalar > *u[], Func< double > *vi, Geom< double > *e, ExtData< scalar > *)
typedef Ord(* resform_ord_t )(int n, double *wt, Func< Ord > *u[], Func< Ord > *vi, Geom< Ord > *e, ExtData< Ord > *)

Public Member Functions

 WeakForm (int neq=1, bool mat_free=false)
int def_area (int n,...)
void add_biform (int i, int j, biform_val_t fn, biform_ord_t ord, SymFlag sym=H2D_UNSYM, int area=H2D_ANY, int nx=0,...)
void add_biform (biform_val_t fn, biform_ord_t ord, SymFlag sym=H2D_UNSYM, int area=H2D_ANY, int nx=0,...)
void add_biform_surf (int i, int j, biform_val_t fn, biform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_biform_surf (biform_val_t fn, biform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_liform (int i, liform_val_t fn, liform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_liform (liform_val_t fn, liform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_liform_surf (int i, liform_val_t fn, liform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_liform_surf (liform_val_t fn, liform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_liform (int i, liform_val_extended_t fn, liform_ord_extended_t ord, int area=H2D_ANY, int nx=0,...)
void add_liform (liform_val_extended_t fn, liform_ord_extended_t ord, int area=H2D_ANY, int nx=0,...)
void add_jacform (int i, int j, jacform_val_t fn, jacform_ord_t ord, SymFlag sym=H2D_UNSYM, int area=H2D_ANY, int nx=0,...)
void add_jacform (jacform_val_t fn, jacform_ord_t ord, SymFlag sym=H2D_UNSYM, int area=H2D_ANY, int nx=0,...)
void add_jacform_surf (int i, int j, jacform_val_t fn, jacform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_jacform_surf (jacform_val_t fn, jacform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_resform (int i, resform_val_t fn, resform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_resform (resform_val_t fn, resform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_resform_surf (int i, resform_val_t fn, resform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void add_resform_surf (resform_val_t fn, resform_ord_t ord, int area=H2D_ANY, int nx=0,...)
void set_ext_fns (void *fn, int nx,...)
int get_seq () const
 Internal. Used by LinSystem to detect changes in the weakform.
bool is_matrix_free ()

Protected Member Functions

 H2D_API_USED_STL_VECTOR (Area)
 H2D_API_USED_STL_VECTOR (MeshFunction *)
 H2D_API_USED_STL_VECTOR (BiFormVol)
 H2D_API_USED_STL_VECTOR (BiFormSurf)
 H2D_API_USED_STL_VECTOR (LiFormVol)
 H2D_API_USED_STL_VECTOR (LiFormSurf)
void get_stages (Space **spaces, std::vector< Stage > &stages, bool rhsonly)
bool ** get_blocks ()
 Returns a (neq x neq) array containing true in each element, if the corresponding block of weak forms is used, and false otherwise.
bool is_in_area (int marker, int area) const
bool is_sym () const

Protected Attributes

int neq
int seq
bool is_matfree
std::vector< Areaareas
std::vector< BiFormVolbfvol
std::vector< BiFormSurfbfsurf
std::vector< LiFormVollfvol
std::vector< LiFormSurflfsurf
std::vector< JacFormVoljfvol
std::vector< JacFormSurfjfsurf
std::vector< ResFormVolrfvol
std::vector< ResFormSurfrfsurf

Friends

class LinSystem
class NonlinSystem
class RefSystem
class RefNonlinSystem
class FeProblem
class Precond

Detailed Description

Represents the weak formulation of a 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.


Member Typedef Documentation

typedef Ord(* WeakForm::biform_ord_t)(int n, double *wt, Func< Ord > *u, Func< Ord > *v, Geom< Ord > *e, ExtData< Ord > *)
typedef scalar(* WeakForm::biform_val_t)(int n, double *wt, Func< double > *u, Func< double > *v, Geom< double > *e, ExtData< scalar > *)
typedef Ord(* WeakForm::jacform_ord_t)(int n, double *wt, Func< Ord > *u[], Func< Ord > *vi, Func< Ord > *vj, Geom< Ord > *e, ExtData< Ord > *)
typedef scalar(* WeakForm::jacform_val_t)(int n, double *wt, Func< scalar > *u[], Func< double > *vi, Func< double > *vj, Geom< double > *e, ExtData< scalar > *)
typedef Ord(* WeakForm::liform_ord_extended_t)(int n, double *wt, Func< Ord > *v, Geom< Ord > *e, ExtData< Ord > *v_ext_fnc, Element *element, Shapeset *shape_set, int shape_inx)
typedef Ord(* WeakForm::liform_ord_t)(int n, double *wt, Func< Ord > *v, Geom< Ord > *e, ExtData< Ord > *v_ext_fnc)
typedef scalar(* WeakForm::liform_val_extended_t)(int n, double *wt, Func< double > *v, Geom< double > *e, ExtData< scalar > *v_ext_fnc, Element *element, Shapeset *shape_set, int shape_inx)
typedef scalar(* WeakForm::liform_val_t)(int n, double *wt, Func< double > *v, Geom< double > *e, ExtData< scalar > *v_ext_fnc)
typedef Ord(* WeakForm::resform_ord_t)(int n, double *wt, Func< Ord > *u[], Func< Ord > *vi, Geom< Ord > *e, ExtData< Ord > *)
typedef scalar(* WeakForm::resform_val_t)(int n, double *wt, Func< scalar > *u[], Func< double > *vi, Geom< double > *e, ExtData< scalar > *)

Constructor & Destructor Documentation

WeakForm::WeakForm ( int  neq = 1,
bool  mat_free = false 
)

Member Function Documentation

void WeakForm::add_biform ( biform_val_t  fn,
biform_ord_t  ord,
SymFlag  sym = H2D_UNSYM,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_biform ( int  i,
int  j,
biform_val_t  fn,
biform_ord_t  ord,
SymFlag  sym = H2D_UNSYM,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_biform_surf ( biform_val_t  fn,
biform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_biform_surf ( int  i,
int  j,
biform_val_t  fn,
biform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_jacform ( jacform_val_t  fn,
jacform_ord_t  ord,
SymFlag  sym = H2D_UNSYM,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_jacform ( int  i,
int  j,
jacform_val_t  fn,
jacform_ord_t  ord,
SymFlag  sym = H2D_UNSYM,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_jacform_surf ( jacform_val_t  fn,
jacform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_jacform_surf ( int  i,
int  j,
jacform_val_t  fn,
jacform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_liform ( liform_val_extended_t  fn,
liform_ord_extended_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_liform ( int  i,
liform_val_extended_t  fn,
liform_ord_extended_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_liform ( liform_val_t  fn,
liform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_liform ( int  i,
liform_val_t  fn,
liform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_liform_surf ( liform_val_t  fn,
liform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_liform_surf ( int  i,
liform_val_t  fn,
liform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_resform ( resform_val_t  fn,
resform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_resform ( int  i,
resform_val_t  fn,
resform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_resform_surf ( resform_val_t  fn,
resform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
void WeakForm::add_resform_surf ( int  i,
resform_val_t  fn,
resform_ord_t  ord,
int  area = H2D_ANY,
int  nx = 0,
  ... 
)
int WeakForm::def_area ( int  n,
  ... 
)
bool ** WeakForm::get_blocks (  )  [protected]

Returns a (neq x neq) array containing true in each element, if the corresponding block of weak forms is used, and false otherwise.

int WeakForm::get_seq (  )  const [inline]

Internal. Used by LinSystem to detect changes in the weakform.

void WeakForm::get_stages ( Space **  spaces,
std::vector< Stage > &  stages,
bool  rhsonly 
) [protected]
WeakForm::H2D_API_USED_STL_VECTOR ( LiFormSurf   )  [protected]
WeakForm::H2D_API_USED_STL_VECTOR ( LiFormVol   )  [protected]
WeakForm::H2D_API_USED_STL_VECTOR ( BiFormSurf   )  [protected]
WeakForm::H2D_API_USED_STL_VECTOR ( BiFormVol   )  [protected]
WeakForm::H2D_API_USED_STL_VECTOR ( MeshFunction  )  [protected]
WeakForm::H2D_API_USED_STL_VECTOR ( Area   )  [protected]
bool WeakForm::is_in_area ( int  marker,
int  area 
) const [inline, protected]
bool WeakForm::is_matrix_free (  )  [inline]
bool WeakForm::is_sym (  )  const [inline, protected]
void WeakForm::set_ext_fns ( void *  fn,
int  nx,
  ... 
)

Friends And Related Function Documentation

friend class FeProblem [friend]
friend class LinSystem [friend]
friend class NonlinSystem [friend]
friend class Precond [friend]
friend class RefNonlinSystem [friend]
friend class RefSystem [friend]

Member Data Documentation

std::vector<Area> WeakForm::areas [protected]
std::vector<BiFormSurf> WeakForm::bfsurf [protected]
std::vector<BiFormVol> WeakForm::bfvol [protected]
bool WeakForm::is_matfree [protected]
std::vector<JacFormSurf> WeakForm::jfsurf [protected]
std::vector<JacFormVol> WeakForm::jfvol [protected]
std::vector<LiFormSurf> WeakForm::lfsurf [protected]
std::vector<LiFormVol> WeakForm::lfvol [protected]
int WeakForm::neq [protected]
std::vector<ResFormSurf> WeakForm::rfsurf [protected]
std::vector<ResFormVol> WeakForm::rfvol [protected]
int WeakForm::seq [protected]

The documentation for this class was generated from the following files:
Generated on Sat Jun 5 15:17:44 2010 for Hermes2D Library: Real Version by  doxygen 1.6.3