2405 {
2407
2408
2409 EntityHandle fe_ent = OP::getFEEntityHandle();
2410
2412
2413 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2414
2416
2419 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2420 auto t_w = OP::getFTensor0IntegrationWeight();
2421
2424
2426
2428 int nb_integration_pts = OP::getGaussPts().size2();
2429 int nb_base_functions = data.
getN().size2();
2431 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2432
2434 t_N(
i) = t_normal(
i);
2436
2438 t_P(
i,
j) = t_N(
i) * t_N(
j);
2441
2443 t_traction(
i) = t_approx_P(
i,
j) * t_N(
j);
2444
2446 t_res(
i) = 0.5 *(t_traction(
i)) - bc.normalStiffness * t_P(
i,
j) * t_u(
j) -
2447 bc.tangentialStiffness * t_Q(
i,
j) * t_u(
j);
2448
2449 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
2450 int bb = 0;
2451 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
2452 t_nf(
i) += (t_w * t_row_base * OP::getMeasure()) * t_res(
i);
2453 ++t_nf;
2454 ++t_row_base;
2455 }
2456 for (; bb != nb_base_functions; ++bb)
2457 ++t_row_base;
2458
2459 ++t_w;
2460 ++t_normal;
2461 ++t_u;
2462 ++t_approx_P;
2463 }
2464 }
2465 }
2466 }
2468}
#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
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
auto getFTensor2FromMat(M &data)
Get tensor rank 2 (matrix) form data matrix.
auto getFTensor1FromMat(M &data, int rr=0, int cc=0)
Get tensor rank 1 (vector) form data matrix.
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.