v0.14.0 |
structure for projection matrices More...
#include <users_modules/basic_finite_elements/src/ConstrainMatrixCtx.hpp>
Public Member Functions | |
ConstrainMatrixCtx (MoFEM::Interface &m_field, string x_problem, string y_problem, bool create_ksp=true, bool own_contrain_matrix=false) | |
ConstrainMatrixCtx (MoFEM::Interface &m_field, VecScatter scatter, bool create_ksp=true, bool own_contrain_matrix=false) | |
virtual | ~ConstrainMatrixCtx () |
MoFEMErrorCode | initializeQorP (Vec x) |
initialize vectors and matrices for Q and P shell matrices, scattering is set based on x_problem and y_problem More... | |
MoFEMErrorCode | initializeQTKQ () |
initialize vectors and matrices for CTC+QTKQ shell matrices, scattering is set based on x_problem and y_problem More... | |
MoFEMErrorCode | recalculateCTandCCT () |
re-calculate CT and CCT if C matrix has been changed since initialization More... | |
MoFEMErrorCode | recalculateCTC () |
re-calculate CTC matrix has been changed since initialization More... | |
MoFEMErrorCode | destroyQorP () |
destroy sub-matrices used for shell matrices P, Q, R, RT More... | |
MoFEMErrorCode | destroyQTKQ () |
destroy sub-matrices used for shell matrix QTKQ More... | |
Public Attributes | |
MoFEM::Interface & | mField |
KSP | kSP |
Mat | C |
Mat | CT |
Mat | CCT |
Mat | CTC |
Mat | K |
Vec | Cx |
Vec | CCTm1_Cx |
Vec | CT_CCTm1_Cx |
Vec | CTCx |
Vec | X |
Vec | Qx |
Vec | KQx |
bool | initQorP |
bool | initQTKQ |
bool | createKSP |
bool | createScatter |
bool | cancelKSPMonitor |
bool | ownConstrainMatrix |
VecScatter | sCatter |
string | xProblem |
string | yProblem |
PetscLogEvent | MOFEM_EVENT_projInit |
PetscLogEvent | MOFEM_EVENT_projQ |
PetscLogEvent | MOFEM_EVENT_projP |
PetscLogEvent | MOFEM_EVENT_projR |
PetscLogEvent | MOFEM_EVENT_projRT |
PetscLogEvent | MOFEM_EVENT_projCTC_QTKQ |
PetscReal | rTol |
PetscReal | absTol |
PetscReal | dTol |
PetscInt | maxIts |
Friends | |
MoFEMErrorCode | ProjectionMatrixMultOpQ (Mat Q, Vec x, Vec f) |
Multiplication operator for Q = I-CTC(CCT)^-1C. More... | |
MoFEMErrorCode | ConstrainMatrixMultOpP (Mat P, Vec x, Vec f) |
Multiplication operator for P = CT(CCT)^-1C. More... | |
MoFEMErrorCode | ConstrainMatrixMultOpR (Mat R, Vec x, Vec f) |
Multiplication operator for R = CT(CCT)^-1. More... | |
MoFEMErrorCode | ConstrainMatrixMultOpRT (Mat RT, Vec x, Vec f) |
Multiplication operator for RT = (CCT)^-TC. More... | |
MoFEMErrorCode | ConstrainMatrixMultOpCTC_QTKQ (Mat CTC_QTKQ, Vec x, Vec f) |
Multiplication operator for RT = (CCT)^-TC. More... | |
MoFEMErrorCode | ConstrainMatrixDestroyOpPorQ () |
MoFEMErrorCode | ConstrainMatrixDestroyOpQTKQ () |
structure for projection matrices
Definition at line 16 of file ConstrainMatrixCtx.hpp.
ConstrainMatrixCtx::ConstrainMatrixCtx | ( | MoFEM::Interface & | m_field, |
string | x_problem, | ||
string | y_problem, | ||
bool | create_ksp = true , |
||
bool | own_contrain_matrix = false |
||
) |
Construct data structure to build operators for projection matrices
User need to set matrix C to make it work
x_problem | problem on which vector is projected |
y_problem | problem used to construct projection matrices |
create_ksp | create ksp solver otherwise user need to set it up |
Definition at line 23 of file ConstrainMatrixCtx.cpp.
ConstrainMatrixCtx::ConstrainMatrixCtx | ( | MoFEM::Interface & | m_field, |
VecScatter | scatter, | ||
bool | create_ksp = true , |
||
bool | own_contrain_matrix = false |
||
) |
Definition at line 37 of file ConstrainMatrixCtx.cpp.
|
inlinevirtual |
Definition at line 59 of file ConstrainMatrixCtx.hpp.
MoFEMErrorCode ConstrainMatrixCtx::destroyQorP | ( | ) |
destroy sub-matrices used for shell matrices P, Q, R, RT
Definition at line 98 of file ConstrainMatrixCtx.cpp.
MoFEMErrorCode ConstrainMatrixCtx::destroyQTKQ | ( | ) |
destroy sub-matrices used for shell matrix QTKQ
Definition at line 155 of file ConstrainMatrixCtx.cpp.
MoFEMErrorCode ConstrainMatrixCtx::initializeQorP | ( | Vec | x | ) |
initialize vectors and matrices for Q and P shell matrices, scattering is set based on x_problem and y_problem
x | is a vector from problem x |
Definition at line 49 of file ConstrainMatrixCtx.cpp.
MoFEMErrorCode ConstrainMatrixCtx::initializeQTKQ | ( | ) |
initialize vectors and matrices for CTC+QTKQ shell matrices, scattering is set based on x_problem and y_problem
Definition at line 118 of file ConstrainMatrixCtx.cpp.
MoFEMErrorCode ConstrainMatrixCtx::recalculateCTandCCT | ( | ) |
re-calculate CT and CCT if C matrix has been changed since initialization
Definition at line 89 of file ConstrainMatrixCtx.cpp.
MoFEMErrorCode ConstrainMatrixCtx::recalculateCTC | ( | ) |
re-calculate CTC matrix has been changed since initialization
Definition at line 147 of file ConstrainMatrixCtx.cpp.
|
friend |
|
friend |
|
friend |
Multiplication operator for RT = (CCT)^-TC.
Definition at line 265 of file ConstrainMatrixCtx.cpp.
|
friend |
Multiplication operator for P = CT(CCT)^-1C.
Definition at line 201 of file ConstrainMatrixCtx.cpp.
|
friend |
Multiplication operator for R = CT(CCT)^-1.
Definition at line 225 of file ConstrainMatrixCtx.cpp.
|
friend |
Multiplication operator for RT = (CCT)^-TC.
Definition at line 247 of file ConstrainMatrixCtx.cpp.
|
friend |
Multiplication operator for Q = I-CTC(CCT)^-1C.
Definition at line 167 of file ConstrainMatrixCtx.cpp.
PetscReal ConstrainMatrixCtx::absTol |
Definition at line 70 of file ConstrainMatrixCtx.hpp.
Mat ConstrainMatrixCtx::C |
Definition at line 21 of file ConstrainMatrixCtx.hpp.
bool ConstrainMatrixCtx::cancelKSPMonitor |
Definition at line 27 of file ConstrainMatrixCtx.hpp.
Mat ConstrainMatrixCtx::CCT |
Definition at line 21 of file ConstrainMatrixCtx.hpp.
Vec ConstrainMatrixCtx::CCTm1_Cx |
Definition at line 22 of file ConstrainMatrixCtx.hpp.
bool ConstrainMatrixCtx::createKSP |
Definition at line 25 of file ConstrainMatrixCtx.hpp.
bool ConstrainMatrixCtx::createScatter |
Definition at line 26 of file ConstrainMatrixCtx.hpp.
Mat ConstrainMatrixCtx::CT |
Definition at line 21 of file ConstrainMatrixCtx.hpp.
Vec ConstrainMatrixCtx::CT_CCTm1_Cx |
Definition at line 22 of file ConstrainMatrixCtx.hpp.
Mat ConstrainMatrixCtx::CTC |
Definition at line 21 of file ConstrainMatrixCtx.hpp.
Vec ConstrainMatrixCtx::CTCx |
Definition at line 22 of file ConstrainMatrixCtx.hpp.
Vec ConstrainMatrixCtx::Cx |
Definition at line 22 of file ConstrainMatrixCtx.hpp.
PetscReal ConstrainMatrixCtx::dTol |
Definition at line 70 of file ConstrainMatrixCtx.hpp.
bool ConstrainMatrixCtx::initQorP |
Definition at line 24 of file ConstrainMatrixCtx.hpp.
bool ConstrainMatrixCtx::initQTKQ |
Definition at line 24 of file ConstrainMatrixCtx.hpp.
Mat ConstrainMatrixCtx::K |
Definition at line 21 of file ConstrainMatrixCtx.hpp.
Vec ConstrainMatrixCtx::KQx |
Definition at line 23 of file ConstrainMatrixCtx.hpp.
KSP ConstrainMatrixCtx::kSP |
Definition at line 20 of file ConstrainMatrixCtx.hpp.
PetscInt ConstrainMatrixCtx::maxIts |
Definition at line 71 of file ConstrainMatrixCtx.hpp.
MoFEM::Interface& ConstrainMatrixCtx::mField |
Definition at line 18 of file ConstrainMatrixCtx.hpp.
PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projCTC_QTKQ |
Definition at line 41 of file ConstrainMatrixCtx.hpp.
PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projInit |
Definition at line 36 of file ConstrainMatrixCtx.hpp.
PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projP |
Definition at line 38 of file ConstrainMatrixCtx.hpp.
PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projQ |
Definition at line 37 of file ConstrainMatrixCtx.hpp.
PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projR |
Definition at line 39 of file ConstrainMatrixCtx.hpp.
PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projRT |
Definition at line 40 of file ConstrainMatrixCtx.hpp.
bool ConstrainMatrixCtx::ownConstrainMatrix |
Definition at line 28 of file ConstrainMatrixCtx.hpp.
Vec ConstrainMatrixCtx::Qx |
Definition at line 23 of file ConstrainMatrixCtx.hpp.
PetscReal ConstrainMatrixCtx::rTol |
Definition at line 68 of file ConstrainMatrixCtx.hpp.
VecScatter ConstrainMatrixCtx::sCatter |
Definition at line 33 of file ConstrainMatrixCtx.hpp.
Vec ConstrainMatrixCtx::X |
Definition at line 23 of file ConstrainMatrixCtx.hpp.
string ConstrainMatrixCtx::xProblem |
Definition at line 34 of file ConstrainMatrixCtx.hpp.
string ConstrainMatrixCtx::yProblem |
Definition at line 34 of file ConstrainMatrixCtx.hpp.