100 {
102
104
105 this->locF.resize(nb_dofs, false);
106 this->locF.clear();
107
108
109 const double area = getMeasure();
110
111
112 const int nb_integration_points = getGaussPts().size2();
113
114 auto t_w = getFTensor0IntegrationWeight();
115 auto t_coords = getFTensor1CoordsAtGaussPts();
116
117
119
120
121 for (int gg = 0; gg != nb_integration_points; gg++) {
122 const double a = t_w * area;
123
124
125 double body_source =
127 for (int rr = 0; rr != nb_dofs; rr++) {
128 this->locF[rr] += t_base * body_source *
a;
129
130
131 ++t_base;
132 }
133
134
135 ++t_w;
136
137 ++t_coords;
138 }
139
141 }
#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::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.