|
| v0.14.0
|
Operator the left hand side matrix.
More...
Operator the left hand side matrix.
- Examples
- plate.cpp.
Definition at line 120 of file plate.cpp.
◆ OpH1LhsSkeleton()
OpH1LhsSkeleton::OpH1LhsSkeleton |
( |
boost::shared_ptr< FaceSideEle > |
side_fe_ptr, |
|
|
boost::shared_ptr< MatrixDouble > |
mat_d_ptr |
|
) |
| |
◆ doWork()
- Examples
- plate.cpp.
Definition at line 510 of file plate.cpp.
516 const auto in_the_loop =
524 auto t_normal = getFTensor1Normal();
525 t_normal.normalize();
529 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*
dMatPtr);
532 const size_t nb_integration_pts = getGaussPts().size2();
536 const double beta =
static_cast<double>(
nitsche) / (in_the_loop + 1);
538 auto integrate = [&](
auto sense_row,
auto &row_ind,
auto &row_diff,
539 auto &row_diff2,
auto sense_col,
auto &col_ind,
540 auto &col_diff,
auto &col_diff2) {
545 const auto nb_rows = row_ind.size();
546 const auto nb_cols = col_ind.size();
548 const auto nb_row_base_functions = row_diff.size2() /
SPACE_DIM;
553 locMat.resize(nb_rows, nb_cols,
false);
560 auto t_w = getFTensor0IntegrationWeight();
563 for (
size_t gg = 0; gg != nb_integration_pts; ++gg) {
567 const double alpha = getMeasure() * t_w;
568 auto t_mat =
locMat.data().begin();
572 for (; rr != nb_rows; ++rr) {
575 t_mv(
i,
j) = t_D(
i,
j,
k,
l) * t_diff2_row_base(
k,
l);
579 t_vn_plus(
i,
j) = beta * (
phi * t_mv(
i,
j) / p);
581 t_vn(
i,
j) = (t_diff_row_base(
j) * (t_normal(
i) * sense_row)) -
589 for (
size_t cc = 0; cc != nb_cols; ++cc) {
592 t_mu(
i,
j) = t_D(
i,
j,
k,
l) * t_diff2_col_base(
k,
l);
596 t_un(
i,
j) = -p * ((t_diff_col_base(
j) * (t_normal(
i) * sense_col) -
597 beta * t_mu(
i,
j) / p));
600 *t_mat -= alpha * (t_vn(
i,
j) * t_un(
i,
j));
601 *t_mat -= alpha * (t_vn_plus(
i,
j) * (beta * t_mu(
i,
j)));
619 for (; rr < nb_row_base_functions; ++rr) {
629 col_ind.size(), &*col_ind.begin(),
630 &*
locMat.data().begin(), ADD_VALUES);
639 const auto sense_row =
senseMap[s0];
644 const auto sense_col =
senseMap[s1];
◆ dMatPtr
boost::shared_ptr<MatrixDouble> OpH1LhsSkeleton::dMatPtr |
|
private |
◆ locMat
MatrixDouble OpH1LhsSkeleton::locMat |
|
private |
◆ sideFEPtr
boost::shared_ptr<FaceSideEle> OpH1LhsSkeleton::sideFEPtr |
|
private |
pointer to element to get data on edge/face sides
- Examples
- plate.cpp.
Definition at line 135 of file plate.cpp.
The documentation for this struct was generated from the following file:
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
std::array< int, 2 > senseMap
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
boost::shared_ptr< FaceSideEle > sideFEPtr
pointer to element to get data on edge/face sides
FTensor::Index< 'k', SPACE_DIM > k
constexpr int SPACE_DIM
dimension of space
FTensor::Index< 'l', SPACE_DIM > l
std::array< std::vector< MatrixDouble >, 2 > diff2BaseSideMap
auto get_diff_ntensor(T &base_mat)
std::array< std::vector< VectorInt >, 2 > indicesSideMap
indices on rows for left hand-side
#define CHKERR
Inline error check.
MatrixDouble locMat
local operator matrix
FTensor::Index< 'i', SPACE_DIM > i
std::array< double, 2 > areaMap
boost::shared_ptr< MatrixDouble > dMatPtr
std::array< std::vector< MatrixDouble >, 2 > diffBaseSideMap
auto get_diff2_ntensor(T &base_mat)
FTensor::Index< 'j', SPACE_DIM > j
#define MoFEMFunctionBeginHot
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()
BoundaryEle::UserDataOperator BoundaryEleOp
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...