306 auto find_block_data = [&]() {
310 if (
m.second.block_ents.find(fe_ent) !=
m.second.block_ents.end()) {
311 block_raw_ptr = &
m.second;
315 return block_raw_ptr;
318 auto block_data_ptr = find_block_data();
322 auto &block_data = *block_data_ptr;
324 vecF.resize(nb_dofs,
false);
326 const int nb_integration_pts = getGaussPts().size2();
330 auto t_grad = getFTensor1FromMat<DIM>(
commonData->grads);
334 auto t_w = getFTensor0IntegrationWeight();
340 const double vol = getMeasure();
342 const double ct = getFEMethod()->ts_t;
343 auto t_coords = getFTensor1CoordsAtGaussPts();
345 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
346 const double a = vol * t_w;
348 double u_dot =
exactDot(t_coords(
NX), t_coords(
NY), ct);
353 -block_data.B0 *
exactLap(t_coords(
NX), t_coords(
NY), ct);
358 for (
int rr = 0; rr != nb_dofs; ++rr) {
360 a * (t_base * t_dot_val +
361 (block_data.B0 +
B * t_val) * t_diff_base(
i) * t_grad(
i) -
372 CHKERR VecSetOption(getFEMethod()->ts_F, VEC_IGNORE_NEGATIVE_INDICES,
#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()
#define CHKERR
Inline error check.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
constexpr auto VecSetValues
FTensor::Index< 'i', 3 > i
FTensor::Index< 'm', 3 > m
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
const VectorInt & getIndices() const
Get global indices of dofs on entity.