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

Calculating Lobatto base functions. More...

#include <src/approximation/LobattoPolynomial.hpp>

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

Public Member Functions

MoFEMErrorCode query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const
 
 KernelLobattoPolynomial ()
 
 ~KernelLobattoPolynomial ()
 
MoFEMErrorCode getValue (MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
 
- 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. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface reference 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

- 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. More...
 
- 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 69 of file LobattoPolynomial.hpp.

Constructor & Destructor Documentation

◆ KernelLobattoPolynomial()

MoFEM::KernelLobattoPolynomial::KernelLobattoPolynomial ( )
inline

Definition at line 74 of file LobattoPolynomial.hpp.

74 {}

◆ ~KernelLobattoPolynomial()

MoFEM::KernelLobattoPolynomial::~KernelLobattoPolynomial ( )
inline

Definition at line 75 of file LobattoPolynomial.hpp.

75 {}

Member Function Documentation

◆ getValue()

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

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 59 of file LobattoPolynomial.cpp.

60  {
61 
63  auto ctx = ctx_ptr->getInterface<KernelLobattoPolynomialCtx>();
64  ctx->baseFunPtr->resize(pts.size2(), ctx->P + 1, false);
65  ctx->baseDiffFunPtr->resize(pts.size2(), ctx->dIm * (ctx->P + 1), false);
66  double *l = NULL;
67  double *diff_l = NULL;
68  for (unsigned int gg = 0; gg < pts.size2(); gg++) {
69  if (ctx->baseFunPtr)
70  l = &((*ctx->baseFunPtr)(gg, 0));
71  if (ctx->baseDiffFunPtr)
72  diff_l = &((*ctx->baseDiffFunPtr)(gg, 0));
73  ierr = (ctx->basePolynomialsType0)(ctx->P, pts(0, gg), ctx->diffS, l,
74  diff_l, ctx->dIm);
75  CHKERRG(ierr);
76  }
78 }

◆ query_interface()

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

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 52 of file LobattoPolynomial.cpp.

53  {
54  *iface = const_cast<KernelLobattoPolynomial *>(this);
55  return 0;
56 }

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:460
MoFEM::KernelLobattoPolynomial::KernelLobattoPolynomial
KernelLobattoPolynomial()
Definition: LobattoPolynomial.hpp:74
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:453
CHKERRG
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:496
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21