DOLFINx
0.1.0
DOLFINx C++ interface
|
14 #include <xtensor/xtensor.hpp>
41 std::shared_ptr<const fem::FiniteElement>
element,
42 std::shared_ptr<const fem::DofMap>
dofmap);
70 std::shared_ptr<FunctionSpace>
sub(
const std::vector<int>&
component)
const;
80 std::pair<std::shared_ptr<FunctionSpace>, std::vector<std::int32_t>>
99 std::size_t
id()
const;
102 std::shared_ptr<const mesh::Mesh>
mesh()
const;
105 std::shared_ptr<const fem::FiniteElement>
element()
const;
108 std::shared_ptr<const fem::DofMap>
dofmap()
const;
112 std::shared_ptr<const mesh::Mesh> _mesh;
115 std::shared_ptr<const fem::FiniteElement> _element;
118 std::shared_ptr<const fem::DofMap> _dofmap;
121 std::vector<int> _component;
127 std::size_t _root_space_id;
130 mutable std::map<std::vector<int>, std::weak_ptr<FunctionSpace>> _subspaces;
142 std::array<std::vector<std::shared_ptr<const FunctionSpace>>, 2>
145 std::vector<std::array<std::shared_ptr<const FunctionSpace>, 2>>>& V);
std::size_t id() const
Unique identifier.
Definition: FunctionSpace.cpp:209
This class represents a finite element function space defined by a mesh, a finite element,...
Definition: FunctionSpace.h:33
xt::xtensor< double, 2 > tabulate_dof_coordinates(bool transpose) const
Definition: FunctionSpace.cpp:104
std::array< std::vector< std::shared_ptr< const FunctionSpace > >, 2 > common_function_spaces(const std::vector< std::vector< std::array< std::shared_ptr< const FunctionSpace >, 2 >>> &V)
Extract FunctionSpaces for (0) rows blocks and (1) columns blocks from a rectangular array of (test,...
Definition: FunctionSpace.cpp:242
std::shared_ptr< const mesh::Mesh > mesh() const
The mesh.
Definition: FunctionSpace.cpp:211
std::shared_ptr< const fem::DofMap > dofmap() const
The dofmap.
Definition: FunctionSpace.cpp:218
std::pair< std::shared_ptr< FunctionSpace >, std::vector< std::int32_t > > collapse() const
Collapse a subspace and return a new function space and a map from new to old dofs.
Definition: FunctionSpace.cpp:83
bool contains(const FunctionSpace &V) const
Check whether V is subspace of this, or this itself.
Definition: FunctionSpace.cpp:223
virtual ~FunctionSpace()=default
Destructor.
std::vector< int > component() const
Get the component with respect to the root superspace.
Definition: FunctionSpace.cpp:101
std::shared_ptr< const fem::FiniteElement > element() const
The finite element.
Definition: FunctionSpace.cpp:213
std::shared_ptr< FunctionSpace > sub(const std::vector< int > &component) const
Extract subspace for component.
Definition: FunctionSpace.cpp:46
bool operator!=(const FunctionSpace &V) const
Inequality operator.
Definition: FunctionSpace.cpp:40
bool operator==(const FunctionSpace &V) const
Equality operator.
Definition: FunctionSpace.cpp:35
FunctionSpace(std::shared_ptr< const mesh::Mesh > mesh, std::shared_ptr< const fem::FiniteElement > element, std::shared_ptr< const fem::DofMap > dofmap)
Create function space for given mesh, element and dofmap.
Definition: FunctionSpace.cpp:26