v0.9.0
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 (const MOFEMuuid &uuid, BaseFunctionUnknownInterface **iface) const
 
 LobattoPolynomial ()
 
 ~LobattoPolynomial ()
 
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 52 of file LobattoPolynomial.hpp.

Constructor & Destructor Documentation

◆ LobattoPolynomial()

MoFEM::LobattoPolynomial::LobattoPolynomial ( )

Definition at line 57 of file LobattoPolynomial.hpp.

57 {}

◆ ~LobattoPolynomial()

MoFEM::LobattoPolynomial::~LobattoPolynomial ( )

Definition at line 58 of file LobattoPolynomial.hpp.

58 {}

Member Function Documentation

◆ getValue()

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

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 54 of file LobattoPolynomial.cpp.

55  {
56 
58  BaseFunctionUnknownInterface *iface;
59  ierr = ctx_ptr->query_interface(IDD_LOBATTO_BASE_FUNCTION, &iface);
60  CHKERRG(ierr);
61  LobattoPolynomialCtx *ctx = reinterpret_cast<LobattoPolynomialCtx *>(iface);
62  // Polynomial order start from 2nd order
63  ctx->baseFunPtr->resize(pts.size2(), ctx->P + 1 - 2, false);
64  ctx->baseDiffFunPtr->resize(pts.size2(), ctx->dIm * (ctx->P + 1 - 2), false);
65  double *l = NULL;
66  double *diff_l = NULL;
67  for (unsigned int gg = 0; gg < pts.size2(); gg++) {
68  if (ctx->baseFunPtr)
69  l = &((*ctx->baseFunPtr)(gg, 0));
70  if (ctx->baseDiffFunPtr)
71  diff_l = &((*ctx->baseDiffFunPtr)(gg, 0));
72  ierr = (ctx->basePolynomialsType0)(ctx->P, pts(0, gg), ctx->diffS, l,
73  diff_l, ctx->dIm);
74  CHKERRG(ierr);
75  }
77 }
#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_LOBATTO_BASE_FUNCTION

◆ query_interface()

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

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 37 of file LobattoPolynomial.cpp.

38  {
39 
41  *iface = NULL;
42  if (uuid == IDD_LOBATTO_BASE_FUNCTION) {
43  *iface = const_cast<LobattoPolynomial *>(this);
45  } else {
46  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
47  }
49  CHKERRG(ierr);
51 }
#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_LOBATTO_BASE_FUNCTION

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