v0.15.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MoFEM::LobattoPolynomial Struct Reference

Class for calculating Lobatto basis functions. More...

#include "src/approximation/LobattoPolynomial.hpp"

Inheritance diagram for MoFEM::LobattoPolynomial:
[legend]
Collaboration diagram for MoFEM::LobattoPolynomial:
[legend]

Public Member Functions

MoFEMErrorCode query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const
 
 LobattoPolynomial ()
 
 ~LobattoPolynomial ()
 
MoFEMErrorCode getValue (MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
 Evaluate Lobatto basis functions at given points.
 
- Public Member Functions inherited from MoFEM::LegendrePolynomial
 LegendrePolynomial ()
 
 ~LegendrePolynomial ()
 
- Public Member Functions inherited from MoFEM::BaseFunction
virtual MoFEMErrorCode getValue (MatrixDouble &pts_x, MatrixDouble &pts_t, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
 
- Public Member Functions inherited from MoFEM::BaseFunctionUnknownInterface
virtual ~BaseFunctionUnknownInterface ()=default
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (bool error_if_registration_failed=true)
 Register interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface reference to pointer of interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface.
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface.
 
virtual ~UnknownInterface ()=default
 

Additional Inherited Members

- Public Types inherited from MoFEM::BaseFunction
using DofsSideMap = multi_index_container< DofsSideMapData, indexed_by< ordered_non_unique< tag< TypeSide_mi_tag >, composite_key< DofsSideMapData, member< DofsSideMapData, EntityType, &DofsSideMapData::type >, member< DofsSideMapData, int, &DofsSideMapData::side > > >, ordered_unique< tag< EntDofIdx_mi_tag >, member< DofsSideMapData, int, &DofsSideMapData::dof > > > >
 Map entity stype and side to element/entity dof index.
 
- Static Public Member Functions inherited from MoFEM::UnknownInterface
static MoFEMErrorCode getLibVersion (Version &version)
 Get library version.
 
static MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version)
 Get database major version.
 
static MoFEMErrorCode setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD))
 Get database major version.
 
static MoFEMErrorCode getInterfaceVersion (Version &version)
 Get database major version.
 

Detailed Description

Class for calculating Lobatto basis functions.

This class extends LegendrePolynomial to provide Lobatto polynomial evaluation capabilities. Lobatto polynomials are hierarchical basis functions that include both vertex and higher-order modes, making them ideal for spectral and high-order finite element methods.

Definition at line 86 of file LobattoPolynomial.hpp.

Constructor & Destructor Documentation

◆ LobattoPolynomial()

MoFEM::LobattoPolynomial::LobattoPolynomial ( )
inline

Definition at line 91 of file LobattoPolynomial.hpp.

91{}

◆ ~LobattoPolynomial()

MoFEM::LobattoPolynomial::~LobattoPolynomial ( )
inline

Definition at line 92 of file LobattoPolynomial.hpp.

92{}

Member Function Documentation

◆ getValue()

MoFEMErrorCode MoFEM::LobattoPolynomial::getValue ( MatrixDouble pts,
boost::shared_ptr< BaseFunctionCtx ctx_ptr 
)
virtual

Evaluate Lobatto basis functions at given points.

Parameters
ptsmatrix of evaluation points
ctx_ptrcontext containing evaluation parameters
Returns
error code

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 24 of file LobattoPolynomial.cpp.

25 {
26
28 auto ctx = ctx_ptr->getInterface<LobattoPolynomialCtx>();
29 // Polynomial order start from 2nd order
30 ctx->baseFunPtr->resize(pts.size2(), ctx->P + 1, false);
31 ctx->baseDiffFunPtr->resize(pts.size2(), ctx->dIm * (ctx->P + 1), false);
32 double *l = NULL;
33 double *diff_l = NULL;
34 for (unsigned int gg = 0; gg < pts.size2(); gg++) {
35 if (ctx->baseFunPtr)
36 l = &((*ctx->baseFunPtr)(gg, 0));
37 if (ctx->baseDiffFunPtr)
38 diff_l = &((*ctx->baseDiffFunPtr)(gg, 0));
39 ierr = (ctx->basePolynomialsType0)(ctx->P, pts(0, gg), ctx->diffS, l,
40 diff_l, ctx->dIm);
42 }
44}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FTensor::Index< 'l', 3 > l
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr

◆ query_interface()

MoFEMErrorCode MoFEM::LobattoPolynomial::query_interface ( boost::typeindex::type_index  type_index,
UnknownInterface **  iface 
) const
virtual

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 17 of file LobattoPolynomial.cpp.

18 {
19 *iface = const_cast<LobattoPolynomial *>(this);
20 return 0;
21}

The documentation for this struct was generated from the following files: