DOLFIN-X
DOLFIN-X C++ interface
Classes | Functions
dolfinx::function Namespace Reference

Functions tools, including FEM functions and pointwise defined functions. More...

Classes

class  Constant
 A constant value which can be attached to a Form. Constants may be scalar (rank 0), vector (rank 1), or tensor valued. More...
 
class  Function
 This class represents a function \( u_h \) in a finite element function space \( V_h \), given by. More...
 
class  FunctionSpace
 This class represents a finite element function space defined by a mesh, a finite element, and a local-to-global map of the degrees of freedom (dofmap). More...
 

Functions

template<typename T >
void interpolate (Function< T > &u, const Function< T > &v)
 Interpolate a Function (on possibly non-matching meshes) More...
 
template<typename T >
void interpolate (Function< T > &u, const std::function< Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >(const Eigen::Ref< const Eigen::Array< double, 3, Eigen::Dynamic, Eigen::RowMajor >> &)> &f)
 Interpolate an expression. More...
 
template<typename T >
void interpolate_c (Function< T > &u, const std::function< void(Eigen::Ref< Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >>, const Eigen::Ref< const Eigen::Array< double, Eigen::Dynamic, 3, Eigen::RowMajor >> &)> &f)
 Interpolate an expression f(x). This interface uses an expression function f that has an in/out argument for the expression values. It is primarily to support C code implementations of the expression, e.g. using Numba. Generally the interface where the expression function is a pure function, i.e. the expression values are the return argument, should be preferred. More...
 

Detailed Description

Functions tools, including FEM functions and pointwise defined functions.

This namespace provides classes for representing finite element functions, and coefficient functions that appear in forms.

Function Documentation

◆ interpolate() [1/2]

template<typename T >
void dolfinx::function::interpolate ( Function< T > &  u,
const Function< T > &  v 
)

Interpolate a Function (on possibly non-matching meshes)

Parameters
[in,out]uThe function to interpolate into
[in]vThe function to be interpolated

◆ interpolate() [2/2]

template<typename T >
void dolfinx::function::interpolate ( Function< T > &  u,
const std::function< Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >(const Eigen::Ref< const Eigen::Array< double, 3, Eigen::Dynamic, Eigen::RowMajor >> &)> &  f 
)

Interpolate an expression.

Parameters
[in,out]uThe function to interpolate into
[in]fThe expression to be interpolated

◆ interpolate_c()

template<typename T >
void dolfinx::function::interpolate_c ( Function< T > &  u,
const std::function< void(Eigen::Ref< Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >>, const Eigen::Ref< const Eigen::Array< double, Eigen::Dynamic, 3, Eigen::RowMajor >> &)> &  f 
)

Interpolate an expression f(x). This interface uses an expression function f that has an in/out argument for the expression values. It is primarily to support C code implementations of the expression, e.g. using Numba. Generally the interface where the expression function is a pure function, i.e. the expression values are the return argument, should be preferred.

Parameters
[in,out]uThe function to interpolate into
[in]fThe expression to be interpolated