354 {
357 if (
entsPtr->find(BoundaryEleOp::getFEEntityHandle()) ==
entsPtr->end())
359 }
360 const double area = getMeasure();
361
362 const auto row_size = data.getIndices().size();
363 if (row_size == 0)
365
366 auto integrate = [&](auto col_indicies, auto &col_diff_base_functions) {
368
369 const auto col_size = col_indicies.size();
370
371 locMat.resize(row_size, col_size,
false);
373 int nb_gp = getGaussPts().size2();
374 int nb_rows = data.getIndices().size();
375
376 auto t_w = getFTensor0IntegrationWeight();
377 auto t_coords = getFTensor1CoordsAtGaussPts();
378 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
379 auto t_row_base = data.getFTensor0N();
380 int nb_row_base_functions = data.getN().size2();
381
383
384 for (int gg = 0; gg != nb_gp; ++gg) {
385
386 const double r = t_coords(0);
388 const double h_grad_norm = sqrt(t_grad_h(
i) * t_grad_h(
i) +
eps);
389 const double one_over_h_grad_norm = 1. / h_grad_norm;
390 const double beta = s * alpha *
eta2 * one_over_h_grad_norm *
392
393 int rr = 0;
394 for (; rr != nb_rows; ++rr) {
395 const double delta = beta * t_row_base;
396
397 auto ptr = &col_diff_base_functions(gg, 0);
398 auto t_col_diff_base = getFTensor1FromPtr<SPACE_DIM>(ptr);
399
400 for (int cc = 0; cc != col_size; ++cc) {
401 locMat(rr, cc) += t_col_diff_base(
i) * (
delta * t_grad_h(
i));
402 ++t_col_diff_base;
403 }
404 ++t_row_base;
405 }
406
407 for (; rr < nb_row_base_functions; ++rr) {
408 ++t_row_base;
409 }
410
411 ++t_grad_h;
412 ++t_w;
413 ++t_coords;
414 }
415
417 };
418
420
421 auto &col_ind = (*colIndicesPtr)[
c];
422 if (col_ind.size()) {
423 auto &diff_base = (*colDiffBaseFunctionsPtr)[
c];
424
425 CHKERR integrate(col_ind, diff_base);
426
428 &*data.getIndices().begin(), col_ind.size(),
429 &*col_ind.begin(), &
locMat(0, 0), ADD_VALUES);
430 }
431 }
432
434 }
#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 cylindrical
[cylindrical]
auto wetting_angle_sub_stepping
[cylindrical]
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