639 {
641
642#ifndef NDEBUG
645 "Topological data pointer is null");
646#endif
647
649 if (!nb_dofs)
651
652 const int nb_integration_pts = OP::getGaussPts().size2();
653
654#ifndef NDEBUG
655 const int traction_rows =
topoData->objDDisplacementAtPts.size1();
656 const int traction_cols =
topoData->objDDisplacementAtPts.size2();
657 if (traction_cols != nb_integration_pts)
659 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
660 traction_cols, nb_integration_pts);
661
664 "objDDisplacementAtPts row size is %d, expected %d", traction_rows,
666 }
667#endif
668
669 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
670 auto t_w = OP::getFTensor0IntegrationWeight();
671 const int nb_base_functions = data.
getN().size2() /
SPACE_DIM;
673 auto t_obj_dtraction =
674 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
675
678
679 for (int gg = 0; gg != nb_integration_pts; ++gg) {
680 auto t_nf = getFTensor1FromPtr<SPACE_DIM>(&*OP::locF.begin());
681 int bb = 0;
682 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
684 t_w * (t_row_base_fun(
j) * t_normal(
j)) * t_obj_dtraction(
i) * 0.5;
685 ++t_nf;
686 ++t_row_base_fun;
687 }
688 for (; bb != nb_base_functions; ++bb)
689 ++t_row_base_fun;
690
691 ++t_w;
692 ++t_normal;
693 ++t_obj_dtraction;
694 }
695
697}
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#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
boost::shared_ptr< TopologicalData > topoData
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.