v0.8.15
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:
forces_and_sources_testing_users_base.cpp.

Definition at line 38 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 65 of file EntPolynomialBaseCtx.cpp.

69  : dAta(data), sPace(space), bAse(base), copyNodeBase(copy_node_base) {
70 
71  ierr = setBase();
72  CHKERRABORT(PETSC_COMM_WORLD, ierr);
73 }
const FieldApproximationBase bAse
const FieldApproximationBase copyNodeBase
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
DataForcesAndSourcesCore & dAta

◆ ~EntPolynomialBaseCtx()

EntPolynomialBaseCtx::~EntPolynomialBaseCtx ( )

Definition at line 75 of file EntPolynomialBaseCtx.cpp.

75 {}

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 48 of file EntPolynomialBaseCtx.cpp.

49  {
50 
52  *iface = NULL;
53  if (uuid == IDD_TET_BASE_FUNCTION || uuid == IDD_TRI_BASE_FUNCTION ||
54  uuid == IDD_EDGE_BASE_FUNCTION) {
55  *iface = const_cast<EntPolynomialBaseCtx *>(this);
57  } else {
58  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
59  }
61  CHKERRG(ierr);
63 }
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
Class used to pass element data to calculate base functions on tet,triangle,edge. ...
#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 const MOFEMuuid IDD_TET_BASE_FUNCTION
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static const MOFEMuuid IDD_EDGE_BASE_FUNCTION
static const MOFEMuuid IDD_TRI_BASE_FUNCTION

◆ setBase()

MoFEMErrorCode EntPolynomialBaseCtx::setBase ( )
protected

Definition at line 77 of file EntPolynomialBaseCtx.cpp.

77  {
79  switch (bAse) {
81  switch (sPace) {
82  case NOSPACE:
83  case NOFIELD:
84  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
85  case H1:
86  case HCURL:
87  case HDIV:
88  case L2:
90  break;
91  default:
92  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
93  "Not implemented for this space", FieldSpaceNames[sPace]);
94  }
95  break;
97  switch (sPace) {
98  case NOSPACE:
99  case NOFIELD:
100  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
101  case H1:
102  case HCURL:
103  case HDIV:
104  case L2:
106  break;
107  default:
108  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
109  "Not implemented for this space", FieldSpaceNames[sPace]);
110  }
111  break;
113  switch (sPace) {
114  case NOSPACE:
115  case NOFIELD:
116  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
117  case H1:
118  case HCURL:
119  case HDIV:
120  case L2:
122  break;
123  default:
124  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
125  "Not implemented for this space",
127  }
128  break;
129  case USER_BASE:
130  break;
131  default:
132  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
133  "Not implemented for this base <%s>",
135  }
137 }
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:170
user implemented approximation base
Definition: definitions.h:151
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:483
scalar or vector of scalars describe (no true field)
Definition: definitions.h:167
const FieldApproximationBase bAse
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
static const char *const ApproximationBaseNames[]
Definition: definitions.h:155
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:142
static const char *const FieldSpaceNames[]
Definition: definitions.h:175
field with continuous tangents
Definition: definitions.h:169
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:168
field with C-1 continuity
Definition: definitions.h:171

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 43 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 47 of file EntPolynomialBaseCtx.hpp.

◆ copyNodeBase

const FieldApproximationBase MoFEM::EntPolynomialBaseCtx::copyNodeBase

Definition at line 55 of file EntPolynomialBaseCtx.hpp.

◆ dAta

DataForcesAndSourcesCore& MoFEM::EntPolynomialBaseCtx::dAta

◆ fePtr

const FEMethod* MoFEM::EntPolynomialBaseCtx::fePtr

Definition at line 56 of file EntPolynomialBaseCtx.hpp.

◆ sPace

const FieldSpace MoFEM::EntPolynomialBaseCtx::sPace

Definition at line 53 of file EntPolynomialBaseCtx.hpp.


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