v0.8.15
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, MoFEM::UnknownInterface **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 ()
 
 ~BaseFunction ()
 
virtual MoFEMErrorCode getValue (MatrixDouble &pts_x, MatrixDouble &pts_t, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of 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 ()
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

Calculating Lobatto base functions.

Definition at line 54 of file LobattoPolynomial.hpp.

Constructor & Destructor Documentation

◆ LobattoPolynomial()

MoFEM::LobattoPolynomial::LobattoPolynomial ( )

Definition at line 58 of file LobattoPolynomial.hpp.

58 {}

◆ ~LobattoPolynomial()

MoFEM::LobattoPolynomial::~LobattoPolynomial ( )

Definition at line 59 of file LobattoPolynomial.hpp.

59 {}

Member Function Documentation

◆ getValue()

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

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 66 of file LobattoPolynomial.cpp.

69  {
70 
73  ierr = ctx_ptr->query_interface(IDD_LOBATTO_BASE_FUNCTION,&iface); CHKERRG(ierr);
74  LobattoPolynomialCtx *ctx = reinterpret_cast<LobattoPolynomialCtx*>(iface);
75  // Polynomial order start from 2nd order
76  ctx->baseFunPtr->resize(pts.size2(),ctx->P+1-2,false);
77  ctx->baseDiffFunPtr->resize(pts.size2(),ctx->dIm*(ctx->P+1-2),false);
78  double *l = NULL;
79  double *diff_l = NULL;
80  for(unsigned int gg = 0;gg<pts.size2();gg++) {
81  if(ctx->baseFunPtr) l = &((*ctx->baseFunPtr)(gg,0));
82  if(ctx->baseDiffFunPtr) diff_l = &((*ctx->baseDiffFunPtr)(gg,0));
83  ierr = (ctx->basePolynomialsType0)(ctx->P,pts(0,gg),ctx->diffS,l,diff_l,ctx->dIm); CHKERRG(ierr);
84  }
86 }
boost::shared_ptr< MatrixDouble > baseFunPtr
boost::shared_ptr< MatrixDouble > baseDiffFunPtr
PetscErrorCode(* basePolynomialsType0)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
base class for all interface classes
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
Class used to give arguments to Lobatto base functions.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static const MOFEMuuid IDD_LOBATTO_BASE_FUNCTION

◆ query_interface()

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

Reimplemented from MoFEM::LegendrePolynomial.

Definition at line 50 of file LobattoPolynomial.cpp.

52  {
53 
55  *iface = NULL;
56  if(uuid == IDD_LOBATTO_BASE_FUNCTION) {
57  *iface = const_cast<LobattoPolynomial*>(this);
59  } else {
60  SETERRQ(PETSC_COMM_WORLD,MOFEM_DATA_INCONSISTENCY,"wrong interference");
61  }
64 }
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, MoFEM::UnknownInterface **iface) const
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static const MOFEMuuid IDD_LOBATTO_BASE_FUNCTION
Calculating Lobatto base functions.

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