260 {
263 if (
entsPtr->find(BoundaryEleOp::getFEEntityHandle()) ==
entsPtr->end())
265 }
266 const double area = getMeasure();
267
268 const auto row_size = data.getIndices().size();
269 if (row_size == 0)
271
272 auto integrate = [&](auto col_indicies, auto &col_diff_base_functions) {
274
275 const auto col_size = col_indicies.size();
276
277 locMat.resize(row_size, col_size,
false);
279 int nb_gp = getGaussPts().size2();
280 int nb_rows = data.getIndices().size();
281
282 auto t_w = getFTensor0IntegrationWeight();
283 auto t_coords = getFTensor1CoordsAtGaussPts();
284 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
285 auto t_row_base = data.getFTensor0N();
286 int nb_row_base_functions = data.getN().size2();
287
289
290 for (int gg = 0; gg != nb_gp; ++gg) {
291
292 const double r = t_coords(0);
294 const double h_grad_norm = sqrt(t_grad_h(
i) * t_grad_h(
i) +
eps);
295 const double one_over_h_grad_norm = 1. / h_grad_norm;
296 const double beta = s * alpha *
eta2 * one_over_h_grad_norm *
298
299 int rr = 0;
300 for (; rr != nb_rows; ++rr) {
301 const double delta = beta * t_row_base;
302
303 auto ptr = &col_diff_base_functions(gg, 0);
304 auto t_col_diff_base = getFTensor1FromPtr<SPACE_DIM>(ptr);
305
306 for (int cc = 0; cc != col_size; ++cc) {
307 locMat(rr, cc) += t_col_diff_base(
i) * (
delta * t_grad_h(
i));
308 ++t_col_diff_base;
309 }
310 ++t_row_base;
311 }
312
313 for (; rr < nb_row_base_functions; ++rr) {
314 ++t_row_base;
315 }
316
317 ++t_grad_h;
318 ++t_w;
319 ++t_coords;
320 }
321
323 };
324
326
327 auto &col_ind = (*colIndicesPtr)[
c];
328 if (col_ind.size()) {
329 auto &diff_base = (*colDiffBaseFunctionsPtr)[
c];
330
331 CHKERR integrate(col_ind, diff_base);
332
334 &*data.getIndices().begin(), col_ind.size(),
335 &*col_ind.begin(), &
locMat(0, 0), ADD_VALUES);
336 }
337 }
338
340 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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.
auto wetting_angle_sub_stepping
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
static constexpr double delta