508 {
511 int nb_integration_pts = data.
getN().size1();
512 auto v = getVolume();
513 auto t_w = getFTensor0IntegrationWeight();
514 auto t_s_w = getFTensor1FromMat<3>(
dataAtPts->wAtPts);
515 int nb_base_functions = data.
getN().size2() / 3;
518 auto get_ftensor1 = [](
auto &
v) {
521 };
522
523 for (int gg = 0; gg != nb_integration_pts; ++gg) {
525 auto t_nf = get_ftensor1(
nF);
526 int bb = 0;
527 for (; bb != nb_dofs / 3; ++bb) {
528 double div_row_base = t_row_diff_base_fun(
i,
i);
529 t_nf(
i) +=
a * div_row_base * t_s_w(
i);
530 ++t_nf;
531 ++t_row_diff_base_fun;
532 }
533 for (; bb != nb_base_functions; ++bb) {
534 ++t_row_diff_base_fun;
535 }
536 ++t_w;
537 ++t_s_w;
538 }
539
541}
#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
const double v
phase velocity of light in medium (cm/ns)
VectorDouble nF
local right hand side vector
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN(FieldApproximationBase base)
Get derivatives of base functions for Hdiv space.
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 dofs on entity.