640 {
642
643#ifndef NDEBUG
646 << "Refinement for edges is not implemented";
647#endif
648
649 auto set_gauss_pts = [&](std::map<EntityHandle, int> &little_map) {
651
652 int nb_nodes = 2;
654 nb_nodes = 3;
655
657 gauss_pts.resize(2, nb_nodes, false);
658 gauss_pts.clear();
659
660 int nn = 0;
661 for (; nn != 2; ++nn) {
662 gauss_pts(0, nn) = static_cast<double>(nn);
663 little_map[nn] = nn;
664 }
665
666 if (nn < nb_nodes) {
667 gauss_pts(0, nn) = 0.5;
668 little_map[nn] = 2;
669 }
670
672 };
673
674 auto set_ref_edges = [&](std::map<EntityHandle, int> &little_map) {
676
677 int level = 0;
678 int nb_edges = level + 1;
679
680 int nb_nodes = 2;
682 nb_nodes = 3;
683
685 ref_edges.resize(nb_edges, nb_nodes, false);
686
687 for (int ee = 0; ee != nb_edges; ++ee) {
688 int nn = 0;
689 for (; nn != 2; ++nn) {
690 ref_edges(ee, nn) = nb_nodes * ee + nn;
691 }
692 if (nn < nb_nodes) {
693 ref_edges(ee, nn) = nb_nodes * ee + 2;
694 }
695 }
696
698 };
699
700 auto set_shape_functions = [&]() {
704 const auto nb_gauss_pts = gauss_pts.size2();
705 shape_functions.resize(nb_gauss_pts, 2);
706 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
707 const double ksi = gauss_pts(0, gg);
710 }
712 };
713
717
718 std::map<EntityHandle, int> little_map;
719 CHKERR set_gauss_pts(little_map);
720 CHKERR set_ref_edges(little_map);
721 CHKERR set_shape_functions();
722
724}
#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