1613 {
1615
1616 EntityHandle fe_ent = OP::getFEEntityHandle();
1617
1619
1620 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1622
1623 int nb_integration_pts = OP::getGaussPts().size2();
1624 auto t_w = OP::getFTensor0IntegrationWeight();
1625 int nb_base_functions = data.
getN().size2();
1627#ifndef NDEBUG
1628 if (!this->sourceVec) {
1630 "Source vector for OpTauStabilizationDispRhsBc is not set");
1631 }
1632 if (data.
getN().size1() != nb_integration_pts) {
1634 "Number of integration points in data should be %d but is %d",
1635 nb_integration_pts, (
int)data.
getN().size1());
1636 }
1637 if (nb_base_functions < nb_dofs /
SPACE_DIM) {
1639 "Number of base functions in data should be %d but is %d",
1641 }
1642
1643#endif
1644
1645 auto t_disp_val =
1647 *this->sourceVec, nb_integration_pts)();
1648
1651
1657 } else {
1659 ->getScale(OP::getFEMethod()->ts_t);
1660 }
1661 } else {
1663 << "No scaling method found for " << bc.blockName;
1664 }
1665
1666
1669
1670 auto area = getMeasure();
1671 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1672 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1673 auto tau_scale =
1674 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
1677 t_bc_residual(ii) =
1678 bc.flags[ii] ? t_disp_val(ii) - t_bc_disp(ii) : 0.;
1679 auto t_nf = getFTensor1FromPtr<3, 3>(OP::locF.data().data());
1680 int bb = 0;
1681 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1683 (tau_scale * t_row_base_fun) * t_bc_residual(
i);
1684 ++t_nf;
1685 ++t_row_base_fun;
1686 }
1687 for (; bb != nb_base_functions; ++bb)
1688 ++t_row_base_fun;
1689
1690 ++t_w;
1691 ++t_coords;
1692 ++t_disp_val;
1693 }
1694 }
1695 }
1696
1698}
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
static PetscBool physicalTimeFlg
static double currentPhysicalTime
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.