530 {
532
533#ifndef NDEBUG
536 << "Refinement for edges is not implemented";
537#endif
538
539 auto set_gauss_pts = [&](std::map<EntityHandle, int> &little_map) {
541
542 int nb_nodes = 2;
544 nb_nodes = 3;
545
547 gauss_pts.resize(2, nb_nodes, false);
548 gauss_pts.clear();
549
550 int nn = 0;
551 for (; nn != 2; ++nn) {
552 gauss_pts(0, nn) = static_cast<double>(nn);
553 little_map[nn] = nn;
554 }
555
556 if (nn < nb_nodes) {
557 gauss_pts(0, nn) = 0.5;
558 little_map[nn] = 2;
559 }
560
562 };
563
564 auto set_ref_edges = [&](std::map<EntityHandle, int> &little_map) {
566
567 int level = 0;
568 int nb_edges = level + 1;
569
570 int nb_nodes = 2;
572 nb_nodes = 3;
573
575 ref_edges.resize(nb_edges, nb_nodes, false);
576
577 for (int ee = 0; ee != nb_edges; ++ee) {
578 int nn = 0;
579 for (; nn != 2; ++nn) {
580 ref_edges(ee, nn) = nb_nodes * ee + nn;
581 }
582 if (nn < nb_nodes) {
583 ref_edges(ee, nn) = nb_nodes * ee + 2;
584 }
585 }
586
588 };
589
590 auto set_shape_functions = [&]() {
594 const auto nb_gauss_pts = gauss_pts.size2();
595 shape_functions.resize(nb_gauss_pts, 2);
596 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
597 const double ksi = gauss_pts(0, gg);
600 }
602 };
603
607
608 std::map<EntityHandle, int> little_map;
609 CHKERR set_gauss_pts(little_map);
610 CHKERR set_ref_edges(little_map);
611 CHKERR set_shape_functions();
612
614}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG(channel, severity)
Log.
std::vector< ublas::matrix< int > > levelRef
std::vector< MatrixDouble > levelShapeFunctions
std::vector< MatrixDouble > levelGaussPtsOnRefMesh