Public Member Functions |
| | form_basic () |
| | form_basic (const form_basic< T, M > &) |
| | form_basic (const space_type &X, const space_type &Y, const std::string &name="", const quadrature_option_type &qopt=quadrature_option_type(quadrature_option_type::max_family, 0)) |
| | form_basic (const space_type &X, const space_type &Y, const std::string &name, const field_basic< T, M > &weight, const quadrature_option_type &qopt=quadrature_option_type(quadrature_option_type::max_family, 0)) |
| | form_basic (const space_type &X, const space_type &Y, const std::string &name, const band_basic< T, M > &bh, const quadrature_option_type &qopt=quadrature_option_type(quadrature_option_type::max_family, 0)) |
| template<class Function > |
| | form_basic (const space_type &X, const space_type &Y, const std::string &name, Function weight, const quadrature_option_type &qopt=quadrature_option_type(quadrature_option_type::max_family, 0)) |
| | form_basic (const space_type &X, const space_type &Y, const std::string &name, const geo_basic< T, M > &gamma, const quadrature_option_type &qopt=quadrature_option_type(quadrature_option_type::max_family, 0)) |
| | form_basic (const space_type &X, const space_type &Y, const std::string &name, const geo_basic< T, M > &gamma, const field_basic< T, M > &weight, const quadrature_option_type &qopt=quadrature_option_type(quadrature_option_type::max_family, 0)) |
| template<class Function > |
| | form_basic (const space_type &X, const space_type &Y, const std::string &name, const geo_basic< T, M > &gamma, Function weight, const quadrature_option_type &qopt=quadrature_option_type(quadrature_option_type::max_family, 0)) |
| | form_basic (const std::initializer_list< form_concat_value< T, M > > &init_list) |
| | form_basic (const std::initializer_list< form_concat_line< T, M > > &init_list) |
| const space_type & | get_first_space () const |
| const space_type & | get_second_space () const |
| const geo_type & | get_geo () const |
| const communicator & | comm () const |
| form_basic< T, M > | operator+ (const form_basic< T, M > &b) const |
| form_basic< T, M > | operator- (const form_basic< T, M > &b) const |
| form_basic< T, M > | operator* (const form_basic< T, M > &b) const |
| form_basic< T, M > & | operator*= (const T &lambda) |
| field_basic< T, M > | operator* (const field_basic< T, M > &xh) const |
| field_basic< T, M > | trans_mult (const field_basic< T, M > &yh) const |
| float_type | operator() (const field_basic< T, M > &uh, const field_basic< T, M > &vh) const |
| odiststream & | put (odiststream &ops, bool show_partition=true) const |
| void | dump (std::string name) const |
| const csr< T, M > & | uu () const |
| const csr< T, M > & | ub () const |
| const csr< T, M > & | bu () const |
| const csr< T, M > & | bb () const |
| csr< T, M > & | set_uu () |
| csr< T, M > & | set_ub () |
| csr< T, M > & | set_bu () |
| csr< T, M > & | set_bb () |
template<class T, class M>
class rheolef::form_basic< T, M >
form - representation of a finite element bilinear form
The form class groups four sparse matrix, associated to a bilinear form on two finite element spaces:
The operator A associated to the bilinear form is defined by:
A: U ----> V'
u |---> A(u)
where u and v are fields (see field), and A(u) is such that a(u,v)=<A(u),v> for all u in U and v in V and where <.,.> denotes the duality product between V and V'. Since V is a finite dimensional spaces, the duality product is the euclidian product in IR^dim(V).
Since both U and V are finite dimensional spaces, the linear operator can be represented by a matrix. The form class is represented by four sparse matrix in csr format (see csr), associated to unknown and blocked degrees of freedom of origin and destination spaces (see space).
EXAMPLE
The operator A associated to a bilinear form a(.,.) by the relation (Au,v) = a(u,v) could be applied by using a sample matrix notation A*u, as shown by the following code:
form a (V,V,
"grad_grad");
cout << v;
The form-field vh=a*uh operation is equivalent to the following matrix-vector operations:
vh.set_u() = a.uu()*uh.u() + a.ub()*uh.b();
vh.set_b() = a.bu()*uh.u() + a.bb()*uh.b();
ALGEBRA
Forms, as matrices (see csr), support linear algebra: Adding or substracting two forms writes a+b and a-b, respectively, and multiplying a form by a field uh writes a*uh. Thus, any linear combination of forms is available.
WEIGHTED FORM
A weighted form is a form with an extra weight function w(x), e.g.:
/
|
a(uh,vh) = | grad(uh).grad(vh) w(x) dx
|
/ Omega
In the present implementation, w can be any field, function or class-function or any nonlinear field expression (see field). As the integration cannot be performed exactly in general, a quadrature formula can be supplied. This feature is extensively used when solving nonlinear problems.
- See Also
- csr, field, space.
Definition at line 98 of file form.h.