2984 {
2986
2988
2989 int nb_dofs =
data.getFieldData().size();
2990 int nb_integration_pts = getGaussPts().size2();
2991 int nb_base_functions =
data.getN().size2();
2992
2993 double time = getFEMethod()->ts_t;
2996 }
2997
2998#ifndef NDEBUG
2999 if (this->locF.size() != nb_dofs)
3001 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
3002#endif
3003
3004
3005 EntityHandle fe_ent = getFEEntityHandle();
3006 for (
auto &bc : *(
bcData)) {
3007 if (bc.faces.find(fe_ent) != bc.faces.end()) {
3008
3010
3011 auto [block_name, v_analytical_expr] =
3014 auto t_row_base =
data.getFTensor0N();
3015 auto t_w = getFTensor0IntegrationWeight();
3016 auto t_coords = getFTensor1CoordsAtGaussPts();
3017
3019
3020 for (int gg = 0; gg != nb_integration_pts; ++gg) {
3021
3022 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
3023 int rr = 0;
3024 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
3025 t_f(
i) -= t_w * t_row_base * (t_val(
i) *
scale);
3026 ++t_row_base;
3027 ++t_f;
3028 }
3029
3030 for (; rr != nb_base_functions; ++rr)
3031 ++t_row_base;
3032 ++t_w;
3033 ++t_coords;
3034 ++t_val;
3035 }
3036 this->locF *= getMeasure();
3037 }
3038 }
3040}
boost::shared_ptr< DataAtIntegrationPts > data
#define FTENSOR_INDEX(DIM, I)
#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)
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
auto getFTensor1FromMat(M &data, int rr=0, int cc=0)
Get tensor rank 1 (vector) form data matrix.
static PetscBool physicalTimeFlg
static double currentPhysicalTime