|
| Expression (const std::vector< std::shared_ptr< const Function< scalar_type, geometry_type > > > &coefficients, const std::vector< std::shared_ptr< const Constant< scalar_type > > > &constants, std::span< const geometry_type > X, std::array< std::size_t, 2 > Xshape, std::function< void(scalar_type *, const scalar_type *, const scalar_type *, const geometry_type *, const int *, const uint8_t *, void *)> fn, const std::vector< std::size_t > &value_shape, std::shared_ptr< const FunctionSpace< geometry_type > > argument_space=nullptr) |
| Create an Expression.
|
|
| Expression (Expression &&e)=default |
| Move constructor.
|
|
virtual | ~Expression ()=default |
| Destructor.
|
|
std::shared_ptr< const FunctionSpace< geometry_type > > | argument_space () const |
| Argument function space.
|
|
const std::vector< std::shared_ptr< const Function< scalar_type, geometry_type > > > & | coefficients () const |
| Expression coefficients.
|
|
const std::vector< std::shared_ptr< const Constant< scalar_type > > > & | constants () const |
| Expression constants.
|
|
std::vector< int > | coefficient_offsets () const |
| Offset for each coefficient expansion array on a cell.
|
|
const std::function< void(scalar_type *, const scalar_type *, const scalar_type *, const geometry_type *, const int *, const uint8_t *, void *)> & | kernel () const |
| Function for tabulating the Expression.
|
|
int | value_size () const |
| Value size of the Expression result.
|
|
const std::vector< std::size_t > & | value_shape () const |
| Value shape of of Expression result (at a point),.
|
|
std::pair< std::vector< geometry_type >, std::array< std::size_t, 2 > > | X () const |
| Evaluation point coordinates on the reference cell.
|
|
template<
dolfinx::scalar T, std::floating_point U = dolfinx::scalar_value_t<T>>
class dolfinx::fem::Expression< T, U >
An Expression represents a mathematical expression evaluated at a pre-defined points on a reference cell.
An Expression can be evaluated using tabulate_expression.
An example of Expression use is to evaluate the gradient of a Function at quadrature points in cells. The evaluated gradient can then be used as input in to a non-FEniCS function that evaluates a material constitutive model.
- Template Parameters
-
T | The scalar type. |
U | The mesh geometry scalar type. |