Represents a mathematical expression evaluated at a pre-defined set of points on the reference cell. This class closely follows the concept of a UFC Expression.
More...
|
| Expression (const std::vector< std::shared_ptr< const Function< T >>> &coefficients, const std::vector< std::shared_ptr< const Constant< T >>> &constants, std::span< const double > X, std::array< std::size_t, 2 > Xshape, const std::function< void(T *, const T *, const T *, const scalar_value_type_t *, const int *, const uint8_t *)> fn, const std::vector< int > &value_shape, const std::shared_ptr< const mesh::Mesh > &mesh=nullptr, const std::shared_ptr< const FunctionSpace > argument_function_space=nullptr) |
| Create an Expression. More...
|
|
| Expression (Expression &&form)=default |
| Move constructor.
|
|
virtual | ~Expression ()=default |
| Destructor.
|
|
std::shared_ptr< const FunctionSpace > | argument_function_space () const |
| Get argument function space. More...
|
|
const std::vector< std::shared_ptr< const Function< T > > > & | coefficients () const |
| Get coefficients. More...
|
|
const std::vector< std::shared_ptr< const Constant< T > > > & | constants () const |
| Get constants. 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.
|
|
template<typename U > |
void | eval (const std::span< const std::int32_t > &cells, U &values) const |
| Evaluate the expression on cells. More...
|
|
const std::function< void(T *, const T *, const T *, const scalar_value_type_t *, const int *, const uint8_t *)> & | get_tabulate_expression () const |
| Get function for tabulate_expression. More...
|
|
std::shared_ptr< const mesh::Mesh > | mesh () const |
| Get mesh. More...
|
|
int | value_size () const |
| Get value size. More...
|
|
const std::vector< int > & | value_shape () const |
| Get value shape. More...
|
|
std::pair< std::vector< double >, std::array< std::size_t, 2 > > | X () const |
| Evaluation points on the reference cell. More...
|
|
template<typename T>
class dolfinx::fem::Expression< T >
Represents a mathematical expression evaluated at a pre-defined set of points on the reference cell. This class closely follows the concept of a UFC Expression.
This functionality can be used to evaluate a gradient of a Function at quadrature points in all cells. This evaluated gradient can then be used as input in to a non-FEniCS function that calculates a material constitutive model.