1290 {
1293
1294#ifndef NDEBUG
1297 "Broken side data pointer is null");
1298#endif
1299
1300 const int nb_dofs = data.
getIndices().size();
1301 if (!nb_dofs)
1303
1304 const int nb_integration_pts = getGaussPts().size2();
1305 const int nb_base_functions = data.
getN().size2();
1306
1307 if (data.
getDiffN().size1() != nb_integration_pts)
1309 "Differential of base functions should have the same number of "
1310 "integration points as the data");
1311 if (data.
getDiffN().size2() != nb_base_functions * 2)
1313 "Differential of base functions should have the same number of "
1314 "base functions as the data");
1315
1319
1322 if (bc.faces.find(fe_ent) == bc.faces.end())
1323 continue;
1324
1325 auto v_analytical_expr =
1327
1329 auto t_w = getFTensor0IntegrationWeight();
1330 auto t_tangent1 = getFTensor1Tangent1AtGaussPts();
1331 auto t_tangent2 = getFTensor1Tangent2AtGaussPts();
1332 auto t_var_flux =
1333 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(bd.getVarFlux());
1335 auto t_bc_disp =
1337
1338 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1339 const double a = 0.5 * bd.getSense() * t_w;
1340
1344
1345 locJ +=
a * t_bc_disp(
i) * (t_var_flux(
i,
j) * t_normal(
j));
1346
1347 auto t_nf = getFTensor1FromArray<SPACE_DIM, SPACE_DIM>(
nF);
1348 int bb = 0;
1349 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1350
1351
1352
1353
1354 ++t_nf;
1355 ++t_diff_base;
1356 }
1357 for (; bb != nb_base_functions; ++bb)
1358 ++t_diff_base;
1359
1360 ++t_w;
1361 ++t_tangent1;
1362 ++t_tangent2;
1363 ++t_var_flux;
1364 ++t_bc_disp;
1365 }
1366 }
1367 }
1368
1370}
#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.
MatrixDouble & getDiffN(const FieldApproximationBase base)
get derivatives of base functions
auto getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
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.
VectorDouble nF
local right hand side vector