586 {
587 constexpr double def_val[] = {0, 0, 0};
589 switch (type) {
590 case MBVERTEX:
591 case MBEDGE:
592 case MBTRI:
593 case MBQUAD:
594 break;
595 default:
597 }
598
600 for (
int dd = 0;
dd != nb_dofs; ++
dd)
602 std::cerr <<
"Indices: " << data.
getIndices() << std::endl;
604 std::cerr <<
"Data: " << data.
getFieldData() << std::endl;
606 "Indicices/data inconsistency %3.1f != %d",
608 }
609
612 int side_prism, sense, offset;
613 if (type == MBVERTEX) {
615 } else
617
618 if (type == MBVERTEX) {
619 auto &coords_at_pts = OP::getCoordsAtGaussPts();
620 const size_t nb_gauss_pts = coords_at_pts.size1();
621
624 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
628
632 else
634 }
635 }
636
637 auto to_str = [](
auto i) {
return boost::lexical_cast<std::string>(
i); };
638 std::string tag_name_base =
639 "FEType" + to_str(OP::getNumeredEntFiniteElementPtr()->getEntType()) +
640 "Type" + to_str(type) + "Side" + to_str(side_prism);
641
642 std::string tag_prism_name_base =
643 "PrismType" + to_str(type) + "Side" + to_str(side_prism);
644
646 MatrixDouble prism_base(trans_base.size1(), trans_base.size2());
650
651 for (size_t rr = 0; rr != trans_base.size1(); ++rr) {
652
653 std::string tag_name = tag_name_base + "Base";
654 if (type == MBVERTEX) {
656 int prism_mode_side;
658 tag_name += to_str(prism_mode_side);
659 } else {
660 tag_name += to_str(rr);
661 }
662
663 std::cout << tag_name << endl;
664
667 MB_TAG_CREAT | MB_TAG_DENSE, def_val);
669 &trans_base(rr, 0));
670
671 if (type != MBVERTEX) {
672 auto tag_prism_name = tag_prism_name_base + "Base" + to_str(rr);
673 Tag th_prism;
677 }
678 }
679
681 double s = 0;
682 for (
unsigned int ii = 0; ii <
m.size1(); ii++) {
683 for (
unsigned int jj = 0; jj <
m.size2(); jj++) {
684 s += std::abs(
m(ii, jj));
685 }
686 }
687 return s;
688 };
689
690 if (type != MBVERTEX) {
691 prism_base -= trans_base;
693 constexpr double eps = 1e-6;
694
695 if (std::abs(sum) >
eps)
696 cout << "Inconsistent base " << tag_prism_name_base << " "
697 << tag_name_base << " sum " << sum << endl;
698
699 if (std::abs(sum) >
eps)
701 "Inconsistent base %s sum %6.4e", tag_prism_name_base.c_str(),
702 sum);
703 }
704
706}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_ATOM_TEST_INVALID
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
static double sum_matrix(MatrixDouble &m)
FTensor::Index< 'm', SPACE_DIM > m
FTensor::Index< 'i', SPACE_DIM > i
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)
constexpr double t
plate stiffness
static double getArg(double x)
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDouble & getFieldData() const
get dofs values
const VectorInt & getLocalIndices() const
get local indices of dofs on entity
const VectorDofs & getFieldDofs() const
get dofs data stature FEDofEntity
const VectorInt & getIndices() const
Get global indices of dofs on entity.
std::vector< EntityHandle > nodeHandles