2471 {
2473
2474 int row_nb_dofs = row_data.
getIndices().size();
2475 int col_nb_dofs = col_data.
getIndices().size();
2476 auto &locMat = OP::locMat;
2477 locMat.resize(row_nb_dofs, col_nb_dofs, false);
2478 locMat.clear();
2479
2480
2481 EntityHandle fe_ent = OP::getFEEntityHandle();
2482
2484
2485 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2486
2487 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2488 auto t_w = OP::getFTensor0IntegrationWeight();
2489
2492
2493 int nb_integration_pts = OP::getGaussPts().size2();
2494 int nb_base_functions = row_data.
getN().size2();
2496
2498
2499 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2500
2502 t_N(
i) = t_normal(
i);
2504
2506 t_P(
i,
j) = t_N(
i) * t_N(
j);
2509
2511 t_d_res(
i,
j) = -(bc.normalStiffness * t_P(
i,
j) +
2512 bc.tangentialStiffness * t_Q(
i,
j));
2513
2514 int rr = 0;
2515 for (; rr != row_nb_dofs /
SPACE_DIM; ++rr) {
2516 auto t_mat = getFTensor2FromArray<SPACE_DIM, SPACE_DIM, SPACE_DIM>(
2519 for (
auto cc = 0; cc != col_nb_dofs /
SPACE_DIM; ++cc) {
2520 t_mat(
i,
j) += (t_w * t_row_base * t_col_base) * t_d_res(
i,
j);
2521 ++t_mat;
2522 ++t_col_base;
2523 }
2524 ++t_row_base;
2525 }
2526
2527 for (; rr != nb_base_functions; ++rr)
2528 ++t_row_base;
2529
2530 ++t_w;
2531 ++t_normal;
2532 }
2533
2534 locMat *= OP::getMeasure();
2535 }
2536 }
2538}
#define FTENSOR_INDEX(DIM, I)
Tensor1< T, Tensor_Dim > normalize()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#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::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.