1534 {
1536
1537 EntityHandle fe_ent = OP::getFEEntityHandle();
1538
1540
1541 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1543
1544 int nb_integration_pts = OP::getGaussPts().size2();
1545 auto t_w = OP::getFTensor0IntegrationWeight();
1546 int nb_base_functions = data.
getN().size2();
1548#ifndef NDEBUG
1549 if (!this->sourceVec) {
1551 "Source vector for OpTauStabilizationDispRhsBc is not set");
1552 }
1553 if (data.
getN().size1() != nb_integration_pts) {
1555 "Number of integration points in data should be %d but is %d",
1556 nb_integration_pts, (
int)data.
getN().size1());
1557 }
1558 if (nb_base_functions < nb_dofs /
SPACE_DIM) {
1560 "Number of base functions in data should be %d but is %d",
1562 }
1563
1564#endif
1565
1566 auto t_disp_val =
1568 *this->sourceVec, nb_integration_pts)();
1569
1572
1578 } else {
1580 ->getScale(OP::getFEMethod()->ts_t);
1581 }
1582 } else {
1584 << "No scaling method found for " << bc.blockName;
1585 }
1586
1587
1590
1591 auto area = getMeasure();
1592 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1593 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1594 auto tau_scale =
1595 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
1598 t_bc_residual(ii) =
1599 bc.flags[ii] ? t_disp_val(ii) - t_bc_disp(ii) : 0.;
1600 auto t_nf = getFTensor1FromPtr<3, 3>(OP::locF.data().data());
1601 int bb = 0;
1602 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1604 (tau_scale * t_row_base_fun) * t_bc_residual(
i);
1605 ++t_nf;
1606 ++t_row_base_fun;
1607 }
1608 for (; bb != nb_base_functions; ++bb)
1609 ++t_row_base_fun;
1610
1611 ++t_w;
1612 ++t_coords;
1613 ++t_disp_val;
1614 }
1615 }
1616 }
1617
1619}
#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.