Loading...
Searching...
No Matches
<tt>integrate_option</tt>

expression integration options

# Description

This class sends options to the `integrate` function, when building a `form` or a `field`.

Its allows one to choose the quadrature formula used during the numerical integration (Gauss, Gauss-Lobatto, etc) and the polynomial degree that is exactly integrated. This exactly integrated polynomial degree is called here the `order` of the quadrature formula. See also `quadrature` for examples of quadrature formula.

In addition to the customization of the quadrature formula, the present class provides some booleaan flags, e.g. computation of the inverse matrix.

# Quadrature families

`gauss`

> ‍ The Gauss formula is the default.

`gauss_lobatto`

> ‍ The Gauss-Lobatto formula is useful in some cases, e.g. when using the method of `characteristic`. It is actually implemented for order <= 2.

`gauss_radau`

> ‍ The Gauss-Radau formula is another classical alternative.

`middle_edge`

> ‍ The nodes are located at the midle edge. This formula is useful in some special cases and its order is limited.

`superconvergent`

> ‍ Another special case, for testing superconvergence of the finite element method at some specific nodes.

`equispaced`

> ‍ When the solution has low regularity, e.g. is discontinuous across elements, this simple formula is also useful. In that case, the `order` parameter refers to the number of nodes used and not to the degree of polynomial exactly integated. For instance, `order=1` refers to the trapezoidal formulae and for the general case, there are `order+1` nodes per edges.

# Boolean flags

`invert`

> ‍ This flag, when set, performs a local inversion on the matrix at the element level: This procedure is allowed only when the global matrix is block diagonal, e.g. for discontinuous or bubble approximations. This property is true when basis functions have a compact support inside exactly one element. Default is `invert=false`.

`ignore_sys_coord`

> ‍ This flag has effects only for axisymmetric coordinate systems. When set, it omits the `r` weight in the `r dr dz` measure during the numerical integration performed the `integrate` function. This feature is useful for computing the stream function in the axisymmetric case. Default is `ignore_sys_coord=false`.

`lump`

> ‍ This flag, when set, performs a mass lumping procedure on the matrix at the element level:

a(i,i) += sum(j!=i) a(i,j)

> ‍ The resulting matrix is diagonal. This feature is useful for computing a diagonal approximation of the mass matrix for the continuous `P1` element. Default is `lump=false`.

# Implementation

This documentation has been generated from file fem/geo_element/integrate_option.h

class integrate_option {
public:
// typedefs:
typedef size_t size_type;
typedef enum {
gauss = 0,
gauss_lobatto = 1,
gauss_radau = 2,
middle_edge = 3,
superconvergent = 4,
equispaced = 5,
max_family = 6
} family_type; // update also family_name[] in quatrature.cc
static const size_type unset_order = std::numeric_limits<size_type>::max();
static const size_type default_order = unset_order;
static const family_type default_family = gauss;
// allocators:
integrate_option(
family_type ft = default_family,
size_type k = default_order);
integrate_option (const std::string& name);
integrate_option (const integrate_option& iopt);
integrate_option& operator= (const integrate_option& iopt);
// accessors & modifiers:
std::string name() const;
size_t get_order() const;
family_type get_family() const;
std::string get_family_name() const;
void reset (const std::string& name);
void set_order (size_t r);
void set_family (family_type type);
void set_family (std::string name);
// data:
bool invert, ignore_sys_coord, lump;
size_type
field::size_type size_type
Definition branch.cc:430
rheolef::integrate_option::lump
bool lump
Definition integrate_option.h:168
rheolef::integrate_option::invert
bool invert
Definition integrate_option.h:168
rheolef::integrate_option::name
std::string name() const
rheolef::integrate_option::family_type
family_type
Definition integrate_option.h:131
rheolef::integrate_option::equispaced
@ equispaced
Definition integrate_option.h:137
rheolef::integrate_option::gauss_lobatto
@ gauss_lobatto
Definition integrate_option.h:133
rheolef::integrate_option::gauss
@ gauss
Definition integrate_option.h:132
rheolef::integrate_option::gauss_radau
@ gauss_radau
Definition integrate_option.h:134
rheolef::integrate_option::superconvergent
@ superconvergent
Definition integrate_option.h:136
rheolef::integrate_option::middle_edge
@ middle_edge
Definition integrate_option.h:135
rheolef::integrate_option::max_family
@ max_family
Definition integrate_option.h:138
rheolef::integrate_option::reset
void reset(const std::string &name)
rheolef::integrate_option::set_family
void set_family(family_type type)
Definition integrate_option.h:260
rheolef::integrate_option::size_type
size_t size_type
Definition integrate_option.h:129
rheolef::integrate_option::operator=
integrate_option & operator=(const integrate_option &iopt)
Definition integrate_option.h:229
rheolef::integrate_option::default_family
static const family_type default_family
Definition integrate_option.h:143
rheolef::integrate_option::get_family_name
std::string get_family_name() const
rheolef::integrate_option::get_family
family_type get_family() const
Definition integrate_option.h:248
rheolef::integrate_option::set_order
void set_order(size_t r)
Definition integrate_option.h:254
rheolef::integrate_option::ignore_sys_coord
bool ignore_sys_coord
Definition integrate_option.h:168
rheolef::integrate_option::get_order
size_t get_order() const
Definition integrate_option.h:242
rheolef::integrate_option::default_order
static const size_type default_order
Definition integrate_option.h:142
rheolef::integrate_option::unset_order
static const size_type unset_order
Definition integrate_option.h:141
};