v0.13.1
Public Member Functions | List of all members
MoFEM::LobattoPolynomial Struct Reference

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

Additional Inherited Members

- Static Public Member Functions inherited from MoFEM::UnknownInterface
static MoFEMErrorCode getLibVersion (Version &version)
 Get library version. More...
 
static MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version)
 Get database major version. More...
 
static MoFEMErrorCode setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD))
 Get database major version. More...
 
static MoFEMErrorCode getInterfaceVersion (Version &version)
 Get database major version. More...
 

Detailed Description

Calculating Lobatto base functions.

Definition at line 35 of file LobattoPolynomial.hpp.

Constructor & Destructor Documentation

◆ LobattoPolynomial()

MoFEM::LobattoPolynomial::LobattoPolynomial ( )

Definition at line 40 of file LobattoPolynomial.hpp.

40{}

◆ ~LobattoPolynomial()

MoFEM::LobattoPolynomial::~LobattoPolynomial ( )

Definition at line 41 of file LobattoPolynomial.hpp.

41{}

Member Function Documentation

◆ getValue()

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

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()
Definition: definitions.h:447
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:483
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
FTensor::Index< 'l', 3 > l
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76

◆ 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: