v0.14.0
Public Member Functions | List of all members
MoFEM::LegendrePolynomial Struct Reference

Calculating Legendre base functions. More...

#include <src/approximation/LegendrePolynomial.hpp>

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

Public Member Functions

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
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. 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 Legendre base functions.

Definition at line 45 of file LegendrePolynomial.hpp.

Constructor & Destructor Documentation

◆ LegendrePolynomial()

MoFEM::LegendrePolynomial::LegendrePolynomial ( )
inline

Definition at line 50 of file LegendrePolynomial.hpp.

50 {}

◆ ~LegendrePolynomial()

MoFEM::LegendrePolynomial::~LegendrePolynomial ( )
inline

Definition at line 51 of file LegendrePolynomial.hpp.

51 {}

Member Function Documentation

◆ getValue()

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

Reimplemented from MoFEM::BaseFunction.

Reimplemented in MoFEM::KernelLobattoPolynomial, and MoFEM::LobattoPolynomial.

Definition at line 22 of file LegendrePolynomial.cpp.

23  {
24 
26  auto ctx = ctx_ptr->getInterface<LegendrePolynomialCtx>();
27  ctx->baseFunPtr->resize(pts.size2(), ctx->P + 1, false);
28  ctx->baseDiffFunPtr->resize(pts.size2(), ctx->dIm * (ctx->P + 1), false);
29  double *l = NULL;
30  double *diff_l = NULL;
31  for (unsigned int gg = 0; gg < pts.size2(); gg++) {
32  if (ctx->baseFunPtr)
33  l = &((*ctx->baseFunPtr)(gg, 0));
34  if (ctx->baseDiffFunPtr)
35  diff_l = &((*ctx->baseDiffFunPtr)(gg, 0));
36  ierr = (ctx->basePolynomialsType0)(ctx->P, pts(0, gg), ctx->diffS, l,
37  diff_l, ctx->dIm);
38  CHKERRG(ierr);
39  }
41 }

◆ query_interface()

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

Reimplemented from MoFEM::BaseFunction.

Reimplemented in MoFEM::KernelLobattoPolynomial, and MoFEM::LobattoPolynomial.

Definition at line 14 of file LegendrePolynomial.cpp.

16  {
17  *iface = const_cast<LegendrePolynomial *>(this);
18  return 9;
19 }

The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
MoFEM::LegendrePolynomial::LegendrePolynomial
LegendrePolynomial()
Definition: LegendrePolynomial.hpp:50
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
CHKERRG
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:483
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21