LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Related Symbols | List of all members
lf::uscalfe::UniformScalarFESpace< SCALAR > Class Template Reference

Space of scalar valued finite element functions on a hybrid 2D mesh More...

#include <lf/uscalfe/uscalfe.h>

Inheritance diagram for lf::uscalfe::UniformScalarFESpace< SCALAR >:
lf::fe::ScalarFESpace< SCALAR > lf::uscalfe::FeSpaceLagrangeO1< SCALAR > lf::uscalfe::FeSpaceLagrangeO2< SCALAR > lf::uscalfe::FeSpaceLagrangeO3< SCALAR >

Public Types

using Scalar = SCALAR
 
- Public Types inherited from lf::fe::ScalarFESpace< SCALAR >
using Scalar = SCALAR
 

Public Member Functions

 UniformScalarFESpace (const UniformScalarFESpace &)=delete
 
 UniformScalarFESpace (UniformScalarFESpace &&) noexcept=default
 
UniformScalarFESpaceoperator= (const UniformScalarFESpace &)=delete
 
UniformScalarFESpaceoperator= (UniformScalarFESpace &&) noexcept=default
 
 UniformScalarFESpace (std::shared_ptr< const lf::mesh::Mesh > mesh_p, std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_tria_p, std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_quad_p, std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_edge_p=nullptr, std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_point_p=nullptr)
 Main constructor: sets up the local-to-global index mapping (dof handler)
 
std::shared_ptr< const lf::mesh::MeshMesh () const override
 access to underlying mesh
 
const lf::assemble::DofHandlerLocGlobMap () const override
 access to associated local-to-global map
 
lf::fe::ScalarReferenceFiniteElement< SCALAR > const * ShapeFunctionLayout (const lf::mesh::Entity &entity) const override
 access to shape function layout for cells
 
lf::fe::ScalarReferenceFiniteElement< SCALAR > const * ShapeFunctionLayout (lf::base::RefEl ref_el_type) const
 access to shape function layout for cells
 
size_type NumRefShapeFunctions (const lf::mesh::Entity &entity) const override
 number of interior shape functions associated to entities of various types
 
size_type NumRefShapeFunctions (lf::base::RefEl ref_el_type) const
 number of interior shape functions associated to entities of various types
 
 ~UniformScalarFESpace () override=default
 No special destructor.
 
- Public Member Functions inherited from lf::fe::ScalarFESpace< SCALAR >
virtual ~ScalarFESpace ()=default
 No special destructor.
 

Private Member Functions

assemble::UniformFEDofHandler InitDofHandler (std::shared_ptr< const lf::mesh::Mesh > mesh_p)
 
bool check_ptr () const
 

Private Attributes

std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_tria_p_
 
std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_quad_p_
 
std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_edge_p_
 
std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_point_p_
 
size_type num_rsf_node_ {0}
 
size_type num_rsf_edge_ {0}
 
size_type num_rsf_tria_ {0}
 
size_type num_rsf_quad_ {0}
 
assemble::UniformFEDofHandler dofh_
 

Related Symbols

(Note that these are not member symbols.)

template<class SCALAR >
void PrintInfo (std::ostream &o, const UniformScalarFESpace< SCALAR > &fes, unsigned int ctrl=0)
 Print information about a UniformScalarFESpace to the given stream object.
 
template<typename SCALAR >
std::ostream & operator<< (std::ostream &o, const UniformScalarFESpace< SCALAR > &fes)
 output operator for scalar parametric finite element space
 

Additional Inherited Members

- Protected Member Functions inherited from lf::fe::ScalarFESpace< SCALAR >
 ScalarFESpace ()=default
 default constructor, needed by std::vector
 
 ScalarFESpace (const ScalarFESpace &)=default
 
 ScalarFESpace (ScalarFESpace &&) noexcept=default
 
ScalarFESpaceoperator= (const ScalarFESpace &)=default
 
ScalarFESpaceoperator= (ScalarFESpace &&) noexcept=default
 

Detailed Description

template<typename SCALAR>
class lf::uscalfe::UniformScalarFESpace< SCALAR >

Space of scalar valued finite element functions on a hybrid 2D mesh

Template Parameters
SCALARunderlying scalar type, usually either double or complex<double>

The abstract concept of a (parametric) finite element space involves

This class just contains (pointers to) objects representing the various building blocks of a finite element space. It does not offer elaborate methods.

Note
Some of the pointers may be NULL. For instance, if all computations are done on purely triangular meshes then a finite element specification for quadrilaterals need not be given.

This class is covered in \lref{par:fespace}.

Definition at line 50 of file uniform_scalar_fe_space.h.

Member Typedef Documentation

◆ Scalar

template<typename SCALAR >
using lf::uscalfe::UniformScalarFESpace< SCALAR >::Scalar = SCALAR

Definition at line 52 of file uniform_scalar_fe_space.h.

Constructor & Destructor Documentation

◆ UniformScalarFESpace() [1/3]

template<typename SCALAR >
lf::uscalfe::UniformScalarFESpace< SCALAR >::UniformScalarFESpace ( const UniformScalarFESpace< SCALAR > & )
delete

◆ UniformScalarFESpace() [2/3]

template<typename SCALAR >
lf::uscalfe::UniformScalarFESpace< SCALAR >::UniformScalarFESpace ( UniformScalarFESpace< SCALAR > && )
defaultnoexcept

◆ UniformScalarFESpace() [3/3]

template<typename SCALAR >
lf::uscalfe::UniformScalarFESpace< SCALAR >::UniformScalarFESpace ( std::shared_ptr< const lf::mesh::Mesh > mesh_p,
std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_tria_p,
std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_quad_p,
std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_edge_p = nullptr,
std::shared_ptr< const lf::fe::ScalarReferenceFiniteElement< SCALAR > > rfs_point_p = nullptr )
inline

Main constructor: sets up the local-to-global index mapping (dof handler)

Parameters
mesh_pshared pointer to underlying mesh (immutable)
rfs_tria_pshared pointer to layout description for reference shape functions on triangular cells
rfs_quad_pshared pointer to layout description for reference shape functions on quadrilateral cells
rfs_edge_pshared pointer to layout description for reference shape functions on the edges
rfs_point_pshared pointer to layout description for reference shape functions on the edges

The schemes for local shape have to satisfy certain compatibility conditions:

  • nodes may carry at most one local/global shape function
  • The number of interior shape functions for edges of triangles and quadrilaterals must agree.
Note
none of the shape function layouts needs to be specified; just pass a null pointer. This will then restrict the applicability of the resulting finite element space objects to particular meshes.

Definition at line 82 of file uniform_scalar_fe_space.h.

◆ ~UniformScalarFESpace()

template<typename SCALAR >
lf::uscalfe::UniformScalarFESpace< SCALAR >::~UniformScalarFESpace ( )
overridedefault

No special destructor.

Member Function Documentation

◆ check_ptr()

template<typename SCALAR >
bool lf::uscalfe::UniformScalarFESpace< SCALAR >::check_ptr ( ) const
inlineprivate

Checks whether some pointer are not valid

Definition at line 174 of file uniform_scalar_fe_space.h.

References lf::uscalfe::UniformScalarFESpace< SCALAR >::Mesh(), and lf::uscalfe::UniformScalarFESpace< SCALAR >::rfs_quad_p_.

◆ InitDofHandler()

template<typename SCALAR >
assemble::UniformFEDofHandler lf::uscalfe::UniformScalarFESpace< SCALAR >::InitDofHandler ( std::shared_ptr< const lf::mesh::Mesh > mesh_p)
private

Initialization of class member variables and consistency checks

Definition at line 241 of file uniform_scalar_fe_space.h.

References lf::base::RefEl::kPoint(), lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), and lf::base::RefEl::kTria().

◆ LocGlobMap()

