DOLFIN
DOLFIN C++ interface
Public Member Functions | Protected Attributes | List of all members
dolfin::MeshDisplacement Class Reference

#include <MeshDisplacement.h>

Inheritance diagram for dolfin::MeshDisplacement:
Inheritance graph
[legend]
Collaboration diagram for dolfin::MeshDisplacement:
Collaboration graph
[legend]

Public Member Functions

 MeshDisplacement (std::shared_ptr< const Mesh > mesh)
 
 MeshDisplacement (const MeshDisplacement &mesh_displacement)
 
virtual ~MeshDisplacement ()
 Destructor.
 
Functionoperator[] (const std::size_t i)
 
const Functionoperator[] (const std::size_t i) const
 
virtual void eval (Array< double > &values, const Array< double > &x, const ufc::cell &cell) const
 
virtual void compute_vertex_values (std::vector< double > &vertex_values, const Mesh &mesh) const
 
- Public Member Functions inherited from dolfin::Expression
 Expression ()
 Create scalar expression.
 
 Expression (std::size_t dim)
 
 Expression (std::size_t dim0, std::size_t dim1)
 
 Expression (std::vector< std::size_t > value_shape)
 
 Expression (const Expression &expression)
 
virtual ~Expression ()
 Destructor.
 
virtual void eval (Eigen::Ref< Eigen::VectorXd > values, Eigen::Ref< const Eigen::VectorXd > x, const ufc::cell &cell) const override
 
virtual void eval (Array< double > &values, const Array< double > &x) const override
 
virtual void eval (Eigen::Ref< Eigen::VectorXd > values, Eigen::Ref< const Eigen::VectorXd > x) const override
 
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 set_property (std::string name, double value)
 
virtual double get_property (std::string name) const
 
virtual void set_generic_function (std::string name, std::shared_ptr< GenericFunction > f)
 
virtual std::shared_ptr< dolfin::GenericFunctionget_generic_function (std::string name) const
 
virtual void restrict (double *w, const FiniteElement &element, const Cell &dolfin_cell, const double *coordinate_dofs, const ufc::cell &ufc_cell) const override
 
virtual std::shared_ptr< const FunctionSpacefunction_space () const override
 
- 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 Variableoperator= (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)
 

Protected Attributes

const std::size_t _dim
 
std::vector< Function_displacements
 
- Protected Attributes inherited from dolfin::Expression
std::vector< std::size_t > _value_shape
 

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)
 

Detailed Description

This class encapsulates the CG1 representation of the displacement of a mesh as an Expression. This is particularly useful for the displacement returned by mesh smoothers which can subsequently be used in evaluating forms. The value rank is 1 and the value shape is equal to the geometric dimension of the mesh.

Constructor & Destructor Documentation

◆ MeshDisplacement() [1/2]

MeshDisplacement::MeshDisplacement ( std::shared_ptr< const Mesh mesh)
explicit

Create MeshDisplacement of given mesh

Parameters
mesh(Mesh) Mesh to be displacement defined on.

◆ MeshDisplacement() [2/2]

MeshDisplacement::MeshDisplacement ( const MeshDisplacement mesh_displacement)

Copy constructor

Parameters
mesh_displacement(MeshDisplacement) Object to be copied.

Member Function Documentation

◆ compute_vertex_values()

void MeshDisplacement::compute_vertex_values ( std::vector< double > &  vertex_values,
const Mesh mesh 
) const
virtual

Compute values at all mesh vertices.

Parameters
vertex_values(Array<double>) The values at all vertices.
mesh(Mesh) The mesh.

Reimplemented from dolfin::Expression.

◆ eval()

void MeshDisplacement::eval ( Array< double > &  values,
const Array< double > &  x,
const ufc::cell &  cell 
) const
virtual

Evaluate at given point in given cell.

Parameters
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::Expression.

◆ operator[]() [1/2]

Function & MeshDisplacement::operator[] ( const std::size_t  i)

Extract subfunction In python available as MeshDisplacement.sub(i)

Parameters
i(std::size_t) Index of subfunction.

◆ operator[]() [2/2]

const Function & MeshDisplacement::operator[] ( const std::size_t  i) const

Extract subfunction. Const version

Parameters
i(std::size_t) Index of subfunction.

The documentation for this class was generated from the following files: