772 {
774
775 const auto *fe =
776 dynamic_cast<const FlatPrismElementForcesAndSourcesCore *>(ptrFE);
777 if (!fe)
779 "TIE prism operator is attached to a wrong finite element");
780
782 SETERRQ(
784 "Unexpected number of TIE prism vector dofs on rows or columns: "
785 "rowField=%s colField=%s rowSide=%d colSide=%d rowType=%d colType=%d "
786 "nbRows=%d nbCols=%d",
788 rowType, colType, nbRows, nbCols);
789
792
793 const auto nb_gauss_pts = getGaussPts().size2();
794 if (!nb_gauss_pts || nb_gauss_pts % 2) {
796 "Expected concatenated [slave|master] TIE Gauss points");
797 }
798 const auto nb_slave_gauss = nb_gauss_pts / 2;
799 const int nb_row_base = nbRows /
SPACE_DIM;
800 const int nb_col_base = nbCols /
SPACE_DIM;
801
802 auto &col_n = col_data.getN();
803 if (!col_n.size1() || !col_n.size2())
805
806 auto &row_n = row_data.getN();
807 if (!row_n.size1() || !row_n.size2())
809
810 if (row_n.size1() != nb_gauss_pts || col_n.size1() != nb_gauss_pts)
812 "Unexpected number of Gauss points on TIE prism blocks");
813
814 if (static_cast<size_t>(nb_row_base) > row_n.size2() ||
815 static_cast<size_t>(nb_col_base) > col_n.size2())
817 "More TIE prism bases than shape functions");
818 if (locMat.size1() != static_cast<size_t>(nbRows) ||
819 locMat.size2() != static_cast<size_t>(nbCols))
821 "Unexpected TIE LHS block size: rowField=%s colField=%s "
822 "rowSide=%d colSide=%d rowType=%d colType=%d nbRows=%d "
823 "nbCols=%d locMat=(%d,%d) row_n=(%d,%d) col_n=(%d,%d)",
825 rowType, colType, nbRows, nbCols,
826 static_cast<int>(locMat.size1()), static_cast<int>(locMat.size2()),
827 static_cast<int>(row_n.size1()), static_cast<int>(row_n.size2()),
828 static_cast<int>(col_n.size1()), static_cast<int>(col_n.size2()));
829
832
833 auto t_w = getFTensor0IntegrationWeight();
834 for (size_t gg = 0; gg != nb_slave_gauss; ++gg) {
836 for (int rr = 0; rr != nb_row_base; ++rr) {
838 const double row_sign = base_on_slave ? 1.0 : -1.0;
839 const auto row_gg = base_on_slave ? gg : gg + nb_slave_gauss;
840 if (row_gg >= row_n.size1())
842 "TIE LHS Gauss index out of range: rowField=%s colField=%s "
843 "rowSide=%d rowType=%d rr=%d row_gg=%d row_n.size1()=%d "
844 "nb_slave_gauss=%d",
846 rr, static_cast<int>(row_gg), static_cast<int>(row_n.size1()),
847 static_cast<int>(nb_slave_gauss));
848 auto t_row_base = row_data.getFTensor0N(row_gg, rr);
849 auto t_col_base = col_data.getFTensor0N(gg, 0);
850 for (int cc = 0; cc != nb_col_base; ++cc) {
851 const double value = row_sign * slave_alpha * t_row_base * t_col_base;
854 ++t_col_base;
855 }
856 ++t_row_base;
857 }
858 ++t_w;
859 }
860
862 }
#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()