451 {
453
454 const double vol = getMeasure();
455
456 auto t_w = getFTensor0IntegrationWeight();
457
459
460 auto t_coords = getFTensor1CoordsAtGaussPts();
461
462 const double time = getFEMethod()->ts_t;
463
464
465 constexpr double flux_p = -0.03e6;
466 constexpr double flux_c = -0.23e6;
467
468
470
471
472 const double r_cylinder = t_coords(0);
473
474 const double r = std::sqrt(t_coords(
i) * t_coords(
i));
475 const double s = std::abs(t_coords(1)) /
r;
476
477
478 const double alpha = t_w * vol * (2 * M_PI * r_cylinder);
479
480 for (
int rr = 0; rr !=
nbRows; ++rr) {
481 locF[rr] +=
alpha * t_row_base * (s * flux_p + flux_c) * time;
482 ++t_row_base;
483 }
484 ++t_coords;
485 ++t_w;
486 }
487
489}
#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', 2 > i
summit Index
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
VectorDouble locF
local entity vector
int nbRows
number of dofs on rows
int nbIntegrationPts
number of integration points