50 {
52
53 auto &locLhs = AssemblyDomainEleOp::locMat;
54
55 const int nb_row_dofs = row_data.
getIndices().size();
56 const int nb_col_dofs = col_data.
getIndices().size();
57
58 const double area = getMeasure();
59
60
61 const int nb_integration_points = getGaussPts().size2();
62
63 auto t_w = getFTensor0IntegrationWeight();
64
66
68
69
71
73
74
75 for (int gg = 0; gg != nb_integration_points; gg++) {
76 const double a = t_w * area;
77
78 for (int rr = 0; rr != nb_row_dofs; ++rr) {
79
81
83
84 for (int cc = 0; cc != nb_col_dofs; cc++) {
85 locLhs(rr, cc) += (((1 + t_field * t_field) * t_row_diff_base(
i) *
87 (2.0 * t_field * t_field_grad(
i) *
88 t_row_diff_base(
i) * t_col_base)) *
90
91
92 ++t_col_base;
93
94 ++t_col_diff_base;
95 }
96
97
98 ++t_row_base;
99
100 ++t_row_diff_base;
101 }
102
103
104 ++t_w;
105
106 ++t_field;
107
108 ++t_field_grad;
109 }
110
112 }
#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::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
FTensor::Index< 'i', 2 > 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.
const VectorInt & getIndices() const
Get global indices of dofs on entity.