Bases: dolfin.cpp.fem.HierarchicalForm
Base class for UFC code generated by FFC for DOLFIN with option -l.
A note on the order of trial and test spaces: FEniCS numbers argument spaces starting with the leading dimension of the corresponding tensor (matrix). In other words, the test space is numbered 0 and the trial space is numbered 1. However, in order to have a notation that agrees with most existing finite element literature, in particular
a = a(u, v)
the spaces are numbered from right to
a: V_1 x V_0 -> R
Note
Figure out how to write this in math mode without it getting messed up in the Python version.
This is reflected in the ordering of the spaces that should be supplied to generated subclasses. In particular, when a bilinear form is initialized, it should be initialized as
a(V_1, V_0) = ...
where V_1 is the trial space and V_0 is the test space. However, when a form is initialized by a list of argument spaces (the variable function_spaces in the constructors below, the list of spaces should start with space number 0 (the test space) and then space number 1 (the trial space).
Overloaded versions
Form(rank, num_coefficients)
Create form of given rank with given number of coefficients
The rank.
The number of coefficients.
Form(ufc_form, function_spaces, coefficients)
Create form (shared data)
The UFC form.
Vector of function spaces.
Vector of coefficients.
Return cell domains (zero pointer if no domains have been specified)
Check function spaces and coefficients
Overloaded versions
coefficient(i)
Return coefficient with given number
Index
The coefficient.
coefficient(name)
Return coefficient with given name
The name.
The coefficient.
Return the name of the coefficient with this number
Return the number of the coefficient with this name
Return all coefficients
Return coloring type for colored (multi-threaded) assembly of form over a mesh entity of a given dimension
Return exterior facet domains (zero pointer if no domains have been specified)
Return function space for given argument
- Arguments
- i (std::size_t)
- Index
- Returns
- _FunctionSpace_
- Function space shared pointer.
Return function spaces for arguments
Return interior facet domains (zero pointer if no domains have been specified)
Extract common mesh from form
Return mesh shared pointer (if any)
Return number of coefficients
Return rank of form (bilinear form = 2, linear form = 1, functional = 0, etc)
Set cell domains
Overloaded versions
set_coefficient(i, coefficient)
Set coefficient with given number (shared pointer version)
The given number.
The coefficient.
set_coefficient(name, coefficient)
Set coefficient with given name (shared pointer version)
The name.
The coefficient.
Set all coefficients in given map. All coefficients in the given map, which may contain only a subset of the coefficients of the form, will be set.
Set exterior facet domains
Set interior facet domains
Set mesh, necessary for functionals when there are no function spaces
Set some coefficients in given map. Each coefficient in the given map will be set, if the name of the coefficient matches the name of a coefficient in the form.
This is useful when reusing the same coefficient map for several forms, or when some part of the form has been outcommented (for testing) in the UFL file, which means that the coefficient and attaching it to the form does not need to be outcommented in a C++ program using code from the generated UFL file.
Set vertex domains
The membership flag
Return UFC form shared pointer
Return vertex domains (zero pointer if no domains have been specified)