532 {
534
536#ifndef NDEBUG
539 << "Refinement for edges is not implemented";
540#endif
541
542 auto set_gauss_pts = [&](std::map<EntityHandle, int> &little_map) {
544
545 int nb_nodes = 2;
547 nb_nodes = 3;
548
550 gauss_pts.resize(2, nb_nodes, false);
551 gauss_pts.clear();
552
553 int nn = 0;
554 for (; nn != 2; ++nn) {
555 gauss_pts(0, nn) = static_cast<double>(nn);
556 little_map[nn] = nn;
557 }
558
559 if (nn < nb_nodes) {
560 gauss_pts(0, nn) = 0.5;
561 little_map[nn] = 2;
562 }
563
565 };
566
567 auto set_ref_edges = [&](std::map<EntityHandle, int> &little_map) {
569
570 int level = 0;
571 int nb_edges = level + 1;
572
573 int nb_nodes = 2;
575 nb_nodes = 3;
576
578 ref_edges.resize(nb_edges, nb_nodes, false);
579
580 for (int ee = 0; ee != nb_edges; ++ee) {
581 int nn = 0;
582 for (; nn != 2; ++nn) {
583 ref_edges(ee, nn) = nb_nodes * ee + nn;
584 }
585 if (nn < nb_nodes) {
586 ref_edges(ee, nn) = nb_nodes * ee + 2;
587 }
588 }
589
591 };
592
593 auto set_shape_functions = [&]() {
597 const auto nb_gauss_pts = gauss_pts.size2();
598 shape_functions.resize(nb_gauss_pts, 2);
599 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
600 const double ksi = gauss_pts(0, gg);
603 }
605 };
606
610
611 std::map<EntityHandle, int> little_map;
612 CHKERR set_gauss_pts(little_map);
613 CHKERR set_ref_edges(little_map);
614 CHKERR set_shape_functions();
615
617}
#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
MoFEMErrorCode getOptions()