2171 {
2173
2175
2177 int nb_integration_pts = getGaussPts().size2();
2178 int nb_base_functions = data.
getN().size2();
2179
2180 double time = getFEMethod()->ts_t;
2183 }
2184
2185#ifndef NDEBUG
2186 if (this->locF.size() != nb_dofs)
2188 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
2189#endif
2190
2191
2193 for (
auto &bc : *(
bcData)) {
2194 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2195
2197
2198 auto [block_name, v_analytical_expr] =
2200 auto t_val =
2201 getFTensor1FromMat<3>(v_analytical_expr);
2203 auto t_w = getFTensor0IntegrationWeight();
2204 auto t_coords = getFTensor1CoordsAtGaussPts();
2205
2207
2208 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2209
2210 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
2211 int rr = 0;
2212 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
2213 t_f(
i) -= t_w * t_row_base * (t_val(
i) *
scale);
2214 ++t_row_base;
2215 ++t_f;
2216 }
2217
2218 for (; rr != nb_base_functions; ++rr)
2219 ++t_row_base;
2220 ++t_w;
2221 ++t_coords;
2222 ++t_val;
2223 }
2224 this->locF *= getMeasure();
2225 }
2226 }
2228}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
[Define dimension]
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
std::tuple< std::string, MatrixDouble > getAnalyticalExpr(OP_PTR op_ptr, MatrixDouble &analytical_expr, const std::string block_name)
static double dynamicTime
static PetscBool dynamicRelaxation
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 VectorDouble & getFieldData() const
Get DOF values on entity.