1286 {
1289
1290#ifndef NDEBUG
1293 "Broken side data pointer is null");
1294#endif
1295
1296 const int nb_dofs = data.
getIndices().size();
1297 if (!nb_dofs)
1299
1300 const int nb_integration_pts = getGaussPts().size2();
1301 const int nb_base_functions = data.
getN().size2();
1302
1303 if (data.
getDiffN().size1() != nb_integration_pts)
1305 "Differential of base functions should have the same number of "
1306 "integration points as the data");
1307 if (data.
getDiffN().size2() != nb_base_functions * 2)
1309 "Differential of base functions should have the same number of "
1310 "base functions as the data");
1311
1315
1318 if (bc.faces.find(fe_ent) == bc.faces.end())
1319 continue;
1320
1321 auto v_analytical_expr =
1323
1325 auto t_w = getFTensor0IntegrationWeight();
1326 auto t_tangent1 = getFTensor1Tangent1AtGaussPts();
1327 auto t_tangent2 = getFTensor1Tangent2AtGaussPts();
1328 auto t_var_flux =
1329 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(bd.getVarFlux());
1331 auto t_bc_disp =
1333
1334 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1335 const double a = 0.5 * bd.getSense() * t_w;
1336
1340
1341 locJ +=
a * t_bc_disp(
i) * (t_var_flux(
i,
j) * t_normal(
j));
1342
1343 auto t_nf = getFTensor1FromArray<SPACE_DIM, SPACE_DIM>(
nF);
1344 int bb = 0;
1345 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1346
1347
1348
1349
1350 ++t_nf;
1351 ++t_diff_base;
1352 }
1353 for (; bb != nb_base_functions; ++bb)
1354 ++t_diff_base;
1355
1356 ++t_w;
1357 ++t_tangent1;
1358 ++t_tangent2;
1359 ++t_var_flux;
1360 ++t_bc_disp;
1361 }
1362 }
1363 }
1364
1366}
#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