17#include <lf/assemble/assemble.h>
18#include <lf/fe/scalar_fe_space.h>
49template <
typename SCALAR>
84 std::shared_ptr<const
lf::
fe::ScalarReferenceFiniteElement<SCALAR>>
86 std::shared_ptr<const
lf::
fe::ScalarReferenceFiniteElement<SCALAR>>
88 std::shared_ptr<const
lf::
fe::ScalarReferenceFiniteElement<SCALAR>>
90 std::shared_ptr<const
lf::
fe::ScalarReferenceFiniteElement<SCALAR>>
91 rfs_point_p =
nullptr)
102 [[nodiscard]] std::shared_ptr<const lf::mesh::Mesh>
Mesh()
const override {
110 LF_VERIFY_MSG(
Mesh() !=
nullptr,
"No valid FE space object: no mesh");
152 std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR>>
155 std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR>>
158 std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR>>
161 std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR>>
172 std::shared_ptr<const lf::mesh::Mesh> mesh_p);
175 LF_VERIFY_MSG(
Mesh() !=
nullptr,
"No valid FE space object: no mesh");
177 "No valid FE space object: no rsfs for cells");
225template <
class SCALAR>
227 unsigned int ctrl = 0);
234template <
typename SCALAR>
239template <
typename SCALAR>
242 std::shared_ptr<const lf::mesh::Mesh> mesh_p) {
244 LF_VERIFY_MSG(mesh_p !=
nullptr,
"Missing mesh!");
246 "Missing FE specification for cells");
247 LF_VERIFY_MSG((mesh_p->DimMesh() == 2),
"Only for 2D meshes");
253 "Missing FE specification for triangles though mesh contains some");
256 "Missing FE specification for quads though mesh contains some");
264 "Wrong type for triangle!");
265 LF_VERIFY_MSG((*rfs_tria_p_).NumRefShapeFunctions(2) <= 1,
266 "At most one shape function can be assigned to each vertex");
275 "Wrong type for quad!");
276 LF_VERIFY_MSG((*rfs_quad_p_).NumRefShapeFunctions(2) <= 1,
277 "At most one shape function can be assigned to each vertex");
285 "Wrong type for edge!");
286 LF_VERIFY_MSG((*rfs_edge_p_).NumRefShapeFunctions(1) <= 1,
287 "At most one shape function can be assigned to each vertex");
296 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(2) ==
297 (*rfs_quad_p_).NumRefShapeFunctions(2)),
298 "#RSF mismatch on nodes "
299 << (*rfs_tria_p_).NumRefShapeFunctions(2) <<
" <-> "
300 << (*rfs_quad_p_).NumRefShapeFunctions(2));
301 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(1) ==
302 (*rfs_quad_p_).NumRefShapeFunctions(1)),
303 "#RSF mismatch on edges "
304 << (*rfs_tria_p_).NumRefShapeFunctions(1) <<
" <-> "
305 << (*rfs_quad_p_).NumRefShapeFunctions(1));
308 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(2) ==
309 (*rfs_edge_p_).NumRefShapeFunctions(1)),
310 "#RSF mismatch on nodes "
311 << (*rfs_tria_p_).NumRefShapeFunctions(2) <<
" <-> "
312 << (*rfs_edge_p_).NumRefShapeFunctions(1));
313 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(1) ==
314 (*rfs_edge_p_).NumRefShapeFunctions(0)),
315 "#RSF mismatch on edges "
316 << (*rfs_tria_p_).NumRefShapeFunctions(1) <<
" <-> "
317 << (*rfs_edge_p_).NumRefShapeFunctions(0));
320 LF_ASSERT_MSG(((*rfs_quad_p_).NumRefShapeFunctions(2) ==
321 (*rfs_edge_p_).NumRefShapeFunctions(1)),
322 "#RSF mismatch on edges "
323 << (*rfs_quad_p_).NumRefShapeFunctions(2) <<
" <-> "
324 << (*rfs_edge_p_).NumRefShapeFunctions(1));
325 LF_ASSERT_MSG(((*rfs_quad_p_).NumRefShapeFunctions(1) ==
326 (*rfs_edge_p_).NumRefShapeFunctions(0)),
327 "#RSF mismatch on edges "
328 << (*rfs_quad_p_).NumRefShapeFunctions(1) <<
" <-> "
329 << (*rfs_edge_p_).NumRefShapeFunctions(0));
344template <
typename SCALAR>
351template <
typename SCALAR>
356 switch (ref_el_type) {
379 LF_VERIFY_MSG(
false,
"Illegal entity type");
385template <
typename SCALAR>
393template <
typename SCALAR>
397 "No valid FE space object: no rsfs");
399 switch (ref_el_type) {
413 LF_VERIFY_MSG(
false,
"Illegal entity type");
419template <
typename SCALAR>
426 o << *fes.
Mesh() << std::endl;
435 <<
" rsfs @ edges" << std::endl;
437 <<
" rsfs @ triangles" << std::endl;
444template <
typename SCALAR>
458template <
class SCALAR>
460 : ostream_formatter {};
A general (interface) class for DOF handling, see Lecture Document Paragraph 2.7.4....
virtual size_type NumDofs() const =0
total number of dof's handled by the object
Represents a reference element with all its properties.
static constexpr RefEl kSegment()
Returns the (1-dimensional) reference segment.
static constexpr RefEl kPoint()
Returns the (0-dimensional) reference point.
static constexpr RefEl kTria()
Returns the reference triangle.
static constexpr RefEl kQuad()
Returns the reference quadrilateral.
Space of scalar valued finite element functions on a Mesh.
ScalarFESpace()=default
default constructor, needed by std::vector
Interface class for parametric scalar valued finite elements.
Interface class representing a topological entity in a cellular complex
virtual base::RefEl RefEl() const =0
Describes the reference element type of this entity.
Collects data structures and algorithms designed for scalar finite element methods primarily meant fo...
Defines a set of interface classes that define a mesh manager and provides mesh-related tools that bu...
Collects data structures and algorithms designed for scalar finite element methods primarily meant fo...
const unsigned int kUniformScalarFESpaceOutDofh
information about the dof handler will be printed.
lf::assemble::size_type size_type
void PrintInfo(std::ostream &o, const UniformScalarFESpace< SCALAR > &fes, unsigned ctrl)
const unsigned int kUniformScalarFESpaceOutMesh
mesh information will be printed
const unsigned int kUniformScalarFESpaceOutRsfs
information about the reference shape functions will be printed
std::ostream & operator<<(std::ostream &o, const UniformScalarFESpace< SCALAR > &fes)