template<typename SCALAR >
const lf::assemble::DofHandler & lf::uscalfe::UniformScalarFESpace< SCALAR >::LocGlobMap ( ) const
inlineoverridevirtual

access to associated local-to-global map

Returns
a reference to the lf::assemble::DofHandler object (immutable)

Implements lf::fe::ScalarFESpace< SCALAR >.

Definition at line 109 of file uniform_scalar_fe_space.h.

References lf::uscalfe::UniformScalarFESpace< SCALAR >::dofh_, and lf::uscalfe::UniformScalarFESpace< SCALAR >::Mesh().

Referenced by lf::uscalfe::PrintInfo().

◆ Mesh()

template<typename SCALAR >
std::shared_ptr< const lf::mesh::Mesh > lf::uscalfe::UniformScalarFESpace< SCALAR >::Mesh ( ) const
inlineoverridevirtual

◆ NumRefShapeFunctions() [1/2]

template<typename SCALAR >
size_type lf::uscalfe::UniformScalarFESpace< SCALAR >::NumRefShapeFunctions ( const lf::mesh::Entity & entity) const
overridevirtual

number of interior shape functions associated to entities of various types

Implements lf::fe::ScalarFESpace< SCALAR >.

Definition at line 386 of file uniform_scalar_fe_space.h.

References lf::mesh::Entity::RefEl().

Referenced by lf::uscalfe::PrintInfo().

◆ NumRefShapeFunctions() [2/2]

template<typename SCALAR >
size_type lf::uscalfe::UniformScalarFESpace< SCALAR >::NumRefShapeFunctions ( lf::base::RefEl ref_el_type) const

number of interior shape functions associated to entities of various types

Definition at line 394 of file uniform_scalar_fe_space.h.

References lf::base::RefEl::kPoint(), lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), and lf::base::RefEl::kTria().

◆ operator=() [1/2]

template<typename SCALAR >
UniformScalarFESpace & lf::uscalfe::UniformScalarFESpace< SCALAR >::operator= ( const UniformScalarFESpace< SCALAR > & )
delete

◆ operator=() [2/2]

template<typename SCALAR >
UniformScalarFESpace & lf::uscalfe::UniformScalarFESpace< SCALAR >::operator= ( UniformScalarFESpace< SCALAR > && )
defaultnoexcept

◆ ShapeFunctionLayout() [1/2]

template<typename SCALAR >
lf::fe::ScalarReferenceFiniteElement< SCALAR > const * lf::uscalfe::UniformScalarFESpace< SCALAR >::ShapeFunctionLayout ( const lf::mesh::Entity & entity) const
overridevirtual

access to shape function layout for cells

access to shape function layout for mesh entities

Parameters
entityThe entity to get the reference element for
Warning
NULL pointers may be returned by this method in case a finite element specification was not given for a particular topological type of entity.
Note
The returned ShapeFunctionLayout pointer will remain for the entire lifetime of the owning ScalarFESpace.
See also
ScalarReferenceFiniteElement

Implements lf::fe::ScalarFESpace< SCALAR >.

Definition at line 346 of file uniform_scalar_fe_space.h.

References lf::mesh::Entity::RefEl().

◆ ShapeFunctionLayout() [2/2]

template<typename SCALAR >
lf::fe::ScalarReferenceFiniteElement< SCALAR > const * lf::uscalfe::UniformScalarFESpace< SCALAR >::ShapeFunctionLayout ( lf::base::RefEl ref_el_type) const

access to shape function layout for cells

Parameters
ref_el_typetype of entit, can be anything except for lf::base::RefEl::kPoint()
Warning
NULL pointers may be returned by this method in case a finite element specification was not given for a particular topological type of entity.
Note
The returned ShapeFunctionLayout pointer will remain for the entire lifetime of the owning ScalarFESpace

Definition at line 353 of file uniform_scalar_fe_space.h.

References lf::base::RefEl::kPoint(), lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), and lf::base::RefEl::kTria().

