|
| v0.14.0
|
Calculate base functions on tetrahedral.
More...
#include <src/approximation/EdgePolynomialBase.hpp>
Calculate base functions on tetrahedral.
Definition at line 19 of file EdgePolynomialBase.hpp.
◆ EdgePolynomialBase()
MoFEM::EdgePolynomialBase::EdgePolynomialBase |
( |
| ) |
|
|
default |
◆ ~EdgePolynomialBase()
virtual MoFEM::EdgePolynomialBase::~EdgePolynomialBase |
( |
| ) |
|
|
virtualdefault |
◆ getValue()
Reimplemented from MoFEM::BaseFunction.
Definition at line 17 of file EdgePolynomialBase.cpp.
23 int nb_gauss_pts = pts.size2();
30 "Wrong dimension of pts, should be at least 3 rows with coordinates");
37 data.
dataOnEntities[MBVERTEX][0].getN(base).resize(nb_gauss_pts, 2,
41 &pts(0, 0), nb_gauss_pts);
47 (
unsigned int)nb_gauss_pts)
49 "Base functions or nodes has wrong number of integration points "
53 data.
dataOnEntities[MBVERTEX][0].getDiffN(base).resize(nb_gauss_pts, 2 * 1,
55 for (
auto gg = 0; gg != nb_gauss_pts; ++gg)
◆ getValueH1()
◆ getValueH1AinsworthBase()
Definition at line 198 of file EdgePolynomialBase.cpp.
203 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
204 double *
diffL,
const int dim) =
207 int nb_gauss_pts = pts.size2();
209 const int side_number = 0;
226 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
228 double s = 2 * pts(0, gg) - 1;
236 &*
L.data().begin(), &*
diffL.data().begin(), 1);
238 for (
unsigned int pp = 0;
◆ getValueH1BernsteinBezierBase()
Definition at line 103 of file EdgePolynomialBase.cpp.
108 const int nb_gauss_pts = pts.size2();
111 auto &ptr = data.getBBAlphaIndicesSharedPtr(
field_name);
125 auto &ptr = data.getBBDiffNSharedPtr(
field_name);
132 auto &get_diff_n = get_diff_base(data.
dataOnEntities[MBVERTEX][0]);
133 get_n.resize(nb_gauss_pts, 2,
false);
134 get_diff_n.resize(nb_gauss_pts, 2,
false);
139 (
unsigned int)nb_gauss_pts)
141 "Base functions or nodes has wrong number of integration points "
147 vertex_alpha.resize(2, 2,
false);
148 vertex_alpha(0, 0) = data.
dataOnEntities[MBVERTEX][0].getBBNodeOrder()[0];
149 vertex_alpha(0, 1) = 0;
150 vertex_alpha(1, 0) = 0;
151 vertex_alpha(1, 1) = data.
dataOnEntities[MBVERTEX][0].getBBNodeOrder()[1];
154 1, nb_gauss_pts, vertex_alpha.size1(), &vertex_alpha(0, 0), &
lambda(0, 0),
156 std::array<double, 2>
f = {
157 boost::math::factorial<double>(
159 boost::math::factorial<double>(
162 for (
int g = 0;
g != nb_gauss_pts; ++
g)
163 for (
int n = 0;
n != 2; ++
n) {
165 get_diff_n(
g,
n) *=
f[
n];
171 "Wrong size ent of ent data");
178 get_n.resize(nb_gauss_pts, nb_dofs,
false);
179 get_diff_n.resize(nb_gauss_pts, nb_dofs,
false);
183 edge_alpha.resize(nb_dofs, 2);
186 order, nb_gauss_pts, edge_alpha.size1(), &edge_alpha(0, 0),
191 get_n.resize(nb_gauss_pts, 0,
false);
192 get_diff_n.resize(nb_gauss_pts, 0,
false);
◆ getValueH1DemkowiczBase()
Definition at line 262 of file EdgePolynomialBase.cpp.
268 int nb_gauss_pts = pts.size2();
270 const int side_number = 0;
281 double diff_shape[] = {-1, 1};
285 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
286 const double mu0 = 1.0 - pts(0, gg);
287 const double mu1 = pts(0, gg);
293 order, &*shape.data().begin(), diff_shape,
294 &*data.
dataOnEntities[MBEDGE][side_number].getN(base).data().begin(),
◆ getValueHcurl()
◆ getValueHcurlAinsworthBase()
Definition at line 366 of file EdgePolynomialBase.cpp.
372 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
373 double *
diffL,
const int dim) =
376 int nb_gauss_pts = pts.size2();
386 data.
dataOnEntities[MBEDGE][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
388 data.
dataOnEntities[MBEDGE][0].getDiffN(base).resize(nb_gauss_pts, 0,
394 &*data.
dataOnEntities[MBEDGE][0].getN(base).data().begin(),
nullptr,
395 nb_gauss_pts, base_polynomials);
398 data.
dataOnEntities[MBEDGE][0].getN(base).resize(nb_gauss_pts, 0,
false);
399 data.
dataOnEntities[MBEDGE][0].getDiffN(base).resize(nb_gauss_pts, 0,
◆ getValueHcurlDemkowiczBase()
Definition at line 407 of file EdgePolynomialBase.cpp.
413 int nb_gauss_pts = pts.size2();
418 "No data structure to store base functions");
426 data.
dataOnEntities[MBEDGE][0].getDiffN(base).resize(nb_gauss_pts, 0,
437 data.
dataOnEntities[MBEDGE][0].getN(base).resize(nb_gauss_pts, 0,
false);
438 data.
dataOnEntities[MBEDGE][0].getDiffN(base).resize(nb_gauss_pts, 0,
◆ getValueHdiv()
◆ getValueL2()
◆ getValueL2DemkowiczBase()
Definition at line 319 of file EdgePolynomialBase.cpp.
325 int nb_gauss_pts = pts.size2();
327 const int side_number = 0;
337 double diff_n[] = {-1, 1};
340 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
341 const double mu0 = 1.0 - pts(0, gg);
342 const double mu1 = pts(0, gg);
348 order, &*shape.data().begin(), diff_n,
349 &*data.
dataOnEntities[MBEDGE][side_number].getN(base).data().begin(),
◆ query_interface()
◆ cTx
◆ diffL
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 refernce to pointer of interface.
MoFEMErrorCode Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_EDGE(int sense, int p, double *N, double *diffN, double *edgeN, double *diff_edgeN, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Edge based H-curl base functions on edge.
#define NBEDGE_H1(P)
Numer of base function on edge for H1 space.
Class used to pass element data to calculate base functions on tet,triangle,edge.
MoFEMErrorCode getValueL2(MatrixDouble &pts)
MoFEMErrorCode getValueH1AinsworthBase(MatrixDouble &pts)
const static char *const ApproximationBaseNames[]
@ L2
field with C-1 continuity
UBlasMatrix< double > MatrixDouble
MoFEMErrorCode Hcurl_Demkowicz_EdgeBaseFunctions_MBEDGE(int sense, int p, double *n, double *diff_n, double *phi, double *diff_phi, int nb_integration_pts)
Edge based H-curl base functions on edge.
MoFEMErrorCode L2_ShapeFunctions_ONSEGMENT(int p, double *N, double *diffN, double *funN, double *funDiffN, int nb_integration_pts)
MoFEMErrorCode getValueH1(MatrixDouble &pts)
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
const FieldApproximationBase copyNodeBase
#define CHKERR
Inline error check.
static MoFEMErrorCode baseFunctionsEdge(const int N, const int gdim, const int n_alpha, const int *alpha, const double *lambda, const double *grad_lambda, double *base, double *grad_base)
MoFEMErrorCode getValueH1DemkowiczBase(MatrixDouble &pts)
#define NBEDGE_L2(P)
Number of base functions on edge fro L2 space.
UBlasMatrix< int > MatrixInt
MoFEMErrorCode getValueH1BernsteinBezierBase(MatrixDouble &pts)
MoFEMErrorCode getValueL2DemkowiczBase(MatrixDouble &pts)
#define NBEDGE_DEMKOWICZ_HCURL(P)
const FieldApproximationBase bAse
constexpr auto field_name
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
EntPolynomialBaseCtx * cTx
const double v
phase velocity of light in medium (cm/ns)
Calculate base functions on tetrahedral.
#define NBEDGE_AINSWORTH_HCURL(P)
MoFEMErrorCode getValueHcurl(MatrixDouble &pts)
MoFEMErrorCode getValueHdiv(MatrixDouble &pts)
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
@ HCURL
field with continuous tangents
@ MOFEM_DATA_INCONSISTENCY
const std::string fieldName
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
MoFEMErrorCode getValueHcurlAinsworthBase(MatrixDouble &pts)
MoFEMErrorCode getValueHcurlDemkowiczBase(MatrixDouble &pts)
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ HDIV
field with continuous normal traction
static MoFEMErrorCode generateIndicesEdgeEdge(const int N, int *alpha)
MoFEMErrorCode H1_BubbleShapeFunctions_ONSEGMENT(int p, double *N, double *diffN, double *bubbleN, double *diff_bubbleN, int nb_integration_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)