|
DOLFINx 0.12.0.0
DOLFINx C++
|
Evaluation of a fem::Expression, and interpolation of an Expression into a fem::Function. More...
#include "Expression.h"#include "FiniteElement.h"#include "Function.h"#include "FunctionSpace.h"#include "assemble_expression_impl.h"#include "interpolate.h"#include "pack.h"#include "traits.h"#include <algorithm>#include <basix/mdspan.hpp>#include <cassert>#include <cmath>#include <concepts>#include <cstddef>#include <cstdint>#include <dolfinx/common/types.h>#include <dolfinx/mesh/EntityMap.h>#include <dolfinx/mesh/Mesh.h>#include <dolfinx/mesh/Topology.h>#include <format>#include <functional>#include <iterator>#include <memory>#include <optional>#include <ranges>#include <span>#include <stdexcept>#include <utility>#include <vector>

Go to the source code of this file.
Namespaces | |
| namespace | dolfinx |
| Top-level namespace. | |
| namespace | dolfinx::fem |
| Finite element method functionality. | |
Functions | |
| template<dolfinx::scalar T, std::floating_point U> | |
| void | check_expression_entities (const fem::Expression< T, U > &e, const mesh::Mesh< U > &mesh, std::size_t rank) |
| Check that an Expression can be evaluated over entities of a mesh. | |
| template<dolfinx::scalar T, std::floating_point U> | |
| std::pair< std::vector< T >, int > | pack_coefficients (const fem::Expression< T, U > &e, const mesh::Mesh< U > &mesh, fem::MDSpan2 auto entities) |
| Pack the coefficients of an Expression over entities of a mesh. | |
| template<dolfinx::scalar T, std::floating_point U> | |
| void | tabulate_expression (std::span< T > values, const fem::Expression< T, U > &e, md::mdspan< const T, md::dextents< std::size_t, 2 > > coeffs, std::span< const T > constants, const mesh::Mesh< U > &mesh, fem::MDSpan2 auto entities, std::optional< std::pair< std::reference_wrapper< const FiniteElement< U > >, std::size_t > > element) |
| Evaluate an Expression on cells, facets, ridges or peaks. | |
| template<dolfinx::scalar T, std::floating_point U> | |
| void | tabulate_expression (std::span< T > values, const fem::Expression< T, U > &e, const mesh::Mesh< U > &mesh, fem::MDSpan2 auto entities) |
| Evaluate an Expression on cells, facets, ridges or peaks. | |
| template<dolfinx::scalar T, std::floating_point U> | |
| void | interpolate (Function< T, U > &u1, mesh::CellRange auto &&cells1, const Expression< T, U > &e0, mesh::CellRange auto &&cells0) |
| Interpolate an Expression into a Function over a subset of cells. | |
| template<dolfinx::scalar T, std::floating_point U> | |
| void | interpolate (Function< T, U > &u1, const Expression< T, U > &e0, mesh::CellRange auto &&cells) |
| Interpolate an Expression into a Function over a subset of cells. | |
| template<dolfinx::scalar T, std::floating_point U> | |
| void | interpolate (Function< T, U > &u1, const Expression< T, U > &e0) |
| Interpolate an Expression into a Function on all cells. | |
Evaluation of a fem::Expression, and interpolation of an Expression into a fem::Function.
These operations sit above fem::Function because evaluating an Expression requires its coefficient data to be packed, which in turn requires a complete fem::Function.
| void check_expression_entities | ( | const fem::Expression< T, U > & | e, |
| const mesh::Mesh< U > & | mesh, | ||
| std::size_t | rank ) |
Check that an Expression can be evaluated over entities of a mesh.
| [in] | e | Expression to evaluate. |
| [in] | mesh | Mesh that the Expression is evaluated on. |
| [in] | rank | Rank of the entities array: 1 for cell indices, 2 for (cell, local entity index) pairs. |
| std::invalid_argument | if mesh has more than one cell type, e was created on another mesh, its entity dimension does not fit mesh or rank, or its argument is on another mesh whose cells are not the entities evaluated over. |