v0.15.0
Loading...
Searching...
No Matches
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 (boost::typeindex::type_index type_index, UnknownInterface **iface) const
 
 EntPolynomialBaseCtx (EntitiesFieldData &data, const FieldSpace space, const FieldContinuity continuity, const FieldApproximationBase base, const FieldApproximationBase copy_node_base=LASTBASE)
 
 EntPolynomialBaseCtx (EntitiesFieldData &data, const std::string field_name, const FieldSpace space, const FieldContinuity continuity, const FieldApproximationBase base, const FieldApproximationBase copy_node_base=LASTBASE)
 
- Public Member Functions inherited from MoFEM::BaseFunctionCtx
- Public Member Functions inherited from MoFEM::BaseFunctionUnknownInterface
virtual ~BaseFunctionUnknownInterface ()=default
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (bool error_if_registration_failed=true)
 Register interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface reference to pointer of interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface.
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface.
 
virtual ~UnknownInterface ()=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)
 
EntitiesFieldDatadAta
 
const FieldSpace sPace
 
const FieldContinuity spaceContinuity
 
const FieldApproximationBase bAse
 
const std::string fieldName
 
const FieldApproximationBase copyNodeBase
 

Protected Member Functions

MoFEMErrorCode setBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MoFEM::UnknownInterface
static MoFEMErrorCode getLibVersion (Version &version)
 Get library version.
 
static MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version)
 Get database major version.
 
static MoFEMErrorCode setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD))
 Get database major version.
 
static MoFEMErrorCode getInterfaceVersion (Version &version)
 Get database major version.
 

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

Constructor & Destructor Documentation

◆ EntPolynomialBaseCtx() [1/2]

EntPolynomialBaseCtx::EntPolynomialBaseCtx ( EntitiesFieldData & data,
const FieldSpace space,
const FieldContinuity continuity,
const FieldApproximationBase base,
const FieldApproximationBase copy_node_base = LASTBASE )

Definition at line 17 of file EntPolynomialBaseCtx.cpp.

21 : dAta(data), sPace(space), spaceContinuity(continuity), bAse(base),
22 copyNodeBase(copy_node_base) {
23 ierr = setBase();
24 CHKERRABORT(PETSC_COMM_WORLD, ierr);
25}
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
const FieldApproximationBase copyNodeBase
const FieldContinuity spaceContinuity
const FieldApproximationBase bAse

◆ EntPolynomialBaseCtx() [2/2]

EntPolynomialBaseCtx::EntPolynomialBaseCtx ( EntitiesFieldData & data,
const std::string field_name,
const FieldSpace space,
const FieldContinuity continuity,
const FieldApproximationBase base,
const FieldApproximationBase copy_node_base = LASTBASE )

Definition at line 27 of file EntPolynomialBaseCtx.cpp.

32 : dAta(data), sPace(space), spaceContinuity(continuity), bAse(base),
33 fieldName(field_name), copyNodeBase(copy_node_base) {
34 ierr = setBase();
35 CHKERRABORT(PETSC_COMM_WORLD, ierr);
36}
constexpr auto field_name

Member Function Documentation

◆ query_interface()

MoFEMErrorCode EntPolynomialBaseCtx::query_interface ( boost::typeindex::type_index type_index,
UnknownInterface ** iface ) const
virtual

Reimplemented from MoFEM::BaseFunctionCtx.

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

Definition at line 11 of file EntPolynomialBaseCtx.cpp.

12 {
13 *iface = const_cast<EntPolynomialBaseCtx *>(this);
14 return 0;
15}
Class used to pass element data to calculate base functions on tet,triangle,edge.

◆ setBase()

MoFEMErrorCode EntPolynomialBaseCtx::setBase ( )
protected

Definition at line 38 of file EntPolynomialBaseCtx.cpp.

38 {
40 switch (bAse) {
42 switch (sPace) {
43 case NOSPACE:
44 case NOFIELD:
45 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
46 case H1:
47 case HCURL:
48 case HDIV:
49 case L2:
51 break;
52 default:
53 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
54 "Not implemented for this space <%s>", FieldSpaceNames[sPace]);
55 }
56 break;
58 switch (sPace) {
59 case NOSPACE:
60 case NOFIELD:
61 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
62 case H1:
63 case HCURL:
64 case HDIV:
65 case L2:
67 break;
68 default:
69 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
70 "Not implemented for this space <%s>", FieldSpaceNames[sPace]);
71 }
72 break;
74 if(fieldName.empty())
75 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Field name not set");
76 switch (sPace) {
77 case NOSPACE:
78 case NOFIELD:
79 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
80 case H1:
81 case L2:
82 break;
83 default:
84 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
85 "Not implemented for this space <%s>", FieldSpaceNames[sPace]);
86 }
87 break;
89 switch (sPace) {
90 case NOSPACE:
91 case NOFIELD:
92 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Makes no sense");
93 case H1:
94 case HCURL:
95 case HDIV:
96 case L2:
99 break;
100 default:
101 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
102 "Not implemented for this space <%s>", FieldSpaceNames[sPace]);
103 }
104 break;
105 case USER_BASE:
106 break;
107 default:
108 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
109 "Not implemented for this base <%s>",
111 }
113}
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.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base nme:nme847.
Definition definitions.h:60
@ AINSWORTH_LOBATTO_BASE
Definition definitions.h:62
@ USER_BASE
user implemented approximation base
Definition definitions.h:68
@ DEMKOWICZ_JACOBI_BASE
Definition definitions.h:66
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
Definition definitions.h:64
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ L2
field with C-1 continuity
Definition definitions.h:88
@ NOFIELD
scalar or vector of scalars describe (no true field)
Definition definitions.h:84
@ H1
continuous field
Definition definitions.h:85
@ NOSPACE
Definition definitions.h:83
@ HCURL
field with continuous tangents
Definition definitions.h:86
@ HDIV
field with continuous normal traction
Definition definitions.h:87
static const char *const FieldSpaceNames[]
Definition definitions.h:92
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
static const char *const ApproximationBaseNames[]
Definition definitions.h:72
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
PetscErrorCode Legendre_polynomials(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Calculate Legendre approximation basis.
PetscErrorCode LobattoKernel_polynomials(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Calculate Kernel Lobatto base functions.
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)

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

◆ copyNodeBase

const FieldApproximationBase MoFEM::EntPolynomialBaseCtx::copyNodeBase

Definition at line 41 of file EntPolynomialBaseCtx.hpp.

◆ dAta

EntitiesFieldData& MoFEM::EntPolynomialBaseCtx::dAta

◆ fieldName

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

Definition at line 40 of file EntPolynomialBaseCtx.hpp.

◆ sPace

const FieldSpace MoFEM::EntPolynomialBaseCtx::sPace

◆ spaceContinuity

const FieldContinuity MoFEM::EntPolynomialBaseCtx::spaceContinuity

Definition at line 38 of file EntPolynomialBaseCtx.hpp.


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