|
DOLFIN-X
DOLFIN-X C++ interface
|
Storage for the coefficients of a Form consisting of Function and the Element objects they are defined on. More...
#include <FormCoefficients.h>
Public Member Functions | |
| FormCoefficients (const std::vector< std::tuple< int, std::string, std::shared_ptr< function::Function >>> &coefficients) | |
| Initialise the FormCoefficients, using tuples of (original_coeff_position, name, shared_ptr<function::Function>). The shared_ptr<Function> 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, std::shared_ptr< const function::Function > coefficient) |
| Set coefficient with index i to be a Function. | |
| void | set (std::string name, std::shared_ptr< const function::Function > coefficient) |
| Set coefficient with name to be a Function. | |
| std::shared_ptr< const function::Function > | get (int i) const |
| Get the Function coefficient i. | |
| int | original_position (int i) const |
| Original position of coefficient in UFL form. | |
| int | get_index (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... | |
Storage for the coefficients of a Form consisting of Function and the Element objects they are defined on.
| int FormCoefficients::get_index | ( | std::string | name | ) | const |
Get index from name of coefficient.
| [in] | name | Name of coefficient |
| std::string FormCoefficients::get_name | ( | int | index | ) | const |
Get name from index of coefficient.
| [in] | index | Index of the coefficient |
1.8.17