408 const int nb_row_dofs = row_data.
getIndices().size();
409 const int nb_col_dofs = col_data.
getIndices().size();
412 if (nb_row_dofs && nb_col_dofs) {
413 auto find_block_data = [&]() {
417 if (
m.second.block_ents.find(fe_ent) !=
m.second.block_ents.end()) {
418 block_raw_ptr = &
m.second;
422 return block_raw_ptr;
425 auto block_data_ptr = find_block_data();
429 auto &block_data = *block_data_ptr;
431 mat.resize(nb_row_dofs, nb_col_dofs,
false);
433 const int nb_integration_pts = getGaussPts().size2();
437 auto t_grad = getFTensor1FromMat<DIM>(
commonData->grads);
440 auto t_w = getFTensor0IntegrationWeight();
441 const double ts_a = getFEMethod()->ts_a;
442 const double vol = getMeasure();
448 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
449 const double a = vol * t_w;
451 for (
int rr = 0; rr != nb_row_dofs; ++rr) {
454 for (
int cc = 0; cc != nb_col_dofs; ++cc) {
457 a * (t_row_base * t_col_base * ts_a +
458 (block_data.B0 +
B * t_val) * t_row_diff_base(
i) *
460 B * t_col_base * t_grad(
i) * t_row_diff_base(
i));
474 if (row_side != col_side || row_type != col_type) {
475 transMat.resize(nb_col_dofs, nb_row_dofs,
false);
#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 MatSetValues
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.