Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/d9/d69/classdolfinx_1_1fem_1_1FunctionSpace.html
DOLFINx 0.7.3
DOLFINx C++ interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FunctionSpace< T > Class Template Reference

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. More...

#include <FunctionSpace.h>

Public Member Functions

 FunctionSpace (std::shared_ptr< const mesh::Mesh< T > > mesh, std::shared_ptr< const FiniteElement< T > > element, std::shared_ptr< const DofMap > dofmap)
 Create function space for given mesh, element and dofmap.
 
 FunctionSpace (const FunctionSpace &V)=delete
 
 FunctionSpace (FunctionSpace &&V)=default
 Move constructor.
 
virtual ~FunctionSpace ()=default
 Destructor.
 
FunctionSpaceoperator= (const FunctionSpace &V)=delete
 
FunctionSpaceoperator= (FunctionSpace &&V)=default
 Move assignment operator.
 
std::shared_ptr< FunctionSpace< T > > sub (const std::vector< int > &component) const
 Extract subspace for component.
 
bool contains (const FunctionSpace &V) const
 Check whether V is subspace of this, or this itself.
 
std::pair< FunctionSpace< T >, std::vector< std::int32_t > > collapse () const
 Collapse a subspace and return a new function space and a map from new to old dofs.
 
std::vector< int > component () const
 Get the component with respect to the root superspace.
 
std::vector< T > tabulate_dof_coordinates (bool transpose) const
 Tabulate the physical coordinates of all dofs on this process.
 
std::shared_ptr< const mesh::Mesh< T > > mesh () const
 The mesh.
 
std::shared_ptr< const FiniteElement< T > > element () const
 The finite element.
 
std::shared_ptr< const DofMapdofmap () const
 The dofmap.
 

Detailed Description

template<std::floating_point T>
class dolfinx::fem::FunctionSpace< T >

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.

Template Parameters
TThe floating point (real) type of the mesh geometry and the finite element basis.

Constructor & Destructor Documentation

◆ FunctionSpace()

template<std::floating_point T>
FunctionSpace ( std::shared_ptr< const mesh::Mesh< T > >  mesh,
std::shared_ptr< const FiniteElement< T > >  element,
std::shared_ptr< const DofMap dofmap 
)
inline

Create function space for given mesh, element and dofmap.

Parameters
[in]meshMesh that the space is defined on.
[in]elementFinite element for the space.
[in]dofmapDegree-of-freedom map for the space.

Member Function Documentation

◆ collapse()

template<std::floating_point T>
std::pair< FunctionSpace< T >, std::vector< std::int32_t > > collapse ( ) const
inline

Collapse a subspace and return a new function space and a map from new to old dofs.

Returns
The new function space and a map from new to old dofs

◆ component()

template<std::floating_point T>
std::vector< int > component ( ) const
inline

Get the component with respect to the root superspace.

Returns
The component with respect to the root superspace, i.e. W.sub(1).sub(0) == [1, 0].

◆ contains()

template<std::floating_point T>
bool contains ( const FunctionSpace< T > &  V) const
inline

Check whether V is subspace of this, or this itself.

Parameters
[in]VThe space to be tested for inclusion
Returns
True if V is contained in or is equal to this FunctionSpace

◆ sub()

template<std::floating_point T>
std::shared_ptr< FunctionSpace< T > > sub ( const std::vector< int > &  component) const
inline

Extract subspace for component.

Parameters
[in]componentThe subspace component
Returns
The subspace

◆ tabulate_dof_coordinates()

template<std::floating_point T>
std::vector< T > tabulate_dof_coordinates ( bool  transpose) const
inline

Tabulate the physical coordinates of all dofs on this process.

Todo:
Remove - see function in interpolate.h
Parameters
[in]transposeIf false the returned data has shape (num_points, 3), otherwise it is transposed and has shape (3, num_points).
Returns
The dof coordinates [([x0, y0, z0], [x1, y1, z1], ...) if transpose is false, and otherwise the returned data is transposed. Storage is row-major.

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