2989 {
2991
2992 const int nb_row = row_data.
getIndices().size();
2993 const int nb_col = col_data.
getIndices().size();
2994
2995 if (nb_row && nb_col && col_type == MBVERTEX) {
2996
2997 const int nb_gauss_pts = row_data.
getN().size1();
2998 int nb_base_fun_row = nb_row;
2999 int nb_base_fun_col = nb_col / 3;
3000
3001 const double area_slave =
3003
3004 matLhs.resize(nb_row, nb_col,
false);
3006
3007 auto get_diff_ksi = [](
auto &
m,
auto gg) {
3009 &
m(0, gg), &
m(1, gg), &
m(2, gg), &
m(3, gg), &
m(4, gg), &
m(5, gg));
3010 };
3011
3014 };
3015
3019
3020 auto t_const_unit_n =
3022
3023 auto t_lagrange_slave =
3026 auto &xi_grad_mat =
3028 auto t_grad = getFTensor2FromMat<3, 2>(xi_grad_mat);
3029
3030 auto t_w = getFTensor0IntegrationWeightSlave();
3031 const double cn_value = *
cNPtr.get();
3032 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
3034 cn_value, t_gap_gp, t_lagrange_slave) *
3035 t_w * area_slave;
3037 cn_value, t_gap_gp, t_lagrange_slave) *
3038 t_w * area_slave;
3040 cn_value, t_gap_gp, t_lagrange_slave) *
3041 t_w * area_slave;
3042
3045
3048
3049 for (int bbr = 0; bbr != nb_base_fun_row; ++bbr) {
3050
3052 auto t_diff_convect = get_diff_ksi(*
diffConvect, 3 * gg);
3053
3054 for (int bbc = 0; bbc != nb_base_fun_col; ++bbc) {
3055
3056 t_mat(
i) += t_base_lambda * val_diff_m_g * t_const_unit_n(
j) *
3057 t_grad(
j,
I) * t_diff_convect(
I,
i);
3058
3059 ++t_base_diff_disp;
3060 ++t_diff_convect;
3061 ++t_mat;
3062 }
3063
3064 ++t_base_lambda;
3065 ++t_base_diff_lambda;
3066 }
3067
3068 ++t_gap_gp;
3069 ++t_lagrange_slave;
3070 ++t_grad;
3071 ++t_w;
3072 }
3073
3075 ADD_VALUES);
3076 }
3078}
#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.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
constexpr IntegrationType I
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.
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.