30 #include <boost/ptr_container/ptr_map.hpp> 31 #include <Eigen/Dense> 33 #include <dolfin/common/types.h> 34 #include <dolfin/common/Hierarchical.h> 35 #include "GenericFunction.h" 36 #include "FunctionAXPY.h" 53 template<
typename T>
class Array;
76 explicit Function(std::shared_ptr<const FunctionSpace> V);
88 Function(std::shared_ptr<const FunctionSpace> V,
89 std::shared_ptr<GenericVector> x);
98 Function(std::shared_ptr<const FunctionSpace> V,
99 std::string filename);
151 Function& operator[] (std::size_t i)
const;
160 dolfin_assert(_function_space);
161 return _function_space;
169 std::shared_ptr<GenericVector> vector();
176 std::shared_ptr<const GenericVector> vector()
const;
194 std::size_t geometric_dimension()
const;
216 const Cell& dolfin_cell,
const ufc::cell& ufc_cell)
const;
224 void eval(Eigen::Ref<Eigen::VectorXd> values,
225 Eigen::Ref<const Eigen::VectorXd> x)
const override;
238 void eval(Eigen::Ref<Eigen::VectorXd> values,
239 Eigen::Ref<const Eigen::VectorXd> x,
240 const dolfin::Cell& dolfin_cell,
const ufc::cell& ufc_cell)
const;
253 void extrapolate(
const Function& v);
262 virtual std::size_t value_rank()
const override;
273 virtual std::size_t value_dimension(std::size_t i)
const override;
280 virtual std::vector<std::size_t> value_shape()
const override;
291 const ufc::cell& cell)
const override;
301 virtual void eval(Eigen::Ref<Eigen::VectorXd> values,
302 Eigen::Ref<const Eigen::VectorXd> x,
303 const ufc::cell& cell)
const override;
317 virtual void restrict(
double* w,
319 const Cell& dolfin_cell,
320 const double* coordinate_dofs,
321 const ufc::cell& ufc_cell)
const override;
329 virtual void compute_vertex_values(std::vector<double>& vertex_values,
330 const Mesh& mesh)
const override;
336 void compute_vertex_values(std::vector<double>& vertex_values);
343 { _allow_extrapolation = allow_extrapolation; }
350 {
return _allow_extrapolation; }
359 mutable boost::ptr_map<std::size_t, Function> _sub_functions;
365 std::shared_ptr<const FunctionSpace> _function_space;
368 std::shared_ptr<GenericVector> _vector;
371 bool _allow_extrapolation;
virtual std::shared_ptr< const FunctionSpace > function_space() const override
Definition: Function.h:158
Definition: Hierarchical.h:43
Definition: FunctionAXPY.h:35
Definition: FunctionSpace.h:53
bool get_allow_extrapolation() const
Definition: Function.h:349
Definition: Extrapolation.h:34
Definition: Expression.h:49
A Cell is a MeshEntity of topological codimension 0.
Definition: Cell.h:42
Definition: Function.h:65
void set_allow_extrapolation(bool allow_extrapolation)
Definition: Function.h:342
Definition: GenericFunction.h:53
This is a wrapper for a UFC finite element (ufc::finite_element).
Definition: FiniteElement.h:35
Definition: FunctionAssigner.h:40