1168 {
1170
1171 const double vol = getMeasure();
1172 auto t_w = getFTensor0IntegrationWeight();
1173 auto t_coords = getFTensor1CoordsAtGaussPts();
1174 auto t_row_base = row_data.getFTensor0N();
1175 auto t_row_diff_base = row_data.getFTensor1DiffN<
SPACE_DIM>();
1176
1177#ifndef NDEBUG
1178 if (row_data.getDiffN().size1() != row_data.getN().size1())
1180 if (row_data.getDiffN().size2() != row_data.getN().size2() *
SPACE_DIM) {
1182 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
1183 MOFEM_LOG(
"SELF", Sev::error) << row_data.getN();
1184 MOFEM_LOG(
"SELF", Sev::error) << row_data.getDiffN();
1186 }
1187
1188 if (col_data.getDiffN().size1() != col_data.getN().size1())
1190 if (col_data.getDiffN().size2() != col_data.getN().size2() *
SPACE_DIM) {
1192 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
1193 MOFEM_LOG(
"SELF", Sev::error) << col_data.getN();
1194 MOFEM_LOG(
"SELF", Sev::error) << col_data.getDiffN();
1196 }
1197#endif
1198
1200
1201 auto t_h = getFTensor0FromVec(*
hPtr);
1202 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
1203
1204 for (int gg = 0; gg != nbIntegrationPts; gg++) {
1205
1206 const double r = t_coords(0);
1208
1209 int rr = 0;
1210 for (; rr != nbRows; ++rr) {
1211
1212 auto t_col_base = col_data.getFTensor0N(gg, 0);
1213 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
1214
1215 for (int cc = 0; cc != nbCols; ++cc) {
1216
1217 locMat(rr, cc) += (t_row_base * t_col_base * alpha);
1218
1219 ++t_col_base;
1220 ++t_col_diff_base;
1221 }
1222
1223 ++t_row_base;
1224 ++t_row_diff_base;
1225 }
1226
1227 for (; rr < nbRowBaseFunctions; ++rr) {
1228 ++t_row_base;
1229 ++t_row_diff_base;
1230 }
1231
1232 ++t_h;
1233 ++t_grad_g;
1234 ++t_w;
1235 ++t_coords;
1236 }
1237
1238 } else {
1239
1240 auto t_h = getFTensor0FromVec(*
hPtr);
1241 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
1242 auto t_u = getFTensor1FromMat<U_FIELD_DIM>(*
uPtr);
1243
1244 auto ts_a = getTSa();
1245
1246 for (int gg = 0; gg != nbIntegrationPts; gg++) {
1247
1248 const double r = t_coords(0);
1250
1252 int rr = 0;
1253 for (; rr != nbRows; ++rr) {
1254
1255 auto t_col_base = col_data.getFTensor0N(gg, 0);
1256 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
1257
1258 for (int cc = 0; cc != nbCols; ++cc) {
1259
1260 locMat(rr, cc) += (t_row_base * t_col_base * alpha) * ts_a;
1261 locMat(rr, cc) +=
1262 (t_row_base * alpha) * (t_col_diff_base(
i) * t_u(
i));
1263 locMat(rr, cc) +=
1264 (t_row_diff_base(
i) * t_grad_g(
i)) * (t_col_base * m_dh);
1265
1266 ++t_col_base;
1267 ++t_col_diff_base;
1268 }
1269
1270 ++t_row_base;
1271 ++t_row_diff_base;
1272 }
1273
1274 for (; rr < nbRowBaseFunctions; ++rr) {
1275 ++t_row_base;
1276 ++t_row_diff_base;
1277 }
1278
1279 ++t_u;
1280 ++t_h;
1281 ++t_grad_g;
1282 ++t_w;
1283 ++t_coords;
1284 }
1285 }
1286
1288 }
#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()
auto cylindrical
[cylindrical]
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
constexpr IntegrationType I