1250 {
1253
1254#ifndef NDEBUG
1257 "Broken side data pointer is null");
1258#endif
1259
1260 const int nb_dofs =
data.getIndices().size();
1261 if (!nb_dofs)
1263
1264 const int nb_integration_pts = getGaussPts().size2();
1265 const int nb_base_functions =
data.getN().size2();
1266
1267#ifndef NDEBUG
1268 if (
data.getDiffN().size1() != nb_integration_pts)
1270 "Differential of base functions should have the same number of "
1271 "integration points as the data");
1272 if (
data.getDiffN().size2() != nb_base_functions * 2)
1274 "Differential of base functions should have the same number of "
1275 "base functions as the data");
1276#endif
1277
1281
1282 const EntityHandle fe_ent = getFEEntityHandle();
1284 if (bc.faces.find(fe_ent) == bc.faces.end())
1285 continue;
1286
1288
1290 auto t_w = getFTensor0IntegrationWeight();
1291 auto t_tangent1 = getFTensor1Tangent1AtGaussPts();
1292 auto t_tangent2 = getFTensor1Tangent2AtGaussPts();
1293 auto t_var_flux =
1294 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(bd.getVarFlux());
1295 auto t_diff_base =
data.getFTensor1DiffN<2>();
1297
1298 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1299 const double a = 0.5 * bd.getSense() * t_w;
1300
1304
1305 locJ +=
a * t_bc_disp(
i) * (t_var_flux(
i,
j) * t_normal(
j));
1306
1307 auto t_nf = getFTensor1FromArray<SPACE_DIM, SPACE_DIM>(
nF);
1308 int bb = 0;
1309 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1310
1311
1312
1313
1314 ++t_nf;
1315 ++t_diff_base;
1316 }
1317 for (; bb != nb_base_functions; ++bb)
1318 ++t_diff_base;
1319
1320 ++t_w;
1321 ++t_tangent1;
1322 ++t_tangent2;
1323 ++t_var_flux;
1324 ++t_bc_disp;
1325 }
1326 }
1327 }
1328
1330}
boost::shared_ptr< DataAtIntegrationPts > data
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static MatrixDouble getTopologicalAnalyticalExpr(OP_PTR op_ptr, const std::string &block_name)
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
auto getFTensor1FromMat(M &data, int rr=0, int cc=0)
Get tensor rank 1 (vector) form data matrix.
VectorDouble nF
local right hand side vector