Friends And Related Symbol Documentation

◆ operator<<()

template<typename SCALAR >
std::ostream & operator<< ( std::ostream & o,
const UniformScalarFESpace< SCALAR > & fes )
related

output operator for scalar parametric finite element space

Definition at line 445 of file uniform_scalar_fe_space.h.

References lf::uscalfe::UniformScalarFESpace< SCALAR >::PrintInfo().

◆ PrintInfo()

template<class SCALAR >
void PrintInfo ( std::ostream & o,
const UniformScalarFESpace< SCALAR > & fes,
unsigned int ctrl = 0 )
related

Print information about a UniformScalarFESpace to the given stream object.

Parameters
oThe stream to which we should print
fesThe UniformScalarFESpace that should be printed.
ctrlControls the level of output:

Level of output:

  • if ctrl & kUniformScalarFESpaceOutMesh, mesh information will be printed.
  • if ctrl & kUniformScalarFESpaceOutDofh, information about the dof handler will be printed.
  • if ctrl & kUniformScalarFESpaceOutRsfs, information about the reference shape functions will be printed.

Referenced by lf::uscalfe::UniformScalarFESpace< SCALAR >::operator<<().

Member Data Documentation

◆ dofh_

template<typename SCALAR >
assemble::UniformFEDofHandler lf::uscalfe::UniformScalarFESpace< SCALAR >::dofh_
private

Local-to-global index map for the finite element space

Definition at line 168 of file uniform_scalar_fe_space.h.

Referenced by lf::uscalfe::UniformScalarFESpace< SCALAR >::LocGlobMap(), and lf::uscalfe::UniformScalarFESpace< SCALAR >::Mesh().

◆ num_rsf_edge_

template<typename SCALAR >
size_type lf::uscalfe::UniformScalarFESpace< SCALAR >::num_rsf_edge_ {0}
private

Definition at line 164 of file uniform_scalar_fe_space.h.

◆ num_rsf_node_

template<typename SCALAR >
size_type lf::uscalfe::UniformScalarFESpace< SCALAR >::num_rsf_node_ {0}
private

Numbers of local shape functions for different types of entities

Definition at line 164 of file uniform_scalar_fe_space.h.

◆ num_rsf_quad_

template<typename SCALAR >
size_type lf::uscalfe::UniformScalarFESpace< SCALAR >::num_rsf_quad_ {0}
private

Definition at line 165 of file uniform_scalar_fe_space.h.

◆ num_rsf_tria_

template<typename SCALAR >
size_type lf::uscalfe::UniformScalarFESpace< SCALAR >::num_rsf_tria_ {0}
private

Definition at line 164 of file uniform_scalar_fe_space.h.

◆ rfs_edge_p_

template<typename SCALAR >
std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR> > lf::uscalfe::UniformScalarFESpace< SCALAR >::rfs_edge_p_
private

Description of reference shape functions on an edge

Definition at line 159 of file uniform_scalar_fe_space.h.

◆ rfs_point_p_

template<typename SCALAR >
std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR> > lf::uscalfe::UniformScalarFESpace< SCALAR >::rfs_point_p_
private

Description of refererence shape functions on a point

Definition at line 162 of file uniform_scalar_fe_space.h.

◆ rfs_quad_p_

template<typename SCALAR >
std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR> > lf::uscalfe::UniformScalarFESpace< SCALAR >::rfs_quad_p_
private

Description of reference shape functions on quadrilateral cells

Definition at line 156 of file uniform_scalar_fe_space.h.

Referenced by lf::uscalfe::UniformScalarFESpace< SCALAR >::check_ptr().

◆ rfs_tria_p_

template<typename SCALAR >
std::shared_ptr<const lf::fe::ScalarReferenceFiniteElement<SCALAR> > lf::uscalfe::UniformScalarFESpace< SCALAR >::rfs_tria_p_
private

Description of reference shape functions on triangular cells

Definition at line 153 of file uniform_scalar_fe_space.h.


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