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 fem::Function< T >>> &coefficients, const std::vector< std::shared_ptr< const fem::Constant< T >>> &constants, const std::shared_ptr< const mesh::Mesh > &mesh, const array2d< double > &X, const std::function< void(T *, const T *, const T *, const double *)> fn, const std::size_t value_size) |
| Create Expression. More...
|
|
| Expression (Expression &&form)=default |
| Move constructor.
|
|
virtual | ~Expression ()=default |
| Destructor.
|
|
const std::vector< std::shared_ptr< const fem::Function< T > > > & | coefficients () const |
| Access coefficients.
|
|
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.
|
|
void | eval (const xtl::span< const std::int32_t > &active_cells, array2d< T > &values) const |
| Evaluate the expression on cells. More...
|
|
const std::function< void(T *, const T *, const T *, const double *)> & | get_tabulate_expression () const |
| Get function for tabulate_expression. More...
|
|
const std::vector< std::shared_ptr< const fem::Constant< T > > > & | constants () const |
| Access constants. More...
|
|
std::shared_ptr< const mesh::Mesh > | mesh () const |
| Get mesh. More...
|
|
const array2d< double > & | x () const |
| Get evaluation points on reference cell. More...
|
|
const std::size_t | value_size () const |
| Get value size. More...
|
|
const std::size_t | num_points () const |
| Get number of points. 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.