|
DOLFIN
DOLFIN C++ interface
|
#include <Function.h>


Public Member Functions | |
| Function (std::shared_ptr< const FunctionSpace > V) | |
| Function (std::shared_ptr< const FunctionSpace > V, std::shared_ptr< GenericVector > x) | |
| Function (std::shared_ptr< const FunctionSpace > V, std::string filename) | |
| Function (const Function &v) | |
| Function (const Function &v, std::size_t i) | |
| virtual | ~Function () |
| Destructor. | |
| const Function & | operator= (const Function &v) |
| const Function & | operator= (const Expression &v) |
| void | operator= (const FunctionAXPY &axpy) |
| Function & | operator[] (std::size_t i) const |
| virtual std::shared_ptr< const FunctionSpace > | function_space () const override |
| std::shared_ptr< GenericVector > | vector () |
| std::shared_ptr< const GenericVector > | vector () const |
| bool | in (const FunctionSpace &V) const |
| std::size_t | geometric_dimension () const |
| void | eval (Array< double > &values, const Array< double > &x) const override |
| void | eval (Array< double > &values, const Array< double > &x, const Cell &dolfin_cell, const ufc::cell &ufc_cell) const |
| void | eval (Eigen::Ref< Eigen::VectorXd > values, Eigen::Ref< const Eigen::VectorXd > x) const override |
| void | eval (Eigen::Ref< Eigen::VectorXd > values, Eigen::Ref< const Eigen::VectorXd > x, const dolfin::Cell &dolfin_cell, const ufc::cell &ufc_cell) const |
| void | interpolate (const GenericFunction &v) |
| void | extrapolate (const Function &v) |
| virtual std::size_t | value_rank () const override |
| virtual std::size_t | value_dimension (std::size_t i) const override |
| virtual std::vector< std::size_t > | value_shape () const override |
| virtual void | eval (Array< double > &values, const Array< double > &x, const ufc::cell &cell) const override |
| virtual void | eval (Eigen::Ref< Eigen::VectorXd > values, Eigen::Ref< const Eigen::VectorXd > x, const ufc::cell &cell) const override |
| virtual void | restrict (double *w, const FiniteElement &element, const Cell &dolfin_cell, const double *coordinate_dofs, const ufc::cell &ufc_cell) const override |
| virtual void | compute_vertex_values (std::vector< double > &vertex_values, const Mesh &mesh) const override |
| void | compute_vertex_values (std::vector< double > &vertex_values) |
| void | set_allow_extrapolation (bool allow_extrapolation) |
| bool | get_allow_extrapolation () const |
Public Member Functions inherited from dolfin::GenericFunction | |
| GenericFunction () | |
| Constructor. | |
| virtual | ~GenericFunction () |
| Destructor. | |
| virtual void | update () const |
| Update off-process ghost coefficients. | |
| double | operator() (double x) const |
| Evaluation at given point (scalar function) | |
| double | operator() (double x, double y) const |
| Evaluation at given point (scalar function) | |
| double | operator() (double x, double y, double z) const |
| Evaluation at given point (scalar function) | |
| double | operator() (const Point &p) const |
| Evaluation at given point (scalar function) | |
| void | operator() (Array< double > &values, double x) const |
| Evaluation at given point (vector-valued function) | |
| void | operator() (Array< double > &values, double x, double y) const |
| Evaluation at given point (vector-valued function) | |
| void | operator() (Array< double > &values, double x, double y, double z) const |
| Evaluation at given point (vector-valued function) | |
| void | operator() (Array< double > &values, const Point &p) const |
| Evaluation at given point (vector-valued function) | |
| std::size_t | value_size () const |
| Evaluation at given point. More... | |
| virtual void | evaluate (double *values, const double *coordinates, const ufc::cell &cell) const override |
Public Member Functions inherited from dolfin::Variable | |
| Variable () | |
| Create unnamed variable. | |
| Variable (const std::string name, const std::string label) | |
| Create variable with given name and label. | |
| Variable (const Variable &variable) | |
| Copy constructor. | |
| virtual | ~Variable () |
| Destructor. | |
| const Variable & | operator= (const Variable &variable) |
| Assignment operator. | |
| void | rename (const std::string name, const std::string label) |
| Rename variable. | |
| std::string | name () const |
| Return name. | |
| std::string | label () const |
| Return label (description) | |
| std::size_t | id () const |
| virtual std::string | str (bool verbose) const |
| Return informal string representation (pretty-print) | |
Public Member Functions inherited from dolfin::Hierarchical< Function > | |
| Hierarchical (Function &self) | |
| Constructor. | |
| virtual | ~Hierarchical () |
| Destructor. | |
| std::size_t | depth () const |
| bool | has_parent () const |
| bool | has_child () const |
| Function & | parent () |
| const Function & | parent () const |
| Return parent in hierarchy (const version). | |
| std::shared_ptr< Function > | parent_shared_ptr () |
| std::shared_ptr< const Function > | parent_shared_ptr () const |
| Return shared pointer to parent (const version). | |
| Function & | child () |
| const Function & | child () const |
| Return child in hierarchy (const version). | |
| std::shared_ptr< Function > | child_shared_ptr () |
| std::shared_ptr< const Function > | child_shared_ptr () const |
| Return shared pointer to child (const version). | |
| Function & | root_node () |
| const Function & | root_node () const |
| Return root node object in hierarchy (const version). | |
| std::shared_ptr< Function > | root_node_shared_ptr () |
| std::shared_ptr< const Function > | root_node_shared_ptr () const |
| Return shared pointer to root node object in hierarchy (const version). | |
| Function & | leaf_node () |
| const Function & | leaf_node () const |
| Return leaf node object in hierarchy (const version). | |
| std::shared_ptr< Function > | leaf_node_shared_ptr () |
| std::shared_ptr< const Function > | leaf_node_shared_ptr () const |
| Return shared pointer to leaf node object in hierarchy (const version). | |
| void | set_parent (std::shared_ptr< Function > parent) |
| Set parent. | |
| void | clear_child () |
| Clear child. | |
| void | set_child (std::shared_ptr< Function > child) |
| Set child. | |
| const Hierarchical & | operator= (const Hierarchical &hierarchical) |
| Assignment operator. | |
| void | _debug () const |
| Function useful for debugging the hierarchy. | |
Friends | |
| class | FunctionSpace |
| class | FunctionAssigner |
Additional Inherited Members | |
Public Attributes inherited from dolfin::Variable | |
| Parameters | parameters |
| Parameters. | |
Protected Member Functions inherited from dolfin::GenericFunction | |
| void | restrict_as_ufc_function (double *w, const FiniteElement &element, const Cell &dolfin_cell, const double *coordinate_dofs, const ufc::cell &ufc_cell) const |
| Restrict as UFC function (by calling eval) | |
This class represents a function :math:u_h in a finite element function space :math:V_h, given by
.. math::
u_h = \sum_{i=1}^{n} U_i \phi_i
where :math:\phi_i\}_{i=1}^{n} is a basis for :math:V_h, and :math:U is a vector of expansion coefficients for :math:u_h.
|
explicit |
Create function on given function space (shared data)
Arguments V (FunctionSpace) The function space.
| Function::Function | ( | std::shared_ptr< const FunctionSpace > | V, |
| std::shared_ptr< GenericVector > | x | ||
| ) |
Create function on given function space with a given vector (shared data)
Warning: This constructor is intended for internal library use only
Arguments V (FunctionSpace) The function space. x (GenericVector) The vector.
| Function::Function | ( | std::shared_ptr< const FunctionSpace > | V, |
| std::string | filename | ||
| ) |
Create function from vector of dofs stored to file (shared data)
Arguments V (FunctionSpace) The function space. filename_dofdata (std::string) The name of the file containing the dofmap data.
| Function::Function | ( | const Function & | v | ) |
Copy constructor
Arguments v (Function) The object to be copied.
| Function::Function | ( | const Function & | v, |
| std::size_t | i | ||
| ) |
Sub-function constructor with shallow copy of vector (used in Python interface)
Arguments v (Function) The function to be copied. i (std::size_t) Index of subfunction.
|
overridevirtual |
Compute values at all mesh vertices
| vertex_values | (Array<double>) The values at all vertices. |
| mesh | (Mesh) The mesh. |
Implements dolfin::GenericFunction.
| void Function::compute_vertex_values | ( | std::vector< double > & | vertex_values | ) |
Compute values at all mesh vertices
| vertex_values | (Array<double>) The values at all vertices. |
Evaluate function at given coordinates
| values | (Array<double>) The values. |
| x | (Array<double>) The coordinates. |
Reimplemented from dolfin::GenericFunction.
| void Function::eval | ( | Array< double > & | values, |
| const Array< double > & | x, | ||
| const Cell & | dolfin_cell, | ||
| const ufc::cell & | ufc_cell | ||
| ) | const |
Evaluate function at given coordinates in given cell
Arguments
| values | (Array<double>) The values. |
| x | (Array<double>) The coordinates. |
| dolfin_cell | (Cell) The cell. |
| ufc_cell | (ufc::cell) The ufc::cell. |
|
overridevirtual |
Evaluate function at given coordinates
| values | (Eigen::Ref<Eigen::VectorXd> values) The values. |
| x | (Eigen::Ref<const Eigen::VectorXd> x) The coordinates. |
Reimplemented from dolfin::GenericFunction.
| void Function::eval | ( | Eigen::Ref< Eigen::VectorXd > | values, |
| Eigen::Ref< const Eigen::VectorXd > | x, | ||
| const dolfin::Cell & | dolfin_cell, | ||
| const ufc::cell & | ufc_cell | ||
| ) | const |
Evaluate function at given coordinates in given cell
Arguments
| values | (Eigen::Ref<Eigen::VectorXd>) The values. |
| x | (Eigen::Ref<const Eigen::VectorXd>) The coordinates. |
| dolfin_cell | (Cell) The cell. |
| ufc_cell | (ufc::cell) The ufc::cell. |
|
overridevirtual |
Evaluate at given point in given cell
| values | (Array<double>) The values at the point. |
| x | (Array<double>) The coordinates of the point. |
| cell | (ufc::cell) The cell which contains the given point. |
Reimplemented from dolfin::GenericFunction.
|
overridevirtual |
Evaluate at given point in given cell
| values | (Eigen::Ref<Eigen::VectorXd>) The values at the point. |
| x | (Eigen::Ref<const Eigen::VectorXd> The coordinates of the point. |
| cell | (ufc::cell) The cell which contains the given point. |
Reimplemented from dolfin::GenericFunction.
| void Function::extrapolate | ( | const Function & | v | ) |
Extrapolate function (from a possibly lower-degree function space)
Arguments v (Function) The function to be extrapolated.
|
inlineoverridevirtual |
Return shared pointer to function space
Returns FunctionSpace Return the shared pointer.
Implements dolfin::GenericFunction.
| std::size_t Function::geometric_dimension | ( | ) | const |
Return geometric dimension
Returns std::size_t The geometric dimension.
|
inline |
Check if extrapolation is permitted when evaluating the Function
| bool Function::in | ( | const FunctionSpace & | V | ) | const |
Check if function is a member of the given function space
Arguments V (FunctionSpace) The function space.
Returns bool True if the function is in the function space.
| void Function::interpolate | ( | const GenericFunction & | v | ) |
Interpolate function (on possibly non-matching meshes)
| v | (GenericFunction) The function to be interpolated. |
Assignment from function
Arguments v (Function) Another function.
| const Function & Function::operator= | ( | const Expression & | v | ) |
Assignment from expression using interpolation
Arguments v (Expression) The expression.
| void Function::operator= | ( | const FunctionAXPY & | axpy | ) |
Assignment from linear combination of function
Arguments v (FunctionAXPY) A linear combination of other Functions
| Function & Function::operator[] | ( | std::size_t | i | ) | const |
Extract subfunction
Arguments i (std::size_t) Index of subfunction. Returns Function The subfunction.
|
overridevirtual |
Restrict function to local cell (compute expansion coefficients w)
| w | (list of doubles) Expansion coefficients. |
| element | (FiniteElement) The element. |
| dolfin_cell | (Cell) The cell. |
| coordinate_dofs | (double *) The coordinates |
| ufc_cell | (ufc::cell). The ufc::cell. |
Implements dolfin::GenericFunction.
|
inline |
Allow extrapolation when evaluating the Function
| allow_extrapolation | (bool) Whether or not permit extrapolation. |
|
overridevirtual |
Return value dimension for given axis
Arguments i (std::size_t) The index of the axis.
Returns std::size_t The value dimension.
Implements dolfin::GenericFunction.
|
overridevirtual |
|
overridevirtual |
Return value shape
Returns std::vector<std::size_t> The value shape.
Implements dolfin::GenericFunction.
| std::shared_ptr< GenericVector > Function::vector | ( | ) |
Return vector of expansion coefficients (non-const version)
Returns GenericVector The vector of expansion coefficients.
| std::shared_ptr< const GenericVector > Function::vector | ( | ) | const |
Return vector of expansion coefficients (const version)
Returns GenericVector The vector of expansion coefficients (const).
1.8.13