#include <users_modules/tutorials/cor-2to5/src/PoissonOperators.hpp>
|
| OpKt (boost::function< double(const double)> a, boost::function< double(const double)> diff_a, boost::shared_ptr< VectorDouble > &field_vals, boost::shared_ptr< MatrixDouble > &grad_vals) |
|
| OpK (bool symm=true) |
|
MoFEMErrorCode | doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data) |
| Do calculations for give operator. More...
|
|
|
MoFEMErrorCode | iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data) |
| Integrate grad-grad operator. More...
|
|
virtual MoFEMErrorCode | iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data) |
| Integrate grad-grad operator. More...
|
|
virtual MoFEMErrorCode | aSsemble (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data) |
| Assemble local entity block matrix. More...
|
|
Definition at line 585 of file PoissonOperators.hpp.
◆ OpKt()
PoissonExample::OpKt::OpKt |
( |
boost::function< double(const double)> |
a, |
|
|
boost::function< double(const double)> |
diff_a, |
|
|
boost::shared_ptr< VectorDouble > & |
field_vals, |
|
|
boost::shared_ptr< MatrixDouble > & |
grad_vals |
|
) |
| |
|
inline |
Definition at line 587 of file PoissonOperators.hpp.
boost::function< double(const double)> diffA
boost::shared_ptr< MatrixDouble > gradVals
boost::shared_ptr< VectorDouble > fieldVals
boost::function< double(const double)> A
◆ iNtegrate()
MoFEMErrorCode PoissonExample::OpKt::iNtegrate |
( |
EntitiesFieldData::EntData & |
row_data, |
|
|
EntitiesFieldData::EntData & |
col_data |
|
) |
| |
|
inlineprotectedvirtual |
Integrate grad-grad operator.
- Parameters
-
row_data | row data (consist base functions on row entity) |
col_data | column data (consist base functions on column entity) |
- Returns
- error code
Reimplemented from PoissonExample::OpK.
- Examples
- PoissonOperators.hpp.
Definition at line 601 of file PoissonOperators.hpp.
602 {
604
606
608
609 double vol = getVolume();
610
611 auto t_w = getFTensor0IntegrationWeight();
612
613 auto t_u = getFTensor0FromVec(*
fieldVals);
614
615 auto t_grad = getFTensor1FromMat<3>(*
gradVals);
616
617 auto t_row_grad = row_data.getFTensor1DiffN<3>();
618
620
621 const double alpha = t_w * vol;
622 const double beta =
alpha *
A(t_u);
625
628
629 for (
int rr = 0; rr !=
nbRows; rr++) {
630
631 auto t_col = col_data.getFTensor0N(gg, 0);
632
633 auto t_col_grad = col_data.getFTensor1DiffN<3>(gg, 0);
634
635 for (
int cc = 0; cc !=
nbCols; cc++) {
636
637 a += (t_row_grad(
i) * beta) * t_col_grad(
i) +
638 t_row_grad(
i) * (t_gamma(
i) * t_col);
639 ++t_col;
640 ++t_col_grad;
642 }
643 ++t_row_grad;
644
645 }
646 ++t_w;
647 ++t_u;
648 ++t_grad;
649 }
651 }
#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()
int nbCols
number if dof on column
MatrixDouble locMat
local entity block matrix
int nbIntegrationPts
number of integration points
FTensor::Index< 'i', 3 > i
summit Index
boost::function<double(const double)> PoissonExample::OpKt::A |
|
protected |
◆ diffA
boost::function<double(const double)> PoissonExample::OpKt::diffA |
|
protected |
◆ fieldVals
boost::shared_ptr<VectorDouble> PoissonExample::OpKt::fieldVals |
|
protected |
◆ gradVals
boost::shared_ptr<MatrixDouble> PoissonExample::OpKt::gradVals |
|
protected |
The documentation for this struct was generated from the following file: