|
| v0.14.0
|
Go to the documentation of this file.
21 mOab(moab), fePtr(fe_ptr) {
23 CHKERRABORT(PETSC_COMM_WORLD,
ierr);
38 boost::shared_ptr<BaseFunctionCtx> ctx_ptr) {
45 "Pointer to element should be given "
46 "when EntPolynomialBaseCtx is constructed "
47 "(use different constructor)");
49 int nb_gauss_pts = pts.size2();
56 "Wrong dimension of pts, should be at least 3 rows with coordinates");
67 data.
dataOnEntities[MBVERTEX][0].getN(base).resize(nb_gauss_pts, 6,
false);
68 data.
dataOnEntities[MBVERTEX][0].getDiffN(base).resize(nb_gauss_pts, 12,
71 (
unsigned int)nb_gauss_pts) {
73 "Base functions or nodes has wrong number of integration points "
78 data.
dataOnEntities[MBVERTEX][0].getN(base).resize(nb_gauss_pts, 6,
false);
79 data.
dataOnEntities[MBVERTEX][0].getDiffN(base).resize(nb_gauss_pts, 12,
81 N.resize(nb_gauss_pts, 3,
false);
82 diffN.resize(3, 2,
false);
85 &*
diffN.data().begin());
92 SideNumber_multiIndex::nth_index<1>::type::iterator siit3 =
93 side_table.get<1>().find(boost::make_tuple(MBTRI, 3));
94 SideNumber_multiIndex::nth_index<1>::type::iterator siit4 =
95 side_table.get<1>().find(boost::make_tuple(MBTRI, 4));
96 if (siit3 == side_table.get<1>().end())
98 if (siit4 == side_table.get<1>().end())
105 for (
int nn = 0; nn < 3; nn++) {
110 for (
int gg = 0; gg < nb_gauss_pts; gg++) {
111 double val =
N(gg, nn);
112 double val_x =
diffN(nn, 0);
113 double val_y =
diffN(nn, 1);
115 data.
dataOnEntities[MBVERTEX][0].getDiffN(base)(gg, 2 * nn + 0) = val_x;
116 data.
dataOnEntities[MBVERTEX][0].getDiffN(base)(gg, 2 * nn + 1) = val_y;
118 data.
dataOnEntities[MBVERTEX][0].getDiffN(base)(gg, 6 + 2 * nn + 0) =
120 data.
dataOnEntities[MBVERTEX][0].getDiffN(base)(gg, 6 + 2 * nn + 1) =
150 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
151 double *diffL,
const int dim) =
154 int nb_gauss_pts = pts.size2();
160 int sense[9],
order[9];
161 double *H1edgeN[9], *diffH1edgeN[9];
163 auto set_edge_base_data = [&](
const int ee) {
166 if (ent_data.getSense() == 0)
168 sense[ee] = ent_data.getSense();
169 order[ee] = ent_data.getOrder();
170 int nb_dofs =
NBEDGE_H1(ent_data.getOrder());
171 ent_data.getN(base).resize(nb_gauss_pts, nb_dofs,
false);
172 ent_data.getDiffN(base).resize(nb_gauss_pts, 2 * nb_dofs,
false);
173 H1edgeN[ee] = &*ent_data.getN(base).data().begin();
174 diffH1edgeN[ee] = &*ent_data.getDiffN(base).data().begin();
180 for (
int ee = 0; ee != 3; ++ee)
181 CHKERR set_edge_base_data(ee);
182 for (
int ee = 6; ee != 9; ++ee)
183 CHKERR set_edge_base_data(ee);
187 &sense[0], &
order[0], &*
N.data().begin(), &*
diffN.data().begin(),
188 &H1edgeN[0], &diffH1edgeN[0], nb_gauss_pts, base_polynomials);
191 &sense[6], &
order[6], &*
N.data().begin(), &*
diffN.data().begin(),
192 &H1edgeN[6], &diffH1edgeN[6], nb_gauss_pts, base_polynomials);
200 for (
int ff = 3; ff <= 4; ff++) {
202 data.
dataOnEntities[MBTRI][ff].getN(base).resize(nb_gauss_pts, nb_dofs,
204 data.
dataOnEntities[MBTRI][ff].getDiffN(base).resize(nb_gauss_pts,
208 &*
N.data().begin(), &*
diffN.data().begin(),
211 nb_gauss_pts, base_polynomials);
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
MoFEMErrorCode getValueHdiv(MatrixDouble &pts)
#define NBEDGE_H1(P)
Number of base function on edge for H1 space.
const EntityHandle * connFace3
MoFEMErrorCode getValue(MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
~FlatPrismPolynomialBase()
Class used to pass element data to calculate base functions on tet,triangle,edge.
MoFEMErrorCode getValueL2(MatrixDouble &pts)
PetscErrorCode H1_EdgeShapeFunctions_MBTRI(int *sense, int *p, double *N, double *diffN, double *edgeN[3], double *diff_edgeN[3], int GDIM, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
H1_EdgeShapeFunctions_MBTRI.
SideNumber_multiIndex & getSideNumberTable() const
const static char *const ApproximationBaseNames[]
@ L2
field with C-1 continuity
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
EntityHandle getEnt() const
Get the entity handle.
FlatPrismPolynomialBaseCtx * cTx
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
FlatPrismPolynomialBase()
DeprecatedCoreInterface Interface
FieldSpace
approximation spaces
const FieldApproximationBase copyNodeBase
#define CHKERR
Inline error check.
FlatPrismPolynomialBaseCtx(EntitiesFieldData &data, moab::Interface &moab, const NumeredEntFiniteElement *fe_ptr, const FieldSpace space, const FieldApproximationBase base, const FieldApproximationBase copy_node_base=LASTBASE)
const NumeredEntFiniteElement * fePtr
implementation of Data Operators for Forces and Sources
PetscErrorCode H1_FaceShapeFunctions_MBTRI(const int *face_nodes, int p, double *N, double *diffN, double *faceN, double *diff_faceN, int GDIM, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< ordered_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, signed char, &SideNumber::side_number > > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.
Calculate base functions on tetrahedral.
const EntityHandle * connFace4
const FieldApproximationBase bAse
base class for all interface classes
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
const EntityHandle * connPrism
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
@ HCURL
field with continuous tangents
@ MOFEM_DATA_INCONSISTENCY
Class used to pass element data to calculate base functions on flat prism.
FieldApproximationBase
approximation base
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
Partitioned (Indexed) Finite Element in Problem.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
~FlatPrismPolynomialBaseCtx()
data structure for finite element entity
@ CONTINUOUS
Regular field.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ HDIV
field with continuous normal traction
MoFEMErrorCode getValueHcurl(MatrixDouble &pts)
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
PetscErrorCode(* basePolynomialsType0)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
MoFEMErrorCode getValueH1(MatrixDouble &pts)