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