|
| v0.14.0
|
Calculate base functions on tetrahedral.
More...
#include <src/approximation/FlatPrismPolynomialBase.hpp>
|
using | DofsSideMap = multi_index_container< DofsSideMapData, indexed_by< ordered_non_unique< tag< TypeSide_mi_tag >, composite_key< DofsSideMapData, member< DofsSideMapData, EntityType, &DofsSideMapData::type >, member< DofsSideMapData, int, &DofsSideMapData::side > >>, ordered_unique< tag< EntDofIdx_mi_tag >, member< DofsSideMapData, int, &DofsSideMapData::dof > > > > |
| Map entity stype and side to element/entity dof index. More...
|
|
static MoFEMErrorCode | getLibVersion (Version &version) |
| Get library version. More...
|
|
static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
| Get database major version. More...
|
|
static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
| Get database major version. More...
|
|
static MoFEMErrorCode | getInterfaceVersion (Version &version) |
| Get database major version. More...
|
|
Calculate base functions on tetrahedral.
FIXME: Need moab and mofem finite element structure to work (that not perfect)
Definition at line 44 of file FlatPrismPolynomialBase.hpp.
◆ FlatPrismPolynomialBase()
FlatPrismPolynomialBase::FlatPrismPolynomialBase |
( |
| ) |
|
◆ ~FlatPrismPolynomialBase()
FlatPrismPolynomialBase::~FlatPrismPolynomialBase |
( |
| ) |
|
◆ getValue()
Reimplemented from MoFEM::BaseFunction.
Definition at line 37 of file FlatPrismPolynomialBase.cpp.
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) =
◆ getValueH1()
Definition at line 145 of file FlatPrismPolynomialBase.cpp.
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);
◆ getValueHcurl()
◆ getValueHdiv()
◆ getValueL2()
◆ query_interface()
◆ connFace3
const EntityHandle* MoFEM::FlatPrismPolynomialBase::connFace3 |
|
private |
◆ connFace4
const EntityHandle* MoFEM::FlatPrismPolynomialBase::connFace4 |
|
private |
◆ connPrism
const EntityHandle* MoFEM::FlatPrismPolynomialBase::connPrism |
|
private |
◆ cTx
◆ diffN
◆ faceNodes
int MoFEM::FlatPrismPolynomialBase::faceNodes[2][3] |
|
private |
◆ numNodes
int MoFEM::FlatPrismPolynomialBase::numNodes |
|
private |
The documentation for this struct was generated from the following files:
#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 getValueHdiv(MatrixDouble &pts)
#define NBEDGE_H1(P)
Number of base function on edge for H1 space.
const EntityHandle * connFace3
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
EntityHandle getEnt() const
Get the entity handle.
FlatPrismPolynomialBaseCtx * cTx
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
const FieldApproximationBase copyNodeBase
#define CHKERR
Inline error check.
const NumeredEntFiniteElement * fePtr
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
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.
const EntityHandle * connPrism
@ 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
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
data structure for finite element entity
#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)