2338 {
2340
2341
2343
2345
2346 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2347
2349
2352 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2353 auto t_w = OP::getFTensor0IntegrationWeight();
2354
2357
2359
2361 int nb_integration_pts = OP::getGaussPts().size2();
2362 int nb_base_functions = data.
getN().size2();
2364 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2365
2367 t_N(
i) = t_normal(
i);
2369
2371 t_P(
i,
j) = t_N(
i) * t_N(
j);
2374
2376 t_traction(
i) = t_approx_P(
i,
j) * t_N(
j);
2377
2379 t_res(
i) = 0.5 *(t_traction(
i)) - bc.normalStiffness * t_P(
i,
j) * t_u(
j) -
2380 bc.tangentialStiffness * t_Q(
i,
j) * t_u(
j);
2381
2382 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
2383 int bb = 0;
2384 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
2385 t_nf(
i) += (t_w * t_row_base * OP::getMeasure()) * t_res(
i);
2386 ++t_nf;
2387 ++t_row_base;
2388 }
2389 for (; bb != nb_base_functions; ++bb)
2390 ++t_row_base;
2391
2392 ++t_w;
2393 ++t_normal;
2394 ++t_u;
2395 ++t_approx_P;
2396 }
2397 }
2398 }
2399 }
2401}
#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.