664 {
666
667 const auto *fe =
668 dynamic_cast<const FlatPrismElementForcesAndSourcesCore *>(ptrFE);
669 if (!fe)
671 "TIE prism RHS operator is attached to a wrong finite element");
672
673 const auto nb_gauss_pts = getGaussPts().size2();
674 if (!nb_gauss_pts || nb_gauss_pts % 2) {
676 "Expected concatenated [slave|master] TIE Gauss points");
677 }
678 const auto nb_slave_gauss = nb_gauss_pts / 2;
679 if (
lambdaPtr->size1() != nb_gauss_pts) {
681 "TIE multiplier values at Gauss points were not prepared "
682 "before RHS assembly");
683 }
684
687 "Unexpected number of TIE prism vector dofs on rows");
688
691
692 auto &row_n = row_data.getN();
693 if (!row_n.size1() || !row_n.size2())
695 if (row_n.size1() != nb_gauss_pts)
697 "Unexpected number of Gauss points on TIE displacement block");
698
699 const int nb_row_base = nbRows /
SPACE_DIM;
700 if (static_cast<size_t>(nb_row_base) > row_n.size2())
702 "More TIE displacement bases than shape functions");
705 "Unexpected TIE multiplier matrix size: size2=%d expected=%d",
707 if (locF.size() != static_cast<size_t>(nbRows))
709 "Unexpected TIE U RHS block size: rowSide=%d rowType=%d "
710 "nbRows=%d locF.size()=%d row_n=(%d,%d) lambda=(%d,%d)",
711 rowSide, rowType, nbRows, static_cast<int>(locF.size()),
712 static_cast<int>(row_n.size1()), static_cast<int>(row_n.size2()),
715
716 auto t_w = getFTensor0IntegrationWeight();
717 for (size_t gg = 0; gg != nb_slave_gauss; ++gg) {
719 for (int rr = 0; rr != nb_row_base; ++rr) {
721 const double row_sign = base_on_slave ? 1.0 : -1.0;
722 const auto row_gg = base_on_slave ? gg : gg + nb_slave_gauss;
723 if (row_gg >= row_n.size1())
725 "TIE U RHS Gauss index out of range: rowSide=%d rowType=%d "
726 "rr=%d row_gg=%d row_n.size1()=%d nb_slave_gauss=%d",
727 rowSide, rowType, rr, static_cast<int>(row_gg),
728 static_cast<int>(row_n.size1()),
729 static_cast<int>(nb_slave_gauss));
730 auto t_row_base = row_data.getFTensor0N(row_gg, rr);
731 const double row_base = t_row_base;
732 if (row_base != 0.) {
733 auto t_row_rhs = getFTensor1FromPtr<SPACE_DIM>(&locF[
SPACE_DIM * rr]);
735 t_row_rhs(dd) +=
736 row_sign * row_base * slave_alpha * (*lambdaPtr)(gg,
dd);
737 }
738 ++t_row_base;
739 }
740
741 ++t_w;
742 }
743
745 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
bool isOnPrismTieTrace(const int side, const EntityType type)
bool isOnSlaveTieRowBase(const int rr, const int row_side, const EntityType row_type)
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)
double getSlaveFaceArea()