DOLFINx 0.12.0.0
DOLFINx C++
Loading...
Searching...
No Matches
expression_evaluate.h File Reference

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/Mesh.h>
#include <dolfinx/mesh/Topology.h>
#include <functional>
#include <iterator>
#include <memory>
#include <optional>
#include <ranges>
#include <span>
#include <stdexcept>
#include <utility>
#include <vector>
Include dependency graph for expression_evaluate.h:
This graph shows which files directly or indirectly include this file:

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 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 or facets.
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 or facets.
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.

Detailed Description

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.