|
| Form (const std::vector< std::shared_ptr< const FunctionSpace >> &function_spaces, const std::map< IntegralType, std::pair< std::vector< std::pair< int, std::function< void(T *, const T *, const T *, const scalar_value_type_t *, const int *, const std::uint8_t *)>>>, const mesh::MeshTags< int > * >> &integrals, const std::vector< std::shared_ptr< const Function< T >>> &coefficients, const std::vector< std::shared_ptr< const Constant< T >>> &constants, bool needs_facet_permutations, const std::shared_ptr< const mesh::Mesh > &mesh=nullptr) |
| Create a finite element form. More...
|
|
| Form (const Form &form)=delete |
| Copy constructor.
|
|
| Form (Form &&form)=default |
| Move constructor.
|
|
virtual | ~Form ()=default |
| Destructor.
|
|
int | rank () const |
| Rank of the form (bilinear form = 2, linear form = 1, functional = 0, etc) More...
|
|
std::shared_ptr< const mesh::Mesh > | mesh () const |
| Extract common mesh for the form. More...
|
|
const std::vector< std::shared_ptr< const FunctionSpace > > & | function_spaces () const |
| Return function spaces for all arguments. More...
|
|
const std::function< void(T *, const T *, const T *, const scalar_value_type_t *, const int *, const std::uint8_t *)> & | kernel (IntegralType type, int i) const |
| Get the function for 'kernel' for integral i of given type. More...
|
|
std::set< IntegralType > | integral_types () const |
| Get types of integrals in the form. More...
|
|
int | num_integrals (IntegralType type) const |
| Number of integrals of given type. More...
|
|
std::vector< int > | integral_ids (IntegralType type) const |
| Get the IDs for integrals (kernels) for given integral type. The IDs correspond to the domain IDs which the integrals are defined for in the form. ID=-1 is the default integral over the whole domain. More...
|
|
const std::vector< std::int32_t > & | cell_domains (int i) const |
| Get the list of cell indices for the ith integral (kernel) for the cell domain type. More...
|
|
const std::vector< std::int32_t > & | exterior_facet_domains (int i) const |
| Get the list of (cell_index, local_facet_index) pairs for the ith integral (kernel) for the exterior facet domain type. More...
|
|
const std::vector< std::int32_t > & | interior_facet_domains (int i) const |
| Get the list of (cell_index_0, local_facet_index_0, cell_index_1, local_facet_index_1) quadruplets for the ith integral (kernel) for the interior facet domain type. More...
|
|
const std::vector< std::shared_ptr< const Function< T > > > & | coefficients () const |
| Access coefficients.
|
|
bool | needs_facet_permutations () const |
| Get bool indicating whether permutation data needs to be passed into these integrals. More...
|
|
std::vector< int > | coefficient_offsets () const |
| Offset for each coefficient expansion array on a cell. Used to pack data for multiple coefficients in a flat array. The last entry is the size required to store all coefficients.
|
|
const std::vector< std::shared_ptr< const Constant< T > > > & | constants () const |
| Access constants.
|
|
template<typename T>
class dolfinx::fem::Form< T >
A representation of finite element variational forms.
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 left
\[ a: V_1 \times V_0 \rightarrow \mathbb{R} \]
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).