|
| v0.14.0
|
Calculate base functions on triangle.
More...
#include <src/approximation/TriPolynomialBase.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...
|
|
Calculate base functions on triangle.
Definition at line 16 of file TriPolynomialBase.hpp.
◆ TriPolynomialBase()
MoFEM::TriPolynomialBase::TriPolynomialBase |
( |
| ) |
|
|
default |
◆ ~TriPolynomialBase()
virtual MoFEM::TriPolynomialBase::~TriPolynomialBase |
( |
| ) |
|
|
virtualdefault |
◆ getValue()
Reimplemented from MoFEM::BaseFunction.
Definition at line 1130 of file TriPolynomialBase.cpp.
1136 int nb_gauss_pts = pts.size2();
1137 if (!nb_gauss_pts) {
1141 if (pts.size1() < 2)
1144 "Wrong dimension of pts, should be at least 3 rows with coordinates");
1151 data.
dataOnEntities[MBVERTEX][0].getN(base).resize(nb_gauss_pts, 3,
1155 &pts(0, 0), &pts(1, 0), nb_gauss_pts);
1156 data.
dataOnEntities[MBVERTEX][0].getDiffN(base).resize(3, 2,
false);
1158 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin());
1166 (
unsigned int)nb_gauss_pts) {
1168 "Base functions or nodes has wrong number of integration points "
1173 auto set_node_derivative_for_all_gauss_pts = [&]() {
1178 data.
dataOnEntities[MBVERTEX][0].getDiffN(base).resize(nb_gauss_pts, 6,
1180 for (
int gg = 0; gg != nb_gauss_pts; ++gg)
1187 CHKERR set_node_derivative_for_all_gauss_pts();
◆ getValueH1()
◆ getValueH1AinsworthBase()
Definition at line 248 of file TriPolynomialBase.cpp.
256 "Polynomial type not set");
258 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
259 double *diffL,
const int dim) =
262 int nb_gauss_pts = pts.size2();
268 "expected size of data.dataOnEntities[MBEDGE] is 3");
270 int sense[3],
order[3];
271 double *H1edgeN[3], *diffH1edgeN[3];
272 for (
int ee = 0; ee < 3; ee++) {
276 "sense of the edge unknown");
281 data.
dataOnEntities[MBEDGE][ee].getN(base).resize(nb_gauss_pts, nb_dofs,
283 data.
dataOnEntities[MBEDGE][ee].getDiffN(base).resize(nb_gauss_pts,
285 H1edgeN[ee] = &*data.
dataOnEntities[MBEDGE][ee].getN(base).data().begin();
293 H1edgeN, diffH1edgeN, nb_gauss_pts, base_polynomials);
300 "expected that size data.dataOnEntities[MBTRI] is one");
304 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, nb_dofs,
308 const int face_nodes[] = {0, 1, 2};
315 nb_gauss_pts, base_polynomials);
◆ getValueH1BernsteinBezierBase()
Definition at line 35 of file TriPolynomialBase.cpp.
39 int nb_gauss_pts = pts.size2();
42 auto &ptr = data.getBBAlphaIndicesSharedPtr(
field_name);
56 auto &ptr = data.getBBDiffNSharedPtr(
field_name);
62 auto get_alpha_by_name_ptr =
64 const std::string &
field_name) -> boost::shared_ptr<MatrixInt> & {
65 return data.getBBAlphaIndicesSharedPtr(
field_name);
68 auto get_base_by_name_ptr =
70 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
74 auto get_diff_base_by_name_ptr =
76 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
80 auto get_alpha_by_order_ptr =
81 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixInt> & {
82 return data.getBBAlphaIndicesByOrderSharedPtr(o);
85 auto get_base_by_order_ptr =
86 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
87 return data.getBBNByOrderSharedPtr(o);
90 auto get_diff_base_by_order_ptr =
91 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
92 return data.getBBDiffNByOrderSharedPtr(o);
96 auto &vert_get_diff_n = get_diff_base(data.
dataOnEntities[MBVERTEX][0]);
97 vert_get_n.resize(nb_gauss_pts, 3,
false);
98 vert_get_diff_n.resize(nb_gauss_pts, 6,
false);
101 (
unsigned int)nb_gauss_pts)
103 "Base functions or nodes has wrong number of integration points "
109 vertex_alpha.resize(3, 3,
false);
110 vertex_alpha.clear();
111 for (
int n = 0;
n != 3; ++
n)
115 1,
lambda.size1(), vertex_alpha.size1(), &vertex_alpha(0, 0),
117 &vert_get_diff_n(0, 0));
118 for (
int n = 0;
n != 3; ++
n) {
119 const int f = boost::math::factorial<double>(
121 for (
int g = 0;
g != nb_gauss_pts; ++
g) {
122 vert_get_n(
g,
n) *=
f;
123 for (
int d = 0;
d != 2; ++
d)
124 vert_get_diff_n(
g, 2 *
n +
d) *=
f;
132 "Wrong size of ent data");
134 constexpr
int edges_nodes[3][2] = {{0, 1}, {1, 2}, {2, 0}};
135 for (
int ee = 0; ee != 3; ++ee) {
138 if (ent_data.getSense() == 0)
140 "Sense of the edge unknown");
142 const int sense = ent_data.getSense();
143 const int order = ent_data.getOrder();
144 const int nb_dofs =
NBEDGE_H1(ent_data.getOrder());
147 if (get_alpha_by_order_ptr(ent_data,
order)) {
149 get_alpha_by_order_ptr(ent_data,
order);
151 get_base_by_order_ptr(ent_data,
order);
152 get_diff_base_by_name_ptr(ent_data,
field_name) =
153 get_diff_base_by_order_ptr(ent_data,
order);
155 auto &get_n = get_base(ent_data);
156 auto &get_diff_n = get_diff_base(ent_data);
157 get_n.resize(nb_gauss_pts, nb_dofs,
false);
158 get_diff_n.resize(nb_gauss_pts, 2 * nb_dofs,
false);
161 edge_alpha.resize(nb_dofs, 3,
false);
165 for (
int i = 0;
i != edge_alpha.size1(); ++
i) {
166 int a = edge_alpha(
i, edges_nodes[ee][0]);
167 edge_alpha(
i, edges_nodes[ee][0]) =
168 edge_alpha(
i, edges_nodes[ee][1]);
169 edge_alpha(
i, edges_nodes[ee][1]) =
a;
173 order,
lambda.size1(), edge_alpha.size1(), &edge_alpha(0, 0),
177 get_alpha_by_order_ptr(ent_data,
order) =
179 get_base_by_order_ptr(ent_data,
order) =
181 get_diff_base_by_order_ptr(ent_data,
order) =
182 get_diff_base_by_name_ptr(ent_data,
field_name);
187 for (
int ee = 0; ee != 3; ++ee) {
189 ent_data.getBBAlphaIndicesSharedPtr(
field_name).reset();
190 auto &get_n = get_base(ent_data);
191 auto &get_diff_n = get_diff_base(ent_data);
192 get_n.resize(nb_gauss_pts, 0,
false);
193 get_diff_n.resize(nb_gauss_pts, 0,
false);
200 "Wrong size ent of ent data");
203 const int order = ent_data.getOrder();
205 if (get_alpha_by_order_ptr(ent_data,
order)) {
207 get_alpha_by_order_ptr(ent_data,
order);
209 get_base_by_order_ptr(ent_data,
order);
210 get_diff_base_by_name_ptr(ent_data,
field_name) =
211 get_diff_base_by_order_ptr(ent_data,
order);
214 auto &get_n = get_base(ent_data);
215 auto &get_diff_n = get_diff_base(ent_data);
216 get_n.resize(nb_gauss_pts, nb_dofs,
false);
217 get_diff_n.resize(nb_gauss_pts, 2 * nb_dofs,
false);
219 auto &tri_alpha = get_alpha(ent_data);
220 tri_alpha.resize(nb_dofs, 3,
false);
224 order,
lambda.size1(), tri_alpha.size1(), &tri_alpha(0, 0),
228 get_alpha_by_order_ptr(ent_data,
order) =
230 get_base_by_order_ptr(ent_data,
order) =
232 get_diff_base_by_order_ptr(ent_data,
order) =
233 get_diff_base_by_name_ptr(ent_data,
field_name);
238 ent_data.getBBAlphaIndicesSharedPtr(
field_name).reset();
239 auto &get_n = get_base(ent_data);
240 auto &get_diff_n = get_diff_base(ent_data);
241 get_n.resize(nb_gauss_pts, 0,
false);
242 get_diff_n.resize(nb_gauss_pts, 0,
false);
◆ getValueHcurl()
◆ getValueHcurlAinsworthBase()
Definition at line 667 of file TriPolynomialBase.cpp.
675 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
676 double *diffL,
const int dim) =
679 int nb_gauss_pts = pts.size2();
686 int sense[3],
order[3];
687 double *hcurl_edge_n[3];
688 double *diff_hcurl_edge_n[3];
689 for (
int ee = 0; ee < 3; ee++) {
692 "data inconsistency");
701 nb_gauss_pts, 2 * 3 * nb_dofs,
false);
704 diff_hcurl_edge_n[ee] =
711 hcurl_edge_n, diff_hcurl_edge_n, nb_gauss_pts, base_polynomials);
713 for (
int ee = 0; ee < 3; ee++) {
714 data.
dataOnEntities[MBEDGE][ee].getN(base).resize(nb_gauss_pts, 0,
false);
715 data.
dataOnEntities[MBEDGE][ee].getDiffN(base).resize(nb_gauss_pts, 0,
731 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
734 3 * 2 * nb_dofs,
false);
736 int face_nodes[] = {0, 1, 2};
743 nb_gauss_pts, base_polynomials);
746 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
747 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
◆ getValueHcurlAinsworthBrokenBase()
Definition at line 754 of file TriPolynomialBase.cpp.
762 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
763 double *diffL,
const int dim) =
766 int nb_gauss_pts = pts.size2();
780 int nb_dofs = 3 * nb_edge_dofs + nb_dofs_face;
781 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
784 3 * 2 * nb_dofs,
false);
791 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
792 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
793 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false)};
795 std::array<double *, 3>
phi{&*edge_bases[0].data().begin(),
796 &*edge_bases[1].data().begin(),
797 &*edge_bases[2].data().begin()};
798 std::array<double *, 3> diff_phi{&*diff_edge_bases[0].data().begin(),
799 &*diff_edge_bases[1].data().begin(),
800 &*diff_edge_bases[2].data().begin()};
803 std::array<int, 3> edge_sense{1, 1, 1};
805 edge_sense.data(), edge_order.data(),
808 phi.data(), diff_phi.data(), nb_gauss_pts, base_polynomials);
810 MatrixDouble face_bases(nb_gauss_pts, 3 * nb_dofs_face,
false);
811 MatrixDouble diff_face_bases(nb_gauss_pts, 3 * 2 * nb_dofs_face,
false);
812 int face_nodes[] = {0, 1, 2};
817 &*face_bases.data().begin(), &*diff_face_bases.data().begin(),
818 nb_gauss_pts, base_polynomials);
822 getFTensor1FromPtr<3>(&*edge_bases[0].data().begin()),
823 getFTensor1FromPtr<3>(&*edge_bases[1].data().begin()),
824 getFTensor1FromPtr<3>(&*edge_bases[2].data().begin())};
831 auto t_vol_base = getFTensor1FromPtr<3>(&*face_bases.data().begin());
832 auto t_vol_diff_base =
835 auto t_base = getFTensor1FromPtr<3>(
843 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
844 for (
int oo = 0; oo <
order; oo++) {
848 for (
int ee = 0; ee != 3; ++ee) {
849 t_base(
i) = t_edge_base[ee](
i);
852 t_diff_base(
i,
j) = t_edge_diff_base[ee](
i,
j);
854 ++t_edge_diff_base[ee];
860 t_base(
i) = t_vol_base(
i);
863 t_diff_base(
i,
j) = t_vol_diff_base(
i,
j);
871 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
872 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
◆ getValueHcurlDemkowiczBase()
Definition at line 879 of file TriPolynomialBase.cpp.
885 int nb_gauss_pts = pts.size2();
893 "wrong number of data structures on edges, should be three but is %d",
896 int sense[3],
order[3];
897 double *hcurl_edge_n[3];
898 double *diff_hcurl_edge_n[3];
900 for (
int ee = 0; ee != 3; ++ee) {
904 "orientation (sense) of edge is not set");
913 nb_gauss_pts, 2 * 3 * nb_dofs,
false);
917 diff_hcurl_edge_n[ee] =
925 hcurl_edge_n, diff_hcurl_edge_n, nb_gauss_pts);
931 for (
int ee = 0; ee != 3; ++ee) {
932 data.
dataOnEntities[MBEDGE][ee].getN(base).resize(nb_gauss_pts, 0,
false);
933 data.
dataOnEntities[MBEDGE][ee].getDiffN(base).resize(nb_gauss_pts, 0,
943 "No data struture to keep base functions on face");
947 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
950 3 * 2 * nb_dofs,
false);
952 int face_nodes[] = {0, 1, 2};
965 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
966 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
◆ getValueHcurlDemkowiczBrokenBase()
Definition at line 973 of file TriPolynomialBase.cpp.
979 int nb_gauss_pts = pts.size2();
986 "No data struture to keep base functions on face");
991 int nb_dofs = 3 * nb_edge_dofs + nb_volume_dofs;
992 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 3 * nb_dofs,
995 3 * 2 * nb_dofs,
false);
1002 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
1003 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false),
1004 MatrixDouble(nb_gauss_pts, 3 * 2 * nb_edge_dofs,
false)};
1007 std::array<int, 3> edge_sense{1, 1, 1};
1008 std::array<double *, 3>
phi{&*edge_bases[0].data().begin(),
1009 &*edge_bases[1].data().begin(),
1010 &*edge_bases[2].data().begin()};
1011 std::array<double *, 3> diff_phi{&*diff_edge_bases[0].data().begin(),
1012 &*diff_edge_bases[1].data().begin(),
1013 &*diff_edge_bases[2].data().begin()};
1015 edge_sense.data(), edge_order.data(),
1017 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin(),
1018 phi.data(), diff_phi.data(), nb_gauss_pts);
1020 MatrixDouble face_bases(nb_gauss_pts, 3 * nb_volume_dofs,
false);
1021 MatrixDouble diff_face_bases(nb_gauss_pts, 3 * 2 * nb_volume_dofs,
false);
1022 int face_nodes[] = {0, 1, 2};
1026 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin(),
1027 &*face_bases.data().begin(), &*diff_face_bases.data().begin(),
1032 getFTensor1FromPtr<3>(&*edge_bases[0].data().begin()),
1033 getFTensor1FromPtr<3>(&*edge_bases[1].data().begin()),
1034 getFTensor1FromPtr<3>(&*edge_bases[2].data().begin())};
1040 auto t_vol_base = getFTensor1FromPtr<3>(&*face_bases.data().begin());
1041 auto t_vol_diff_base =
1044 auto t_base = getFTensor1FromPtr<3>(
1053 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
1054 for (
int oo = 0; oo <
order; oo++) {
1058 for (
int ee = 0; ee != 3; ++ee) {
1059 t_base(
i) = t_edge_base[ee](
i);
1062 t_diff_base(
i,
j) = t_edge_diff_base[ee](
i,
j);
1064 ++t_edge_diff_base[ee];
1070 t_base(
i) = t_vol_base(
i);
1073 t_diff_base(
i,
j) = t_vol_diff_base(
i,
j);
1084 data.
dataOnEntities[MBTRI][0].getN(base).resize(nb_gauss_pts, 0,
false);
1085 data.
dataOnEntities[MBTRI][0].getDiffN(base).resize(nb_gauss_pts, 0,
false);
◆ getValueHdiv()
◆ getValueHdivAinsworthBase()
Definition at line 526 of file TriPolynomialBase.cpp.
533 "Polynomial type not set");
534 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
535 double *diffL,
const int dim) =
538 int nb_gauss_pts = pts.size2();
546 auto nb_dofs_on_face =
551 if (nb_dofs_on_face) {
555 for (
int ee = 0; ee < 3; ee++) {
556 N_face_edge(0, ee).resize(nb_gauss_pts, 3 * face_edge_dofs,
false);
561 N_face_bubble[0].resize(nb_gauss_pts, 3 * face_bubble_dofs,
false);
564 int face_nodes[3] = {0, 1, 2};
569 &data.
dataOnEntities[MBVERTEX][0].getN(base)(0, 0), NULL, phi_f_e,
570 NULL, nb_gauss_pts, 3, base_polynomials);
571 if (face_bubble_dofs)
575 &data.
dataOnEntities[MBVERTEX][0].getN(base)(0, 0), NULL, phi_f, NULL,
576 nb_gauss_pts, 3, base_polynomials);
585 for (
int oo = 0; oo < face_order; oo++) {
586 for (
int ee = 0; ee < 3; ee++) {
594 for (
int gg = 0; gg < nb_gauss_pts; gg++) {
607 for (
int gg = 0; gg < nb_gauss_pts; gg++) {
◆ getValueHdivDemkowiczBase()
Definition at line 618 of file TriPolynomialBase.cpp.
629 "This should be used only with DEMKOWICZ_JACOBI_BASE "
634 int nb_gauss_pts = pts.size2();
637 double *phi_f = &*data.
dataOnEntities[MBTRI][0].getN(base).data().begin();
640 int face_nodes[3] = {0, 1, 2};
644 &*data.
dataOnEntities[MBVERTEX][0].getDiffN(base).data().begin(), phi_f,
645 NULL, nb_gauss_pts, 3);
◆ getValueL2()
◆ getValueL2AinsworthBase()
Definition at line 340 of file TriPolynomialBase.cpp.
347 "Polynomial type not set");
348 PetscErrorCode (*base_polynomials)(
int p,
double s,
double *diff_s,
double *
L,
349 double *diffL,
const int dim) =
352 int nb_gauss_pts = pts.size2();
367 nb_gauss_pts, base_polynomials);
◆ getValueL2BernsteinBezierBase()
Definition at line 373 of file TriPolynomialBase.cpp.
378 int nb_gauss_pts = pts.size2();
381 auto &ptr = data.getBBAlphaIndicesSharedPtr(
field_name);
395 auto &ptr = data.getBBDiffNSharedPtr(
field_name);
401 auto get_alpha_by_name_ptr =
403 const std::string &
field_name) -> boost::shared_ptr<MatrixInt> & {
404 return data.getBBAlphaIndicesSharedPtr(
field_name);
407 auto get_base_by_name_ptr =
409 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
413 auto get_diff_base_by_name_ptr =
415 const std::string &
field_name) -> boost::shared_ptr<MatrixDouble> & {
419 auto get_alpha_by_order_ptr =
420 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixInt> & {
421 return data.getBBAlphaIndicesByOrderSharedPtr(o);
424 auto get_base_by_order_ptr =
425 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
426 return data.getBBNByOrderSharedPtr(o);
429 auto get_diff_base_by_order_ptr =
430 [](
auto &data,
const size_t o) -> boost::shared_ptr<MatrixDouble> & {
431 return data.getBBDiffNByOrderSharedPtr(o);
437 "Wrong size ent of ent data");
440 (
unsigned int)nb_gauss_pts)
442 "Base functions or nodes has wrong number of integration points "
448 const int order = ent_data.getOrder();
451 if (get_alpha_by_order_ptr(ent_data,
order)) {
453 get_alpha_by_order_ptr(ent_data,
order);
455 get_base_by_order_ptr(ent_data,
order);
456 get_diff_base_by_name_ptr(ent_data,
field_name) =
457 get_diff_base_by_order_ptr(ent_data,
order);
460 auto &get_n = get_base(ent_data);
461 auto &get_diff_n = get_diff_base(ent_data);
462 get_n.resize(nb_gauss_pts, nb_dofs,
false);
463 get_diff_n.resize(nb_gauss_pts, 2 * nb_dofs,
false);
470 "Inconsistent number of DOFs");
472 auto &tri_alpha = get_alpha(ent_data);
481 "Inconsistent number of DOFs");
483 auto &tri_alpha = get_alpha(ent_data);
484 tri_alpha.resize(nb_dofs, 3,
false);
491 std::array<int *, 3> face_edge_ptr{
495 face_n.data(), face_edge_ptr.data());
501 order,
lambda.size1(), tri_alpha.size1(), &tri_alpha(0, 0),
506 get_alpha_by_order_ptr(ent_data,
order) =
508 get_base_by_order_ptr(ent_data,
order) =
510 get_diff_base_by_order_ptr(ent_data,
order) =
511 get_diff_base_by_name_ptr(ent_data,
field_name);
516 ent_data.getBBAlphaIndicesSharedPtr(
field_name).reset();
517 auto &get_n = get_base(ent_data);
518 auto &get_diff_n = get_diff_base(ent_data);
519 get_n.resize(nb_gauss_pts, 0,
false);
520 get_diff_n.resize(nb_gauss_pts, 0,
false);
◆ query_interface()
◆ setDofsSideMap()
Set map of dof to side number.
That is used for broken space to establish connection between dofs in the interior of element/entity and side of element/entity to which that dof is associated. That depends on implementation of the base for given space, and has to be implemented while implementing base function for given space.
- Parameters
-
space | |
continuity | |
base | |
DofsSideMap | |
- Returns
- MoFEMErrorCode
Definition at line 1228 of file TriPolynomialBase.cpp.
1236 switch (continuity) {
1251 "Unknown (or not implemented) continuity");
◆ setDofsSideMapHcurl()
Definition at line 1257 of file TriPolynomialBase.cpp.
1265 auto set_ainsworth = [&dofs_side_map]() {
1268 dofs_side_map.clear();
1276 for (
int ee = 0; ee != 3; ++ee) {
1277 dofs_side_map.insert(DofsSideMapData{MBEDGE, ee, dof});
1284 dofs_side_map.insert(DofsSideMapData{MBTRI, 0, dof});
1292 auto set_demkowicz = [&dofs_side_map]() {
1295 dofs_side_map.clear();
1303 for (
int ee = 0; ee != 3; ++ee) {
1304 dofs_side_map.insert(DofsSideMapData{MBEDGE, ee, dof});
1311 dofs_side_map.insert(DofsSideMapData{MBTRI, 0, dof});
1319 switch (continuity) {
1324 return set_ainsworth();
1326 return set_demkowicz();
1334 "Unknown (or not implemented) continuity");
◆ cTx
◆ diffN_face_bubble
ublas::vector<MatrixDouble> MoFEM::TriPolynomialBase::diffN_face_bubble |
|
private |
◆ diffN_face_edge
ublas::matrix<MatrixDouble> MoFEM::TriPolynomialBase::diffN_face_edge |
|
private |
◆ N_face_bubble
ublas::vector<MatrixDouble> MoFEM::TriPolynomialBase::N_face_bubble |
|
private |
◆ N_face_edge
ublas::matrix<MatrixDouble> MoFEM::TriPolynomialBase::N_face_edge |
|
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.
EntPolynomialBaseCtx * cTx
#define NBEDGE_H1(P)
Number of base function on edge for H1 space.
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 getValueHdivDemkowiczBase(MatrixDouble &pts)
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.
Class used to pass element data to calculate base functions on tet,triangle,edge.
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.
ublas::matrix< MatrixDouble > N_face_edge
static constexpr int maxBrokenDofsOrder
max number of broken dofs
const static char *const ApproximationBaseNames[]
@ L2
field with C-1 continuity
#define NBFACETRI_AINSWORTH_EDGE_HDIV(P)
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 .
UBlasMatrix< double > MatrixDouble
MoFEMErrorCode getValueHdiv(MatrixDouble &pts)
static MoFEMErrorCode generateIndicesTriTri(const int N, int *alpha)
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.
#define FTENSOR_INDEX(DIM, I)
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
static boost::function< int(int)> broken_nbfacetri_edge_hdiv
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.
const FieldApproximationBase copyNodeBase
MoFEMErrorCode getValueHdivAinsworthBase(MatrixDouble &pts)
#define CHKERR
Inline error check.
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.
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))
MoFEMErrorCode getValueH1(MatrixDouble &pts)
MoFEMErrorCode getValueHcurlDemkowiczBase(MatrixDouble &pts)
Calculate base functions on triangle.
#define NBFACETRI_DEMKOWICZ_HDIV(P)
UBlasMatrix< int > MatrixInt
MoFEMErrorCode getValueL2BernsteinBezierBase(MatrixDouble &pts)
static MoFEMErrorCode generateIndicesEdgeTri(const int N[], int *alpha[])
#define NBEDGE_DEMKOWICZ_HCURL(P)
MoFEMErrorCode getValueHcurlAinsworthBrokenBase(MatrixDouble &pts)
MoFEMErrorCode getValueL2AinsworthBase(MatrixDouble &pts)
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 .
static boost::function< int(int)> broken_nbfacetri_face_hdiv
MoFEMErrorCode getValueHcurl(MatrixDouble &pts)
FTensor::Index< 'i', SPACE_DIM > i
const FieldApproximationBase bAse
MoFEMErrorCode getValueH1AinsworthBase(MatrixDouble &pts)
constexpr auto field_name
#define NBFACETRI_DEMKOWICZ_HCURL(P)
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
const FieldContinuity spaceContinuity
MoFEMErrorCode getValueHcurlDemkowiczBrokenBase(MatrixDouble &pts)
#define NBEDGE_AINSWORTH_HCURL(P)
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.
const static char *const FieldSpaceNames[]
MoFEMErrorCode getValueH1BernsteinBezierBase(MatrixDouble &pts)
static MoFEMErrorCode setDofsSideMapHcurl(const FieldSpace space, const FieldContinuity continuity, const FieldApproximationBase base, DofsSideMap &dofs_side_map)
FTensor::Tensor2< FTensor::PackPtr< double *, 6 >, 3, 2 > getFTensor2HVecFromPtr< 3, 2 >(double *ptr)
FTensor::Index< 'j', 3 > j
#define NBFACETRI_L2(P)
Number of base functions on triangle for L2 space.
@ DISCONTINUOUS
Broken continuity (No effect on L2 space)
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
@ HCURL
field with continuous tangents
@ MOFEM_DATA_INCONSISTENCY
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)
const std::string fieldName
FieldApproximationBase
approximation base
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
#define NBFACETRI_AINSWORTH_FACE_HDIV(P)
ublas::vector< MatrixDouble > N_face_bubble
#define NBFACETRI_AINSWORTH_HCURL(P)
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.
data structure for finite element entity
static MoFEMErrorCode generateIndicesVertexTri(const int N, int *alpha)
MoFEMErrorCode getValueL2(MatrixDouble &pts)
#define NBFACETRI_AINSWORTH_HDIV(P)
MoFEMErrorCode getValueHcurlAinsworthBase(MatrixDouble &pts)
@ 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
#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)