183 {
185
186 const size_t nb_dofs = data.
getIndices().size();
187 if (nb_dofs) {
188
189 auto get_dt = [&]() {
191 CHKERR TSGetTimeStep(getFEMethod()->ts, &
dt);
194 };
195 const auto dt = get_dt();
196
200 auto t_w = getFTensor0IntegrationWeight();
201
203 const size_t nb_integration_pts = data.
getN().size1();
204 const size_t nb_base_functions = data.
getN().size2();
205 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
206 const double alpha =
dt * getMeasure() * t_w * (*cache).scale_constraint;
208
209 size_t bb = 0;
210 for (; bb != nb_dofs; ++bb) {
211 locF(bb) += beta * t_base;
212 ++t_base;
213 }
214 for (; bb < nb_base_functions; ++bb)
215 ++t_base;
216
217 ++t_tau;
218 ++t_tau_dot;
219 ++t_f;
220 ++t_w;
221 }
222 }
223
225}
#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.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
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.