v0.8.23
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
MoFEM::EntPolynomialBaseCtx Struct Reference

Class used to pass element data to calculate base functions on tet,triangle,edge. More...

#include <src/approximation/EntPolynomialBaseCtx.hpp>

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

Public Member Functions

MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 EntPolynomialBaseCtx (DataForcesAndSourcesCore &data, const FieldSpace space, const FieldApproximationBase base, const FieldApproximationBase copy_node_base=LASTBASE)
 
 ~EntPolynomialBaseCtx ()
 
- Public Member Functions inherited from MoFEM::BaseFunctionCtx
 BaseFunctionCtx ()
 
 ~BaseFunctionCtx ()
 
- 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
 

Public Attributes

PetscErrorCode(* basePolynomialsType0 )(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
 
PetscErrorCode(* basePolynomialsType1 )(int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)
 
DataForcesAndSourcesCoredAta
 
const FieldSpace sPace
 
const FieldApproximationBase bAse
 
const FieldApproximationBase copyNodeBase
 
const FEMethodfePtr
 

Protected Member Functions

MoFEMErrorCode setBase ()
 
- 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

Class used to pass element data to calculate base functions on tet,triangle,edge.

Examples
EshelbianPlasticity.cpp, and forces_and_sources_testing_users_base.cpp.

Definition at line 41 of file EntPolynomialBaseCtx.hpp.

Constructor & Destructor Documentation

◆ EntPolynomialBaseCtx()

EntPolynomialBaseCtx::EntPolynomialBaseCtx ( DataForcesAndSourcesCore data,
const FieldSpace  space,
const FieldApproximationBase  base,
const FieldApproximationBase  copy_node_base = LASTBASE 
)

Definition at line 40 of file EntPolynomialBaseCtx.cpp.

44  : dAta(data), sPace(space), bAse(base), copyNodeBase(copy_node_base) {
45 
46  ierr = setBase();
47  CHKERRABORT(PETSC_COMM_WORLD, ierr);
48 }
const FieldApproximationBase bAse
const FieldApproximationBase copyNodeBase
DataForcesAndSourcesCore & dAta

◆ ~EntPolynomialBaseCtx()

EntPolynomialBaseCtx::~EntPolynomialBaseCtx ( )

Definition at line 50 of file EntPolynomialBaseCtx.cpp.

50 {}

Member Function Documentation

◆ query_interface()

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

Reimplemented from MoFEM::BaseFunctionCtx.

Reimplemented in MoFEM::FatPrismPolynomialBaseCtx, and MoFEM::FlatPrismPolynomialBaseCtx.

Definition at line 23 of file EntPolynomialBaseCtx.cpp.

24  {
25 
27  *iface = NULL;
28  if (uuid == IDD_TET_BASE_FUNCTION || uuid == IDD_TRI_BASE_FUNCTION ||
29  uuid == IDD_EDGE_BASE_FUNCTION) {
30  *iface = const_cast<EntPolynomialBaseCtx *>(this);
32  } else {
33  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
34  }
36  CHKERRG(ierr);
38 }
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:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
static const MOFEMuuid IDD_TET_BASE_FUNCTION
static const MOFEMuuid IDD_EDGE_BASE_FUNCTION
static const MOFEMuuid IDD_TRI_BASE_FUNCTION

◆ setBase()

MoFEMErrorCode EntPolynomialBaseCtx::setBase ( )
protected

Definition at line 52 of file EntPolynomialBaseCtx.cpp.

52  {
54  switch (bAse) {
56  switch (sPace) {
57  case NOSPACE:
58  case NOFIELD:
59  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
60  case H1:
61  case HCURL:
62  case HDIV:
63  case L2:
65  break;
66  default:
67  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
68  "Not implemented for this space", FieldSpaceNames[sPace]);
69  }
70  break;
72  switch (sPace) {
73  case NOSPACE:
74  case NOFIELD:
75  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
76  case H1:
77  case HCURL:
78  case HDIV:
79  case L2:
81  break;
82  default:
83  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
84  "Not implemented for this space", FieldSpaceNames[sPace]);
85  }
86  break;
88  switch (sPace) {
89  case NOSPACE:
90  case NOFIELD:
91  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
92  case H1:
93  case HCURL:
94  case HDIV:
95  case L2:
97  break;
98  default:
99  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
100  "Not implemented for this space",
102  }
103  break;
104  case USER_BASE:
105  break;
106  default:
107  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
108  "Not implemented for this base <%s>",
110  }
112 }
PetscErrorCode Legendre_polynomials(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Calculate Legendre approximation basis.
field with continuous normal traction
Definition: definitions.h:172
user implemented approximation base
Definition: definitions.h:153
PetscErrorCode Jacobi_polynomials(int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)
Calculate Jacobi approximation basis.
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:500
scalar or vector of scalars describe (no true field)
Definition: definitions.h:169
const FieldApproximationBase bAse
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
static const char *const ApproximationBaseNames[]
Definition: definitions.h:157
PetscErrorCode LobattoKernel_polynomials(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Calculate Kernel Lobatto base functions.
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:144
static const char *const FieldSpaceNames[]
Definition: definitions.h:177
field with continuous tangents
Definition: definitions.h:171
PetscErrorCode(* basePolynomialsType1)(int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)
continuous field
Definition: definitions.h:170
field with C-1 continuity
Definition: definitions.h:173

Member Data Documentation

◆ bAse

const FieldApproximationBase MoFEM::EntPolynomialBaseCtx::bAse

◆ basePolynomialsType0

PetscErrorCode(* MoFEM::EntPolynomialBaseCtx::basePolynomialsType0) (int p, double s, double *diff_s, double *L, double *diffL, const int dim)

Definition at line 46 of file EntPolynomialBaseCtx.hpp.

◆ basePolynomialsType1

PetscErrorCode(* MoFEM::EntPolynomialBaseCtx::basePolynomialsType1) (int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)

Definition at line 50 of file EntPolynomialBaseCtx.hpp.

◆ copyNodeBase

const FieldApproximationBase MoFEM::EntPolynomialBaseCtx::copyNodeBase

Definition at line 58 of file EntPolynomialBaseCtx.hpp.

◆ dAta

DataForcesAndSourcesCore& MoFEM::EntPolynomialBaseCtx::dAta

◆ fePtr

const FEMethod* MoFEM::EntPolynomialBaseCtx::fePtr

Definition at line 59 of file EntPolynomialBaseCtx.hpp.

◆ sPace

const FieldSpace MoFEM::EntPolynomialBaseCtx::sPace

Definition at line 56 of file EntPolynomialBaseCtx.hpp.


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