Navigation

Operators and Keywords

Function List:

C++ API

Function File: [A], [x(Optional)] = assemble (form_a, DirichletBC)

Construct the discretization of a Form and apply essential BC. The input arguments are

  • form_a which is the form to assemble. It can be a form of rank 2 (BilinearForm or JacobianForm), a form of rank 1 (LinearForm or ResidualForm) or a form of rank 0 (Functional).
  • DirichletBC represents the optional BC applied to the system.

The output A is a discretized representation of the form_a:

  • A is a sparse Matrix if form_a is a bilinear form
  • A is a Vector if form_a is a linear form
  • A is a Double if form_a is a functional

If boundary conditions have to be applied to a vector for a nonlinear problem then it should be provided as second argument and it will be given back as the second output argument. For an example of this situation, please refer to the HyperElasticity example.

See also: BilinearForm, LinearForm, ResidualForm, JacobianForm, Functional.

Package: fem-fenics