Storage for the coefficients of a Form consisting of Function and the Element objects they are defined on.
More...
#include <FormCoefficients.h>
|
| FormCoefficients (const std::vector< std::tuple< int, std::string, std::shared_ptr< function::Function< T >>>> &coefficients) |
| Initialise the FormCoefficients, using tuples of (original_coeff_position, name, Function). The Function pointer may be a nullptr and assigned later.
|
|
int | size () const |
| Get number of coefficients.
|
|
std::vector< int > | 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.
|
|
void | set (int i, const std::shared_ptr< const function::Function< T >> &coefficient) |
| Set coefficient with index i to be a Function.
|
|
void | set (const std::string &name, const std::shared_ptr< const function::Function< T >> &coefficient) |
| Set coefficient with name to be a Function.
|
|
std::shared_ptr< const function::Function< T > > | get (int i) const |
| Get the Function coefficient i.
|
|
int | original_position (int i) const |
| Original position of coefficient in UFL form. More...
|
|
int | get_index (const std::string &name) const |
| Get index from name of coefficient. More...
|
|
std::string | get_name (int index) const |
| Get name from index of coefficient. More...
|
|
template<typename T>
class dolfinx::fem::FormCoefficients< T >
Storage for the coefficients of a Form consisting of Function and the Element objects they are defined on.
◆ get_index()
Get index from name of coefficient.
- Parameters
-
[in] | name | Name of coefficient |
- Returns
- Index of the coefficient
◆ get_name()
Get name from index of coefficient.
- Parameters
-
[in] | index | Index of the coefficient |
- Returns
- Name of the coefficient
◆ original_position()
Original position of coefficient in UFL form.
- Returns
- The position of coefficient i in original ufl form coefficients.
The documentation for this class was generated from the following file:
- /build/dolfinx-8VHnH9/dolfinx-2019.2.0~git20200723.696fbc0/cpp/dolfinx/fem/FormCoefficients.h