v0.8.13
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.

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

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

◆ ~EntPolynomialBaseCtx()

EntPolynomialBaseCtx::~EntPolynomialBaseCtx ( )

Definition at line 81 of file EntPolynomialBaseCtx.cpp.

81  {
82 }

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

49  {
50 
52  *iface = NULL;
53  if(
54  uuid == IDD_TET_BASE_FUNCTION ||
55  uuid == IDD_TRI_BASE_FUNCTION ||
57  ) {
58  *iface = const_cast<EntPolynomialBaseCtx*>(this);
60  } else {
61  SETERRQ(PETSC_COMM_WORLD,MOFEM_DATA_INCONSISTENCY,"wrong interference");
62  }
65 }
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:519
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:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
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 84 of file EntPolynomialBaseCtx.cpp.

84  {
86  switch(bAse) {
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  case LASTSPACE:
99  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"Makes no sense");
100  }
101  break;
103  switch (sPace) {
104  case NOSPACE:
105  case NOFIELD:
106  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"Makes no sense");
107  case H1:
108  case HCURL:
109  case HDIV:
110  case L2:
112  break;
113  case LASTSPACE:
114  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"Makes no sense");
115  }
116  break;
118  switch (sPace) {
119  case NOSPACE:
120  case NOFIELD:
121  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"Makes no sense");
122  case H1:
123  case HCURL:
124  case HDIV:
125  case L2:
127  break;
128  case LASTSPACE:
129  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"Makes no sense");
130  }
131  break;
132  default:
133  SETERRQ1(
134  PETSC_COMM_SELF,
136  "Not implemented for this base <%s>",
138  );
139  }
141 }
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:181
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:519
scalar or vector of scalars describe (no true field)
Definition: definitions.h:178
const FieldApproximationBase bAse
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:183
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
field with continuous tangents
Definition: definitions.h:180
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:179
field with C-1 continuity
Definition: definitions.h:182

Member Data Documentation

◆ bAse

const FieldApproximationBase MoFEM::EntPolynomialBaseCtx::bAse

Definition at line 54 of file EntPolynomialBaseCtx.hpp.

◆ 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

Definition at line 52 of file EntPolynomialBaseCtx.hpp.

◆ 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: