Operator the left hand side matrix.
More...
#include <tutorials/scl-11/src/PoissonDiscontinousGalerkin.hpp>
Operator the left hand side matrix.
- Examples
- poisson_2d_dis_galerkin.cpp.
Definition at line 115 of file PoissonDiscontinousGalerkin.hpp.
◆ OpL2LhsPenalty()
Poisson2DiscontGalerkinOperators::OpL2LhsPenalty::OpL2LhsPenalty |
( |
boost::shared_ptr< FaceSideEle > |
side_fe_ptr | ) |
|
|
inline |
◆ doWork()
MoFEMErrorCode Poisson2DiscontGalerkinOperators::OpL2LhsPenalty::doWork |
( |
int |
side, |
|
|
EntityType |
type, |
|
|
EntitiesFieldData::EntData & |
data |
|
) |
| |
|
inline |
- Examples
- PoissonDiscontinousGalerkin.hpp.
Definition at line 126 of file PoissonDiscontinousGalerkin.hpp.
132 const auto in_the_loop =
136 const std::array<std::string, 2> ele_type_name = {
"BOUNDARY",
"SKELETON"};
138 <<
"OpL2LhsPenalty inTheLoop " << ele_type_name[in_the_loop];
148 auto t_normal = getFTensor1Normal();
149 t_normal.normalize();
152 const size_t nb_integration_pts = getGaussPts().size2();
156 const double beta =
static_cast<double>(
nitsche) / (in_the_loop + 1);
167 const auto sense_row =
senseMap[s0];
174 const auto sense_col =
senseMap[s1];
181 locMat.resize(nb_rows, nb_cols,
false);
187 auto t_w = getFTensor0IntegrationWeight();
190 for (
size_t gg = 0; gg != nb_integration_pts; ++gg) {
194 const double alpha = getMeasure() * t_w;
195 auto t_mat =
locMat.data().begin();
199 for (; rr != nb_rows; ++rr) {
203 t_vn_plus(
i) = beta * (
phi * t_diff_row_base(
i) / p);
205 t_vn(
i) = t_row_base * t_normal(
i) * sense_row - t_vn_plus(
i);
209 auto t_diff_col_base =
213 for (
size_t cc = 0; cc != nb_cols; ++cc) {
217 t_un(
i) = -p * (t_col_base * t_normal(
i) * sense_col -
218 beta * t_diff_col_base(
i) / p);
221 *t_mat -= alpha * (t_vn(
i) * t_un(
i));
222 *t_mat -= alpha * (t_vn_plus(
i) * (beta * t_diff_col_base(
i)));
239 for (; rr < nb_row_base_functions; ++rr) {
252 &*
locMat.data().begin(), ADD_VALUES);
◆ locMat
MatrixDouble Poisson2DiscontGalerkinOperators::OpL2LhsPenalty::locMat |
|
private |
◆ sideFEPtr
boost::shared_ptr<FaceSideEle> Poisson2DiscontGalerkinOperators::OpL2LhsPenalty::sideFEPtr |
|
private |
The documentation for this struct was generated from the following file:
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.