589 {
591
592#ifndef NDEBUG
595 "Topological data pointer is null");
596#endif
597
599 if (!nb_dofs)
601
602 const int nb_integration_pts = data.
getN().size1();
603
604#ifndef NDEBUG
605 const int disp_rows =
topoData->objDDisplacementAtPts.size1();
606 const int disp_cols =
topoData->objDDisplacementAtPts.size2();
607 if (disp_cols != nb_integration_pts)
609 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
610 disp_cols, nb_integration_pts);
611
614 "objDDisplacementAtPts row size is %d, expected %d", disp_rows,
616 }
617#endif
618
619 auto t_w = getFTensor0IntegrationWeight();
620 const int nb_base_functions = data.
getN().size2();
622 auto t_obj_du_gamma =
623 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
624
626
627 auto get_ftensor1 = [](
auto &
v) {
629 &
v[0], &
v[1], &
v[2]);
630 };
631
632 for (int gg = 0; gg != nb_integration_pts; ++gg) {
633 const double a = t_w * getMeasure();
634 auto t_nf = get_ftensor1(
nF);
635
636 int bb = 0;
637 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
638 t_nf(
i) +=
a * t_row_base_fun * t_obj_du_gamma(
i);
639 ++t_nf;
640 ++t_row_base_fun;
641 }
642 for (; bb != nb_base_functions; ++bb)
643 ++t_row_base_fun;
644
645 ++t_w;
646 ++t_obj_du_gamma;
647 }
648
650}
#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
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.
VectorDouble nF
local right hand side vector