2875 {
2877
2878 const int nb_row_dofs = row_data.
getIndices().size();
2879 const int nb_col_dofs = col_data.
getIndices().size();
2880 if (nb_row_dofs && (nb_col_dofs && col_type == MBVERTEX)) {
2881
2882 const int nb_gauss_pts = getGaussPtsSlave().size2();
2883 int nb_base_fun_row = nb_row_dofs / 3;
2884 int nb_base_fun_col = nb_col_dofs / 3;
2885
2886 matLhs.resize(nb_row_dofs, nb_col_dofs,
false);
2888
2889 const double area_s =
2891
2895
2898 };
2899
2900 auto t_const_unit_n =
2902 auto t_diff_lambda_xi = getFTensor1FromMat<2>(
2904 auto t_w = getFTensor0IntegrationWeightSlave();
2905
2906 auto get_diff_ksi = [](
auto &
m,
auto gg) {
2908 &
m(0, gg), &
m(1, gg), &
m(2, gg), &
m(3, gg), &
m(4, gg), &
m(5, gg));
2909 };
2910
2912
2913 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
2914
2915 double val_s = t_w * area_s;
2917
2918 for (int rr = 0; rr != nb_base_fun_row; ++rr) {
2919
2923
2926
2929
2930 auto t_diff_convect = get_diff_ksi(*
diffConvect, 3 * gg);
2931
2932 for (int cc = 0; cc != nb_base_fun_col; ++cc) {
2933 t_mat(
i,
j) -= val_s * t_base_row * t_const_unit_n(
i) *
2934 (t_diff_lambda_xi(
I) * t_diff_convect(
I,
j));
2935
2936 ++t_diff_convect;
2937 ++t_mat;
2938 }
2939
2940 ++t_base_row;
2941 }
2942
2943 ++t_diff_lambda_xi;
2944 ++t_w;
2945 }
2946
2948 ADD_VALUES);
2949 }
2950
2952}
#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()
#define CHKERR
Inline error check.
FTensor::Index< 'n', SPACE_DIM > n
FTensor::Index< 'm', SPACE_DIM > m
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
constexpr IntegrationType I
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.