45 std::shared_ptr<const fem::FiniteElement>
element,
46 std::shared_ptr<const fem::DofMap>
dofmap);
73 std::int64_t
dim()
const;
78 std::shared_ptr<FunctionSpace>
sub(
const std::vector<int>&
component)
const;
88 std::pair<std::shared_ptr<FunctionSpace>, std::vector<std::int32_t>>
103 Eigen::Array<double, Eigen::Dynamic, 3, Eigen::RowMajor>
111 Eigen::Array<double, Eigen::Dynamic, 3, Eigen::RowMajor>
115 std::size_t
id()
const;
118 std::shared_ptr<const mesh::Mesh>
mesh()
const;
121 std::shared_ptr<const fem::FiniteElement>
element()
const;
124 std::shared_ptr<const fem::DofMap>
dofmap()
const;
128 std::shared_ptr<const mesh::Mesh> _mesh;
131 std::shared_ptr<const fem::FiniteElement> _element;
134 std::shared_ptr<const fem::DofMap> _dofmap;
137 std::vector<int> _component;
143 std::size_t _root_space_id;
146 mutable std::map<std::vector<int>, std::weak_ptr<FunctionSpace>> _subspaces;
158 std::array<std::vector<std::shared_ptr<const FunctionSpace>>, 2>
161 std::vector<std::array<std::shared_ptr<const FunctionSpace>, 2>>>& V);
Finite Element, containing the dof layout on a reference element, and various methods for evaluating ...
Definition: FiniteElement.h:25
This class represents a finite element function space defined by a mesh, a finite element,...
Definition: FunctionSpace.h:38
FunctionSpace(FunctionSpace &&V)=default
Move constructor.
FunctionSpace & operator=(FunctionSpace &&V)=default
Move assignment operator.
std::vector< int > component() const
Get the component with respect to the root superspace.
Definition: FunctionSpace.cpp:214
std::shared_ptr< FunctionSpace > sub(const std::vector< int > &component) const
Extract subspace for component.
Definition: FunctionSpace.cpp:154
Eigen::Array< double, Eigen::Dynamic, 3, Eigen::RowMajor > tabulate_dof_coordinates() const
Tabulate the physical coordinates of all dofs on this process.
Definition: FunctionSpace.cpp:217
bool contains(const FunctionSpace &V) const
Check whether V is subspace of this, or this itself.
Definition: FunctionSpace.cpp:255
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:191
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:120
Eigen::Array< double, Eigen::Dynamic, 3, Eigen::RowMajor > tabulate_scalar_subspace_dof_coordinates() const
Tabulate the physical coordinates of all dofs of scalar subspace on this process. For a VectorFunctio...
Definition: FunctionSpace.cpp:230
virtual ~FunctionSpace()=default
Destructor.
bool has_element(const fem::FiniteElement &element) const
Check if function space has given element.
Definition: FunctionSpace.cpp:209
std::shared_ptr< const fem::DofMap > dofmap() const
The dofmap.
Definition: FunctionSpace.cpp:250
std::int64_t dim() const
Return global dimension of the function space.
Definition: FunctionSpace.cpp:139
std::shared_ptr< const fem::FiniteElement > element() const
The finite element.
Definition: FunctionSpace.cpp:245
bool operator!=(const FunctionSpace &V) const
Inequality operator.
Definition: FunctionSpace.cpp:134
bool operator==(const FunctionSpace &V) const
Equality operator.
Definition: FunctionSpace.cpp:129
std::shared_ptr< const mesh::Mesh > mesh() const
The mesh.
Definition: FunctionSpace.cpp:243
std::size_t id() const
Unique identifier.
Definition: FunctionSpace.cpp:241
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:274