v0.9.0
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, BaseFunctionUnknownInterface **iface) const
 
 EntPolynomialBaseCtx (DataForcesAndSourcesCore &data, const FieldSpace space, const FieldApproximationBase base, const FieldApproximationBase copy_node_base=LASTBASE)
 
 EntPolynomialBaseCtx (DataForcesAndSourcesCore &data, const std::string field_name, const FieldSpace space, const FieldApproximationBase base, const FieldApproximationBase copy_node_base=LASTBASE)
 
- Public Member Functions inherited from MoFEM::BaseFunctionCtx
 BaseFunctionCtx ()
 
- Public Member Functions inherited from MoFEM::BaseFunctionUnknownInterface
virtual ~BaseFunctionUnknownInterface ()=default
 

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 std::string fieldName
 
const FieldApproximationBase copyNodeBase
 

Protected Member Functions

MoFEMErrorCode setBase ()
 

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

Constructor & Destructor Documentation

◆ EntPolynomialBaseCtx() [1/2]

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

Definition at line 39 of file EntPolynomialBaseCtx.cpp.

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

◆ EntPolynomialBaseCtx() [2/2]

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

Definition at line 48 of file EntPolynomialBaseCtx.cpp.

52  : dAta(data), sPace(space), bAse(base), fieldName(field_name),
53  copyNodeBase(copy_node_base) {
54  ierr = setBase();
55  CHKERRABORT(PETSC_COMM_WORLD, ierr);
56 }
const FieldApproximationBase bAse
const FieldApproximationBase copyNodeBase
DataForcesAndSourcesCore & dAta

Member Function Documentation

◆ query_interface()

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

Reimplemented from MoFEM::BaseFunctionCtx.

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

Definition at line 22 of file EntPolynomialBaseCtx.cpp.

23  {
24 
26  *iface = NULL;
27  if (uuid == IDD_TET_BASE_FUNCTION || uuid == IDD_TRI_BASE_FUNCTION ||
29  *iface = const_cast<EntPolynomialBaseCtx *>(this);
31  } else {
32  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
33  }
35  CHKERRG(ierr);
37 }
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, BaseFunctionUnknownInterface **iface) const
#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_TET_BASE_FUNCTION
static const MOFEMuuid IDD_EDGE_BASE_FUNCTION
static const MOFEMuuid IDD_TRI_BASE_FUNCTION
static const MOFEMuuid IDD_QUAD_BASE_FUNCTION

◆ setBase()

MoFEMErrorCode EntPolynomialBaseCtx::setBase ( )
protected

Definition at line 58 of file EntPolynomialBaseCtx.cpp.

58  {
60  switch (bAse) {
62  switch (sPace) {
63  case NOSPACE:
64  case NOFIELD:
65  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
66  case H1:
67  case HCURL:
68  case HDIV:
69  case L2:
71  break;
72  default:
73  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
74  "Not implemented for this space", FieldSpaceNames[sPace]);
75  }
76  break;
78  switch (sPace) {
79  case NOSPACE:
80  case NOFIELD:
81  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
82  case H1:
83  case HCURL:
84  case HDIV:
85  case L2:
87  break;
88  default:
89  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
90  "Not implemented for this space", FieldSpaceNames[sPace]);
91  }
92  break;
94  if(fieldName.empty())
95  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Field name not set");
96  switch (sPace) {
97  case NOSPACE:
98  case NOFIELD:
99  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
100  case H1:
101  break;
102  default:
103  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
104  "Not implemented for this space", FieldSpaceNames[sPace]);
105  }
106  break;
108  switch (sPace) {
109  case NOSPACE:
110  case NOFIELD:
111  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
112  case H1:
113  case HCURL:
114  case HDIV:
115  case L2:
117  break;
118  default:
119  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
120  "Not implemented for this space",
122  }
123  break;
124  case USER_BASE:
125  break;
126  default:
127  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
128  "Not implemented for this base <%s>",
130  }
132 }
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:173
user implemented approximation base
Definition: definitions.h:154
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:501
scalar or vector of scalars describe (no true field)
Definition: definitions.h:170
const FieldApproximationBase bAse
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static const char *const ApproximationBaseNames[]
Definition: definitions.h:158
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:146
static const char *const FieldSpaceNames[]
Definition: definitions.h:178
field with continuous tangents
Definition: definitions.h:172
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:171
field with C-1 continuity
Definition: definitions.h:174

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

◆ copyNodeBase

const FieldApproximationBase MoFEM::EntPolynomialBaseCtx::copyNodeBase

Definition at line 61 of file EntPolynomialBaseCtx.hpp.

◆ dAta

DataForcesAndSourcesCore& MoFEM::EntPolynomialBaseCtx::dAta

◆ fieldName

const std::string MoFEM::EntPolynomialBaseCtx::fieldName

Definition at line 60 of file EntPolynomialBaseCtx.hpp.

◆ sPace

const FieldSpace MoFEM::EntPolynomialBaseCtx::sPace

Definition at line 58 of file EntPolynomialBaseCtx.hpp.


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