37 int nb_gauss_pts = pts.size2();
40 auto &ptr = data.getBBAlphaIndicesSharedPtr(
field_name);
54 auto &ptr = data.getBBDiffNSharedPtr(
field_name);
60 auto get_alpha_by_name_ptr =
62 const std::string &
field_name) -> boost::shared_ptr<MatrixInt> & {
63 return data.getBBAlphaIndicesSharedPtr(
field_name);
66 auto get_base_by_name_ptr =
68 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
72 auto get_diff_base_by_name_ptr =
74 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
78 auto get_alpha_by_order_ptr =
79 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixInt> & {
80 return data.getBBAlphaIndicesByOrderSharedPtr(o);
83 auto get_base_by_order_ptr =
84 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
85 return data.getBBNByOrderSharedPtr(o);
88 auto get_diff_base_by_order_ptr =
89 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
90 return data.getBBDiffNByOrderSharedPtr(o);
94 auto &vert_get_diff_n = get_diff_base(data.
dataOnEntities[MBVERTEX][0]);
95 vert_get_n.resize(nb_gauss_pts, 3,
false);
96 vert_get_diff_n.resize(nb_gauss_pts, 6,
false);
99 (
unsigned int)nb_gauss_pts)
101 "Base functions or nodes has wrong number of integration points "
107 vertex_alpha.resize(3, 3,
false);
108 vertex_alpha.clear();
109 for (
int n = 0;
n != 3; ++
n)
113 1,
lambda.size1(), vertex_alpha.size1(), &vertex_alpha(0, 0),
115 &vert_get_diff_n(0, 0));
116 for (
int n = 0;
n != 3; ++
n) {
117 const int f = boost::math::factorial<double>(
119 for (
int g = 0;
g != nb_gauss_pts; ++
g) {
120 vert_get_n(
g,
n) *= f;
121 for (
int d = 0; d != 2; ++d)
122 vert_get_diff_n(
g, 2 *
n + d) *= f;
130 "Wrong size of ent data");
132 constexpr int edges_nodes[3][2] = {{0, 1}, {1, 2}, {2, 0}};
133 for (
int ee = 0; ee != 3; ++ee) {
136 if (ent_data.getSense() == 0)
138 "Sense of the edge unknown");
140 const int sense = ent_data.getSense();
141 const int order = ent_data.getOrder();
142 const int nb_dofs =
NBEDGE_H1(ent_data.getOrder());
145 if (get_alpha_by_order_ptr(ent_data,
order)) {
147 get_alpha_by_order_ptr(ent_data,
order);
149 get_base_by_order_ptr(ent_data,
order);
150 get_diff_base_by_name_ptr(ent_data,
field_name) =
151 get_diff_base_by_order_ptr(ent_data,
order);
153 auto &get_n = get_base(ent_data);
154 auto &get_diff_n = get_diff_base(ent_data);
155 get_n.resize(nb_gauss_pts, nb_dofs,
false);
156 get_diff_n.resize(nb_gauss_pts, 2 * nb_dofs,
false);
159 edge_alpha.resize(nb_dofs, 3,
false);
163 for (
int i = 0;
i != edge_alpha.size1(); ++
i) {
164 int a = edge_alpha(
i, edges_nodes[ee][0]);
165 edge_alpha(
i, edges_nodes[ee][0]) =
166 edge_alpha(
i, edges_nodes[ee][1]);
167 edge_alpha(
i, edges_nodes[ee][1]) =
a;
171 order,
lambda.size1(), edge_alpha.size1(), &edge_alpha(0, 0),
175 get_alpha_by_order_ptr(ent_data,
order) =
177 get_base_by_order_ptr(ent_data,
order) =
179 get_diff_base_by_order_ptr(ent_data,
order) =
180 get_diff_base_by_name_ptr(ent_data,
field_name);
185 for (
int ee = 0; ee != 3; ++ee) {
187 ent_data.getBBAlphaIndicesSharedPtr(
field_name).reset();
188 auto &get_n = get_base(ent_data);
189 auto &get_diff_n = get_diff_base(ent_data);
190 get_n.resize(nb_gauss_pts, 0,
false);
191 get_diff_n.resize(nb_gauss_pts, 0,
false);
198 "Wrong size ent of ent data");
201 const int order = ent_data.getOrder();
203 if (get_alpha_by_order_ptr(ent_data,
order)) {
205 get_alpha_by_order_ptr(ent_data,
order);
207 get_base_by_order_ptr(ent_data,
order);
208 get_diff_base_by_name_ptr(ent_data,
field_name) =
209 get_diff_base_by_order_ptr(ent_data,
order);
212 auto &get_n = get_base(ent_data);
213 auto &get_diff_n = get_diff_base(ent_data);
214 get_n.resize(nb_gauss_pts, nb_dofs,
false);
215 get_diff_n.resize(nb_gauss_pts, 2 * nb_dofs,
false);
217 auto &tri_alpha = get_alpha(ent_data);
218 tri_alpha.resize(nb_dofs, 3,
false);
222 order,
lambda.size1(), tri_alpha.size1(), &tri_alpha(0, 0),
226 get_alpha_by_order_ptr(ent_data,
order) =
228 get_base_by_order_ptr(ent_data,
order) =
230 get_diff_base_by_order_ptr(ent_data,
order) =
231 get_diff_base_by_name_ptr(ent_data,
field_name);
236 ent_data.getBBAlphaIndicesSharedPtr(
field_name).reset();
237 auto &get_n = get_base(ent_data);
238 auto &get_diff_n = get_diff_base(ent_data);
239 get_n.resize(nb_gauss_pts, 0,
false);
240 get_diff_n.resize(nb_gauss_pts, 0,
false);
254 "Polynomial type not set");
256 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
257 double *diffL,
const int dim) =
260 int nb_gauss_pts = pts.size2();
266 "expected size of data.dataOnEntities[MBEDGE] is 3");
268 int sense[3],
order[3];
269 double *H1edgeN[3], *diffH1edgeN[3];
270 for (
int ee = 0; ee < 3; ee++) {
274 "sense of the edge unknown");
279 data.
dataOnEntities[MBEDGE][ee].getN(base).resize(nb_gauss_pts, nb_dofs,
281 data.
dataOnEntities[MBEDGE][ee].getDiffN(base).resize(nb_gauss_pts,
283 H1edgeN[ee] = &*data.
dataOnEntities[MBEDGE][ee].getN(base).data().begin();
291 H1edgeN, diffH1edgeN, nb_gauss_pts, base_polynomials);
298 "expected that size data.dataOnEntities[MBTRI] is one");
302 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, nb_dofs,
306 const int face_nodes[] = {0, 1, 2};
313 nb_gauss_pts, base_polynomials);
345 "Polynomial type not set");
346 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
347 double *diffL,
const int dim) =
350 int nb_gauss_pts = pts.size2();
365 nb_gauss_pts, base_polynomials);
376 int nb_gauss_pts = pts.size2();
379 auto &ptr = data.getBBAlphaIndicesSharedPtr(
field_name);
393 auto &ptr = data.getBBDiffNSharedPtr(
field_name);
399 auto get_alpha_by_name_ptr =
401 const std::string &
field_name) -> boost::shared_ptr<MatrixInt> & {
402 return data.getBBAlphaIndicesSharedPtr(
field_name);
405 auto get_base_by_name_ptr =
407 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
411 auto get_diff_base_by_name_ptr =
413 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
417 auto get_alpha_by_order_ptr =
418 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixInt> & {
419 return data.getBBAlphaIndicesByOrderSharedPtr(o);
422 auto get_base_by_order_ptr =
423 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
424 return data.getBBNByOrderSharedPtr(o);
427 auto get_diff_base_by_order_ptr =
428 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
429 return data.getBBDiffNByOrderSharedPtr(o);
435 "Wrong size ent of ent data");
438 (
unsigned int)nb_gauss_pts)
440 "Base functions or nodes has wrong number of integration points "
446 const int order = ent_data.getOrder();
449 if (get_alpha_by_order_ptr(ent_data,
order)) {
451 get_alpha_by_order_ptr(ent_data,
order);
453 get_base_by_order_ptr(ent_data,
order);
454 get_diff_base_by_name_ptr(ent_data,
field_name) =
455 get_diff_base_by_order_ptr(ent_data,
order);
458 auto &get_n = get_base(ent_data);
459 auto &get_diff_n = get_diff_base(ent_data);
460 get_n.resize(nb_gauss_pts, nb_dofs,
false);
461 get_diff_n.resize(nb_gauss_pts, 2 * nb_dofs,
false);
468 "Inconsistent number of DOFs");
470 auto &tri_alpha = get_alpha(ent_data);
479 "Inconsistent number of DOFs");
481 auto &tri_alpha = get_alpha(ent_data);
482 tri_alpha.resize(nb_dofs, 3,
false);
489 std::array<int *, 3> face_edge_ptr{
493 face_n.data(), face_edge_ptr.data());
499 order,
lambda.size1(), tri_alpha.size1(), &tri_alpha(0, 0),
504 get_alpha_by_order_ptr(ent_data,
order) =
506 get_base_by_order_ptr(ent_data,
order) =
508 get_diff_base_by_order_ptr(ent_data,
order) =
509 get_diff_base_by_name_ptr(ent_data,
field_name);
514 ent_data.getBBAlphaIndicesSharedPtr(
field_name).reset();
515 auto &get_n = get_base(ent_data);
516 auto &get_diff_n = get_diff_base(ent_data);
517 get_n.resize(nb_gauss_pts, 0,
false);
518 get_diff_n.resize(nb_gauss_pts, 0,
false);
531 "Polynomial type not set");
532 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
533 double *diffL,
const int dim) =
536 int nb_gauss_pts = pts.size2();
544 auto nb_dofs_on_face =
549 if (nb_dofs_on_face) {
553 for (
int ee = 0; ee < 3; ee++) {
554 N_face_edge(0, ee).resize(nb_gauss_pts, 3 * face_edge_dofs,
false);
559 N_face_bubble[0].resize(nb_gauss_pts, 3 * face_bubble_dofs,
false);
562 int face_nodes[3] = {0, 1, 2};
567 &data.
dataOnEntities[MBVERTEX][0].getN(base)(0, 0), NULL, phi_f_e,
568 NULL, nb_gauss_pts, 3, base_polynomials);
569 if (face_bubble_dofs)
573 &data.
dataOnEntities[MBVERTEX][0].getN(base)(0, 0), NULL, phi_f, NULL,
574 nb_gauss_pts, 3, base_polynomials);
583 auto max_face_order =
588 for (
int oo = 0; oo < max_face_order; oo++) {
590 for (
int ee = 0; ee < 3; ee++) {
593 for (
int gg = 0; gg < nb_gauss_pts; gg++) {
603 for (
int gg = 0; gg < nb_gauss_pts; gg++) {
625 "This should be used only with DEMKOWICZ_JACOBI_BASE "
630 int nb_gauss_pts = pts.size2();
633 double *phi_f = &*data.
dataOnEntities[MBTRI][0].getN(base).data().begin();
636 int face_nodes[3] = {0, 1, 2};
640 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin(), phi_f,
641 NULL, nb_gauss_pts, 3);
671 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
672 double *diffL,
const int dim) =
675 int nb_gauss_pts = pts.size2();
682 int sense[3],
order[3];
683 double *hcurl_edge_n[3];
684 double *diff_hcurl_edge_n[3];
685 for (
int ee = 0; ee < 3; ee++) {
688 "data inconsistency");
697 nb_gauss_pts, 2 * 3 * nb_dofs,
false);
700 diff_hcurl_edge_n[ee] =
707 hcurl_edge_n, diff_hcurl_edge_n, nb_gauss_pts, base_polynomials);
709 for (
int ee = 0; ee < 3; ee++) {
710 data.
dataOnEntities[MBEDGE][ee].getN(base).resize(nb_gauss_pts, 0,
false);
711 data.
dataOnEntities[MBEDGE][ee].getDiffN(base).resize(nb_gauss_pts, 0,
727 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
730 3 * 2 * nb_dofs,
false);
732 int face_nodes[] = {0, 1, 2};
739 nb_gauss_pts, base_polynomials);
742 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
743 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
758 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
759 double *diffL,
const int dim) =
762 int nb_gauss_pts = pts.size2();
776 int nb_dofs = 3 * nb_edge_dofs + nb_dofs_face;
777 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
780 3 * 2 * nb_dofs,
false);
787 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
788 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
789 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false)};
791 std::array<double *, 3>
phi{&*edge_bases[0].data().begin(),
792 &*edge_bases[1].data().begin(),
793 &*edge_bases[2].data().begin()};
794 std::array<double *, 3> diff_phi{&*diff_edge_bases[0].data().begin(),
795 &*diff_edge_bases[1].data().begin(),
796 &*diff_edge_bases[2].data().begin()};
799 std::array<int, 3> edge_sense{1, 1, 1};
801 edge_sense.data(), edge_order.data(),
804 phi.data(), diff_phi.data(), nb_gauss_pts, base_polynomials);
806 MatrixDouble face_bases(nb_gauss_pts, 3 * nb_dofs_face,
false);
807 MatrixDouble diff_face_bases(nb_gauss_pts, 3 * 2 * nb_dofs_face,
false);
808 int face_nodes[] = {0, 1, 2};
813 &*face_bases.data().begin(), &*diff_face_bases.data().begin(),
814 nb_gauss_pts, base_polynomials);
828 auto t_vol_diff_base =
839 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
840 for (
int oo = 0; oo <
order; oo++) {
844 for (
int ee = 0; ee != 3; ++ee) {
845 t_base(
i) = t_edge_base[ee](
i);
848 t_diff_base(
i,
j) = t_edge_diff_base[ee](
i,
j);
850 ++t_edge_diff_base[ee];
856 t_base(
i) = t_vol_base(
i);
859 t_diff_base(
i,
j) = t_vol_diff_base(
i,
j);
867 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
868 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
881 int nb_gauss_pts = pts.size2();
888 "wrong number of data structures on edges, should be three but "
892 int sense[3],
order[3];
893 double *hcurl_edge_n[3];
894 double *diff_hcurl_edge_n[3];
896 for (
int ee = 0; ee != 3; ++ee) {
900 "orientation (sense) of edge is not set");
909 nb_gauss_pts, 2 * 3 * nb_dofs,
false);
913 diff_hcurl_edge_n[ee] =
921 hcurl_edge_n, diff_hcurl_edge_n, nb_gauss_pts);
927 for (
int ee = 0; ee != 3; ++ee) {
928 data.
dataOnEntities[MBEDGE][ee].getN(base).resize(nb_gauss_pts, 0,
false);
929 data.
dataOnEntities[MBEDGE][ee].getDiffN(base).resize(nb_gauss_pts, 0,
939 "No data struture to keep base functions on face");
943 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
946 3 * 2 * nb_dofs,
false);
948 int face_nodes[] = {0, 1, 2};
961 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
962 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
975 int nb_gauss_pts = pts.size2();
982 "No data struture to keep base functions on face");
987 int nb_dofs = 3 * nb_edge_dofs + nb_volume_dofs;
988 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
991 3 * 2 * nb_dofs,
false);
998 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
999 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
1000 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false)};
1003 std::array<int, 3> edge_sense{1, 1, 1};
1004 std::array<double *, 3>
phi{&*edge_bases[0].data().begin(),
1005 &*edge_bases[1].data().begin(),
1006 &*edge_bases[2].data().begin()};
1007 std::array<double *, 3> diff_phi{&*diff_edge_bases[0].data().begin(),
1008 &*diff_edge_bases[1].data().begin(),
1009 &*diff_edge_bases[2].data().begin()};
1011 edge_sense.data(), edge_order.data(),
1013 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin(),
1014 phi.data(), diff_phi.data(), nb_gauss_pts);
1016 MatrixDouble face_bases(nb_gauss_pts, 3 * nb_volume_dofs,
false);
1017 MatrixDouble diff_face_bases(nb_gauss_pts, 3 * 2 * nb_volume_dofs,
false);
1018 int face_nodes[] = {0, 1, 2};
1022 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin(),
1023 &*face_bases.data().begin(), &*diff_face_bases.data().begin(),
1037 auto t_vol_diff_base =
1049 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
1050 for (
int oo = 0; oo <
order; oo++) {
1054 for (
int ee = 0; ee != 3; ++ee) {
1055 t_base(
i) = t_edge_base[ee](
i);
1058 t_diff_base(
i,
j) = t_edge_diff_base[ee](
i,
j);
1060 ++t_edge_diff_base[ee];
1066 t_base(
i) = t_vol_base(
i);
1069 t_diff_base(
i,
j) = t_vol_diff_base(
i,
j);
1080 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
1081 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
1124 boost::shared_ptr<BaseFunctionCtx> ctx_ptr) {
1129 int nb_gauss_pts = pts.size2();
1130 if (!nb_gauss_pts) {
1134 if (pts.size1() < 2)
1137 "Wrong dimension of pts, should be at least 3 rows with coordinates");
1144 data.
dataOnEntities[MBVERTEX][0].getN(base).resize(nb_gauss_pts, 3,
1148 &pts(0, 0), &pts(1, 0), nb_gauss_pts);
1149 data.
dataOnEntities[MBVERTEX][0].getDiffN(base).resize(3, 2,
false);
1151 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin());
1159 (
unsigned int)nb_gauss_pts) {
1161 "Base functions or nodes has wrong number of integration points "
1167 auto set_node_derivative_for_all_gauss_pts = [&]() {
1172 data.
dataOnEntities[MBVERTEX][0].getDiffN(base).resize(nb_gauss_pts, 6,
1174 for (
int gg = 0; gg != nb_gauss_pts; ++gg)
1181 CHKERR set_node_derivative_for_all_gauss_pts();
1222 switch (continuity) {
1237 "Unknown (or not implemented) continuity");
1251 auto set_ainsworth = [&dofs_side_map]() {
1254 dofs_side_map.clear();
1262 for (
int ee = 0; ee != 3; ++ee) {
1278 auto set_demkowicz = [&dofs_side_map]() {
1281 dofs_side_map.clear();
1289 for (
int ee = 0; ee != 3; ++ee) {
1305 switch (continuity) {
1320 "Unknown (or not implemented) continuity");
#define FTENSOR_INDEX(DIM, I)
FieldApproximationBase
approximation base
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base nme:nme847.
@ AINSWORTH_BERNSTEIN_BEZIER_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
FieldContinuity
Field continuity.
@ CONTINUOUS
Regular field.
@ DISCONTINUOUS
Broken continuity (No effect on L2 space)
static const char *const FieldSpaceNames[]
#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 ...
#define NBEDGE_DEMKOWICZ_HCURL(P)
#define NBFACETRI_AINSWORTH_HCURL(P)
#define NBFACETRI_L2(P)
Number of base functions on triangle for L2 space.
#define NBEDGE_H1(P)
Number of base function on edge for H1 space.
#define NBFACETRI_DEMKOWICZ_HDIV(P)
PetscErrorCode L2_Ainsworth_ShapeFunctions_MBTRI(int p, double *N, double *diffN, double *L2N, double *diff_L2N, int GDIM, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Get base functions on triangle for L2 space.
#define NBFACETRI_DEMKOWICZ_HCURL(P)
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.
#define NBFACETRI_AINSWORTH_FACE_HDIV(P)
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_AINSWORTH_EDGE_HDIV(P)
#define NBEDGE_AINSWORTH_HCURL(P)
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.
#define NBFACETRI_AINSWORTH_HDIV(P)
FTensor::Index< 'i', SPACE_DIM > i
const double n
refractive index of diffusive medium
FTensor::Index< 'j', 3 > j
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< int > MatrixInt
UBlasMatrix< double > MatrixDouble
implementation of Data Operators for Forces and Sources
MoFEMErrorCode Hcurl_Demkowicz_EdgeBaseFunctions_MBTRI(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 teriangle.
MoFEMErrorCode Hdiv_Demkowicz_Face_MBTET_ON_FACE(int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int gdim, int nb)
MoFEMErrorCode Hcurl_Ainsworth_FaceFunctions_MBTET_ON_FACE(int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Face H-curl functions.
MoFEMErrorCode Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_FACE(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 face.
MoFEMErrorCode Hdiv_Ainsworth_EdgeFaceShapeFunctions_MBTET_ON_FACE(int *faces_nodes, int p, double *N, double *diffN, double *phi_f_e[3], double *diff_phi_f_e[3], int gdim, int nb, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Hdiv base functions, Edge-based face functions by Ainsworth nme:nme847.
FTensor::Tensor2< FTensor::PackPtr< double *, 6 >, 3, 2 > getFTensor2HVecFromPtr< 3, 2 >(double *ptr)
MoFEMErrorCode Hdiv_Ainsworth_FaceBubbleShapeFunctions_ON_FACE(int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int gdim, int nb, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Face bubble functions by Ainsworth nme:nme847.
MoFEMErrorCode Hcurl_Demkowicz_FaceBaseFunctions_MBTRI(int *faces_nodes, int p, double *n, double *diff_n, double *phi, double *diff_phi, int nb_integration_pts)
Face base interior function.
FTensor::Tensor1< FTensor::PackPtr< double *, S >, DIM > getFTensor1FromPtr(double *ptr)
Make Tensor1 from pointer.
constexpr auto field_name
static boost::function< int(int)> broken_nbfacetri_face_hdiv
static boost::function< int(int)> broken_nbfacetri_edge_hdiv
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 > > > > DofsSideMap
Map entity stype and side to element/entity dof index.
static MoFEMErrorCode baseFunctionsTri(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)
static MoFEMErrorCode generateIndicesVertexTri(const int N, int *alpha)
static MoFEMErrorCode generateIndicesTriTri(const int N, int *alpha)
static MoFEMErrorCode generateIndicesEdgeTri(const int N[], int *alpha[])
Class used to pass element data to calculate base functions on tet,triangle,edge.
const FieldApproximationBase copyNodeBase
const std::string fieldName
PetscErrorCode(* basePolynomialsType0)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
const FieldContinuity spaceContinuity
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
static constexpr int maxBrokenDofsOrder
max number of broken dofs
Calculate base functions on triangle.
MoFEMErrorCode getValueH1BernsteinBezierBase(MatrixDouble &pts)
MoFEMErrorCode getValueL2BernsteinBezierBase(MatrixDouble &pts)
MoFEMErrorCode getValueH1(MatrixDouble &pts)
MoFEMErrorCode getValueH1AinsworthBase(MatrixDouble &pts)
MoFEMErrorCode getValueL2(MatrixDouble &pts)
MoFEMErrorCode getValue(MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
ublas::matrix< MatrixDouble > N_face_edge
MoFEMErrorCode getValueHdivAinsworthBase(MatrixDouble &pts)
MoFEMErrorCode getValueHdivDemkowiczBase(MatrixDouble &pts)
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
ublas::vector< MatrixDouble > N_face_bubble
MoFEMErrorCode getValueHcurlDemkowiczBase(MatrixDouble &pts)
MoFEMErrorCode getValueHcurl(MatrixDouble &pts)
static MoFEMErrorCode setDofsSideMapHcurl(const FieldSpace space, const FieldContinuity continuity, const FieldApproximationBase base, DofsSideMap &dofs_side_map)
static MoFEMErrorCode setDofsSideMap(const FieldSpace space, const FieldContinuity continuity, const FieldApproximationBase base, DofsSideMap &)
Set map of dof to side number.
EntPolynomialBaseCtx * cTx
MoFEMErrorCode getValueHcurlAinsworthBase(MatrixDouble &pts)
MoFEMErrorCode getValueHcurlAinsworthBrokenBase(MatrixDouble &pts)
MoFEMErrorCode getValueHdiv(MatrixDouble &pts)
MoFEMErrorCode getValueL2AinsworthBase(MatrixDouble &pts)
MoFEMErrorCode getValueHcurlDemkowiczBrokenBase(MatrixDouble &pts)
base class for all interface classes
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.