v0.9.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 (const MOFEMuuid &uuid, BaseFunctionUnknownInterface **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
 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
 

Detailed Description

Calculating Lobatto base functions.

Definition at line 86 of file LobattoPolynomial.hpp.

Constructor & Destructor Documentation

◆ KernelLobattoPolynomial()

MoFEM::KernelLobattoPolynomial::KernelLobattoPolynomial ( )

Definition at line 91 of file LobattoPolynomial.hpp.

91 {}

◆ ~KernelLobattoPolynomial()

MoFEM::KernelLobattoPolynomial::~KernelLobattoPolynomial ( )

Definition at line 92 of file LobattoPolynomial.hpp.

92 {}

Member Function Documentation

◆ getValue()

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

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 112 of file LobattoPolynomial.cpp.

113  {
114 
116  BaseFunctionUnknownInterface *iface;
117  ierr = ctx_ptr->query_interface(IDD_KERNEL_BASE_FUNCTION, &iface);
118  CHKERRG(ierr);
119  LobattoPolynomialCtx *ctx = reinterpret_cast<LobattoPolynomialCtx *>(iface);
120  ctx->baseFunPtr->resize(pts.size2(), ctx->P + 1, false);
121  ctx->baseDiffFunPtr->resize(pts.size2(), ctx->dIm * (ctx->P + 1), false);
122  double *l = NULL;
123  double *diff_l = NULL;
124  for (unsigned int gg = 0; gg < pts.size2(); gg++) {
125  if (ctx->baseFunPtr)
126  l = &((*ctx->baseFunPtr)(gg, 0));
127  if (ctx->baseDiffFunPtr)
128  diff_l = &((*ctx->baseDiffFunPtr)(gg, 0));
129  ierr = (ctx->basePolynomialsType0)(ctx->P, pts(0, gg), ctx->diffS, l,
130  diff_l, ctx->dIm);
131  CHKERRG(ierr);
132  }
134 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static const MOFEMuuid IDD_KERNEL_BASE_FUNCTION

◆ query_interface()

MoFEMErrorCode MoFEM::KernelLobattoPolynomial::query_interface ( const MOFEMuuid uuid,
BaseFunctionUnknownInterface **  iface 
) const
virtual

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 95 of file LobattoPolynomial.cpp.

96  {
97 
99  *iface = NULL;
100  if (uuid == IDD_KERNEL_BASE_FUNCTION) {
101  *iface = const_cast<KernelLobattoPolynomial *>(this);
103  } else {
104  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
105  }
107  CHKERRG(ierr);
109 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, BaseFunctionUnknownInterface **iface) const
static const MOFEMuuid IDD_KERNEL_BASE_FUNCTION

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