940 {
942
943#ifndef NDEBUG
946 "Topological data pointer is null");
947#endif
948
949 const int nb_dofs =
data.getIndices().size();
950 if (!nb_dofs)
952
953 const int nb_integration_pts =
data.getN().size1();
954
955 auto t_w = getFTensor0IntegrationWeight();
956 const int nb_base_functions =
data.getN().size2();
957 auto t_row_base_fun =
data.getFTensor0N();
958 auto t_obj_du_gamma =
959 topoData->getFTensorObjDDisplacement(nb_integration_pts);
960
962
963 auto get_ftensor1 = [](
auto &
v) {
965 &
v[0], &
v[1], &
v[2]);
966 };
967
968 for (int gg = 0; gg != nb_integration_pts; ++gg) {
969 const double a = t_w * getMeasure();
970 auto t_nf = get_ftensor1(
nF);
971
972 int bb = 0;
973 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
974 t_nf(
i) +=
a * t_row_base_fun * t_obj_du_gamma(
i);
975 ++t_nf;
976 ++t_row_base_fun;
977 }
978 for (; bb != nb_base_functions; ++bb)
979 ++t_row_base_fun;
980
981 ++t_w;
982 ++t_obj_du_gamma;
983 }
984
986}
boost::shared_ptr< DataAtIntegrationPts > data
#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
const double v
phase velocity of light in medium (cm/ns)
boost::shared_ptr< TopologicalData > topoData
VectorDouble nF
local right hand side vector