480 {
482 const int nb_gauss_pts = getGaussPts().size2();
483 const int nb_base_functions = data.
getN().size2();
484
485
486
487
488
489
490 const size_t nb_dofs = data.
getIndices().size();
491
492
493 if (nb_dofs) {
494
495
496 MatrixDouble diff = getCoordsAtGaussPts() - getFaceCoordsAtGaussPts();
497 const double eps = 1e-12;
498 if (norm_inf(diff) >
eps)
500 "coordinates at integration pts are different");
501
502 const size_t nb_gauss_pts = data.
getN().size1();
503
505
506 int test_nb_in_loop = getFEMethod()->nInTheLoop;
507 int test_face_sense = getFaceSense();
509 mat_ep.resize(6, nb_gauss_pts, false);
510 mat_ep.clear();
511
512
513
514
515
516
517
518
519 auto values_at_gauss_pts = getFTensor2SymmetricFromMat<3>(mat_ep);
520 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
522 size_t bb = 0;
523 for (; bb != nb_dofs / 6; ++bb) {
524 values_at_gauss_pts(
i,
j) += field_data(
i,
j) * base_function;
525 ++field_data;
526 ++base_function;
527 }
528 for (; bb != nb_base_functions; ++bb)
529 ++base_function;
530 ++values_at_gauss_pts;
531 }
532 }
534}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_ATOM_TEST_INVALID
#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....
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *,(Tensor_Dim *(Tensor_Dim+1))/2 >, Tensor_Dim > getFTensor2SymmetricFieldData()
Return symmetric FTensor rank 2, i.e. matrix from filed data coeffinects.
const VectorInt & getIndices() const
Get global indices of dofs on entity.