1270 {
1272
1274
1276
1277 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1279
1280 int nb_integration_pts = OP::getGaussPts().size2();
1281 auto t_w = OP::getFTensor0IntegrationWeight();
1282 int nb_base_functions = data.
getN().size2();
1284#ifndef NDEBUG
1285 if (!this->sourceVec) {
1287 "Source vector for OpTauStabilizationDispRhsBc is not set");
1288 }
1289 if (data.
getN().size1() != nb_integration_pts) {
1291 "Number of integration points in data should be %d but is %d",
1292 nb_integration_pts, (
int)data.
getN().size1());
1293 }
1294 if (nb_base_functions < nb_dofs /
SPACE_DIM) {
1296 "Number of base functions in data should be %d but is %d",
1298 }
1299
1300#endif
1301
1302 auto t_disp_val =
1304 *this->sourceVec, nb_integration_pts)();
1305
1308
1314 } else {
1316 ->getScale(OP::getFEMethod()->ts_t);
1317 }
1318 } else {
1320 << "No scaling method found for " << bc.blockName;
1321 }
1322
1323
1326
1327 auto area = getMeasure();
1328 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1329 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1330 auto tau_scale =
1331 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
1332 auto t_nf = getFTensor1FromPtr<3, 3>(OP::locF.data().data());
1333 int bb = 0;
1334 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1335 for (
auto ii = 0; ii !=
SPACE_DIM; ++ii) {
1336 if (bc.flags[ii]) {
1337 t_nf(ii) += (tau_scale * t_row_base_fun) *
1338 (t_disp_val(ii) - t_bc_disp(ii));
1339 }
1340 }
1341 ++t_nf;
1342 ++t_row_base_fun;
1343 }
1344 for (; bb != nb_base_functions; ++bb)
1345 ++t_row_base_fun;
1346
1347 ++t_w;
1348 ++t_coords;
1349 ++t_disp_val;
1350 }
1351 }
1352 }
1353
1355}
#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.