form_element(7) bilinear form on a single element


The form_element class defines functions that compute a bilinear form defined between two polynomial basis on a single geometrical element. This bilinear form is represented by a matrix.

The bilinear form is designated by a string, e.g. "mass", "grad_grad", ... indicating the form. The form depends also of the geometrical element: triangle, square, tetrahedron (see geo_element(2)).


The form_element class is managed by (see smart_pointer(2)). This class uses a pointer on a pure virtual class form_element_rep while the effective code refers to the specific concrete derived classes: mass, grad_grad, etc.


template <class T, class M>
class form_element : public smart_pointer<form_element_rep<T,M> > {
// typedefs:
    typedef form_element_rep<T,M>         rep;
    typedef smart_pointer<rep>            base;
    typedef typename rep::size_type       size_type;
    typedef typename rep::vertex_type     vertex_type;
    typedef typename rep::space_type      space_type;
    typedef typename rep::geo_type        geo_type;
    typedef typename rep::coordinate_type coordinate_type;
// constructors:
    form_element ();
    form_element (
        std::string           name,
        const space_type&     X,
        const space_type&     Y,
        const geo_type&       omega,
        const quadrature_option_type& qopt);
// accessors & modifier:
    void operator() (const geo_element& K, ublas::matrix<T>& m) const;
    virtual bool is_symmetric () const;
// for scalar-weighted forms:
    void set_weight (const field_basic<T,M>& wh) const;
    bool is_weighted() const;
    const field_basic<T,M>& get_weight () const;
// for banded level set method:
    bool is_on_band() const;
    const band_basic<T,M>& get_band() const;
    void set_band (const band_basic<T,M>& bh) const;