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);
 
 
FieldApproximationBase
approximation base
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FieldSpace
approximation spaces
@ L2
field with C-1 continuity
@ HCURL
field with continuous tangents
@ HDIV
field with continuous normal traction
@ CONTINUOUS
Regular field.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
static const char *const ApproximationBaseNames[]
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
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.
#define NBEDGE_H1(P)
Number of base function on edge for H1 space.
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.
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))
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Class used to pass element data to calculate base functions on tet,triangle,edge.
const FieldApproximationBase copyNodeBase
PetscErrorCode(* basePolynomialsType0)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
const FieldApproximationBase bAse
data structure for finite element entity
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
Class used to pass element data to calculate base functions on flat prism.
~FlatPrismPolynomialBaseCtx()
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
const NumeredEntFiniteElement * fePtr
FlatPrismPolynomialBaseCtx(EntitiesFieldData &data, moab::Interface &moab, const NumeredEntFiniteElement *fe_ptr, const FieldSpace space, const FieldApproximationBase base, const FieldApproximationBase copy_node_base=LASTBASE)
Calculate base functions on tetrahedralFIXME: Need moab and mofem finite element structure to work (t...
MoFEMErrorCode getValueHcurl(MatrixDouble &pts)
FlatPrismPolynomialBaseCtx * cTx
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
MoFEMErrorCode getValueHdiv(MatrixDouble &pts)
~FlatPrismPolynomialBase()
FlatPrismPolynomialBase()
MoFEMErrorCode getValueH1(MatrixDouble &pts)
const EntityHandle * connPrism
MoFEMErrorCode getValueL2(MatrixDouble &pts)
const EntityHandle * connFace3
MoFEMErrorCode getValue(MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
const EntityHandle * connFace4
Partitioned (Indexed) Finite Element in Problem.
base class for all interface classes
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
SideNumber_multiIndex & getSideNumberTable() const
EntityHandle getEnt() const