Loading...
Searching...
No Matches
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 Types

using | geometry_type = T
| Geometry type of the Mesh that the FunctionSpace is defined on.

## Public Member Functions

| FunctionSpace (std::shared_ptr< const mesh::Mesh< geometry_type > > mesh, std::shared_ptr< const FiniteElement< geometry_type > > element, std::shared_ptr< const DofMap > dofmap)
| Create function space for given mesh, element and degree-of-freedom map.
| FunctionSpace (std::shared_ptr< const mesh::Mesh< geometry_type > > mesh, std::vector< std::shared_ptr< const FiniteElement< geometry_type > > > elements, std::vector< std::shared_ptr< const DofMap > > dofmaps)
| Create function space for given mesh, elements and degree-of-freedom maps.
| FunctionSpace (const FunctionSpace &V)=delete
| FunctionSpace (FunctionSpace &&V)=default
| Move constructor.
virtual | ~FunctionSpace ()=default
| Destructor.
FunctionSpace & | operator= (const FunctionSpace &V)=delete
FunctionSpace & | operator= (FunctionSpace &&V)=default
| Move assignment operator.
FunctionSpace | sub (const std::vector< int > &component) const
| Create a subspace (view) for a specific component.
bool | contains (const FunctionSpace &V) const
| Check whether V is subspace of this, or this itself.
std::pair< FunctionSpace, std::vector< std::int32_t > > | collapse () const
std::vector< int > | component () const
| Get the component with respect to the root superspace.
bool | symmetric () const
| Indicate whether this function space represents a symmetric 2-tensor.
std::vector< geometry_type > | tabulate_dof_coordinates (bool transpose) const
| Tabulate the physical coordinates of all dofs on this process.
std::shared_ptr< const mesh::Mesh< geometry_type > > | mesh () const
| The mesh.
std::shared_ptr< const FiniteElement< geometry_type > > | element () const
| The finite element.
std::shared_ptr< const FiniteElement< geometry_type > > | elements (int cell_type_idx) const
| The finite elements.
std::shared_ptr< const DofMap > | dofmap () const
| The dofmap.
std::shared_ptr< const DofMap > | dofmaps (int cell_type_idx) const
| The dofmaps.

## 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

  T | The floating point (real) type of the mesh geometry and the finite element basis.

## Constructor & Destructor Documentation

## FunctionSpace() [1/2]

template<std::floating_point T>

FunctionSpace | ( | std::shared_ptr< const mesh::Mesh< geometry_type > > | mesh,
|  | std::shared_ptr< const FiniteElement< geometry_type > > | element,
|  | std::shared_ptr< const DofMap > | dofmap )

inline

Create function space for given mesh, element and degree-of-freedom map.

Parameters

  [in] | mesh | Mesh that the space is defined on.
  [in] | element | Finite element for the space.
  [in] | dofmap | Degree-of-freedom map for the space.

## FunctionSpace() [2/2]

template<std::floating_point T>

FunctionSpace | ( | std::shared_ptr< const mesh::Mesh< geometry_type > > | mesh,
|  | std::vector< std::shared_ptr< const FiniteElement< geometry_type > > > | elements,
|  | std::vector< std::shared_ptr< const DofMap > > | dofmaps )

inline

Create function space for given mesh, elements and degree-of-freedom maps.

Parameters

  [in] | mesh | Mesh that the space is defined on.
  [in] | elements | Finite elements for the space, one for each cell type. The elements must be ordered to be consistent with mesh::topology::cell_types.
  [in] | dofmaps | Degree-of-freedom maps for the space, one for each element. The dofmaps must be ordered in the same way as the elements.

## Member Function Documentation

## collapse()

template<std::floating_point T>

std::pair< FunctionSpace, 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] | V | The 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>

FunctionSpace sub | ( | const std::vector< int > & | component | ) | const

inline

Create a subspace (view) for a specific component.

Note
  If the subspace is re-used, for performance reasons the returned subspace should be stored by the caller to avoid repeated re-computation of the subspace.

Parameters

  [in] | component | Subspace component.

Returns
  A subspace.

## tabulate_dof_coordinates()

template<std::floating_point T>

std::vector< geometry_type > 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] | transpose | If 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:

- /build/fenics-dolfinx-PdyzCE/fenics-dolfinx-0.10.0.post5/cpp/dolfinx/fem/assembler.h
- /build/fenics-dolfinx-PdyzCE/fenics-dolfinx-0.10.0.post5/cpp/dolfinx/fem/FunctionSpace.h