2404 {
2406
2407 int row_nb_dofs = row_data.
getIndices().size();
2408 int col_nb_dofs = col_data.
getIndices().size();
2409 auto &locMat = OP::locMat;
2410 locMat.resize(row_nb_dofs, col_nb_dofs, false);
2411 locMat.clear();
2412
2413
2415
2417
2418 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2419
2420 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2421 auto t_w = OP::getFTensor0IntegrationWeight();
2422
2425
2426 int nb_integration_pts = OP::getGaussPts().size2();
2427 int nb_base_functions = row_data.
getN().size2();
2429
2431
2432 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2433
2435 t_N(
i) = t_normal(
i);
2437
2439 t_P(
i,
j) = t_N(
i) * t_N(
j);
2442
2444 t_d_res(
i,
j) = -(bc.normalStiffness * t_P(
i,
j) +
2445 bc.tangentialStiffness * t_Q(
i,
j));
2446
2447 int rr = 0;
2448 for (; rr != row_nb_dofs /
SPACE_DIM; ++rr) {
2449 auto t_mat = getFTensor2FromArray<SPACE_DIM, SPACE_DIM, SPACE_DIM>(
2452 for (
auto cc = 0; cc != col_nb_dofs /
SPACE_DIM; ++cc) {
2453 t_mat(
i,
j) += (t_w * t_row_base * t_col_base) * t_d_res(
i,
j);
2454 ++t_mat;
2455 ++t_col_base;
2456 }
2457 ++t_row_base;
2458 }
2459
2460 for (; rr != nb_base_functions; ++rr)
2461 ++t_row_base;
2462
2463 ++t_w;
2464 ++t_normal;
2465 }
2466
2467 locMat *= OP::getMeasure();
2468 }
2469 }
2471}
#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.