v0.14.0
Public Member Functions | Public Attributes | Friends | List of all members
ConstrainMatrixCtx Struct Reference

structure for projection matrices More...

#include <users_modules/basic_finite_elements/src/ConstrainMatrixCtx.hpp>

Collaboration diagram for ConstrainMatrixCtx:
[legend]

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::InterfacemField
 
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 ()
 

Detailed Description

structure for projection matrices

Definition at line 16 of file ConstrainMatrixCtx.hpp.

Constructor & Destructor Documentation

◆ ConstrainMatrixCtx() [1/2]

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

Parameters
x_problemproblem on which vector is projected
y_problemproblem used to construct projection matrices
create_kspcreate ksp solver otherwise user need to set it up

◆ ConstrainMatrixCtx() [2/2]

ConstrainMatrixCtx::ConstrainMatrixCtx ( MoFEM::Interface m_field,
VecScatter  scatter,
bool  create_ksp = true,
bool  own_contrain_matrix = false 
)

◆ ~ConstrainMatrixCtx()

virtual ConstrainMatrixCtx::~ConstrainMatrixCtx ( )
inlinevirtual

Definition at line 59 of file ConstrainMatrixCtx.hpp.

59  {
60  ierr = destroyQorP();
61  CHKERRABORT(mField.get_comm(), ierr);
62  ierr = destroyQTKQ();
63  CHKERRABORT(mField.get_comm(), ierr);
64  if (ownConstrainMatrix) {
65  ierr = MatDestroy(&C);
66  CHKERRABORT(mField.get_comm(), ierr);
67  }
68  };

Member Function Documentation

◆ destroyQorP()

MoFEMErrorCode ConstrainMatrixCtx::destroyQorP ( )

destroy sub-matrices used for shell matrices P, Q, R, RT

◆ destroyQTKQ()

MoFEMErrorCode ConstrainMatrixCtx::destroyQTKQ ( )

destroy sub-matrices used for shell matrix QTKQ

◆ initializeQorP()

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

Parameters
xis a vector from problem x

◆ initializeQTKQ()

MoFEMErrorCode ConstrainMatrixCtx::initializeQTKQ ( )

initialize vectors and matrices for CTC+QTKQ shell matrices, scattering is set based on x_problem and y_problem

◆ recalculateCTandCCT()

MoFEMErrorCode ConstrainMatrixCtx::recalculateCTandCCT ( )

re-calculate CT and CCT if C matrix has been changed since initialization

◆ recalculateCTC()

MoFEMErrorCode ConstrainMatrixCtx::recalculateCTC ( )

re-calculate CTC matrix has been changed since initialization

Friends And Related Function Documentation

◆ ConstrainMatrixDestroyOpPorQ

MoFEMErrorCode ConstrainMatrixDestroyOpPorQ ( )
friend

◆ ConstrainMatrixDestroyOpQTKQ

MoFEMErrorCode ConstrainMatrixDestroyOpQTKQ ( )
friend

◆ ConstrainMatrixMultOpCTC_QTKQ

MoFEMErrorCode ConstrainMatrixMultOpCTC_QTKQ ( Mat  CTC_QTKQ,
Vec  x,
Vec  f 
)
friend

Multiplication operator for RT = (CCT)^-TC.

Mat CTC_QTKQ; //for problem
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
MatCreateShell(PETSC_COMM_WORLD,m,m,M,M,&projection_matrix_ctx,&CTC_QTKQ);
MatShellSetOperation(CTC_QTKQ,MATOP_MULT,(void(*)(void))ConstrainMatrixMultOpCTC_QTKQ);
MatShellSetOperation(CTC_QTKQ,MATOP_DESTROY,(void(*)(void))ConstrainMatrixDestroyOpQTKQ);

Definition at line 261 of file ConstrainMatrixCtx.cpp.

261  {
263  void *void_ctx;
264  CHKERR MatShellGetContext(CTC_QTKQ, &void_ctx);
265  ConstrainMatrixCtx *ctx = (ConstrainMatrixCtx *)void_ctx;
266  PetscLogEventBegin(ctx->MOFEM_EVENT_projCTC_QTKQ, 0, 0, 0, 0);
267  Mat Q;
268  int M, N, m, n;
269  CHKERR MatGetSize(ctx->K, &M, &N);
270  CHKERR MatGetLocalSize(ctx->K, &m, &n);
271  CHKERR MatCreateShell(ctx->mField.get_comm(), m, n, M, N, ctx, &Q);
272  CHKERR MatShellSetOperation(Q, MATOP_MULT,
273  (void (*)(void))ProjectionMatrixMultOpQ);
274  CHKERR ctx->initializeQTKQ();
275  CHKERR MatMult(Q, x, ctx->Qx);
276  CHKERR MatMult(ctx->K, ctx->Qx, ctx->KQx);
277  CHKERR MatMult(Q, ctx->KQx, f);
278  CHKERR VecScatterBegin(ctx->sCatter, x, ctx->X, INSERT_VALUES,
279  SCATTER_FORWARD);
280  CHKERR VecScatterEnd(ctx->sCatter, x, ctx->X, INSERT_VALUES, SCATTER_FORWARD);
281  CHKERR MatMult(ctx->CTC, ctx->X, ctx->CTCx);
282  CHKERR VecScatterBegin(ctx->sCatter, ctx->CTCx, f, ADD_VALUES,
283  SCATTER_REVERSE);
284  CHKERR VecScatterEnd(ctx->sCatter, ctx->CTCx, f, ADD_VALUES, SCATTER_REVERSE);
285  CHKERR MatDestroy(&Q);
286  PetscLogEventEnd(ctx->MOFEM_EVENT_projCTC_QTKQ, 0, 0, 0, 0);
288 }

◆ ConstrainMatrixMultOpP

MoFEMErrorCode ConstrainMatrixMultOpP ( Mat  P,
Vec  x,
Vec  f 
)
friend

Multiplication operator for P = CT(CCT)^-1C.

Mat P; //for problem
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,m,m,M,M,&projection_matrix_ctx,&P);
MatShellSetOperation(P,MATOP_MULT,(void(*)(void))ConstrainMatrixMultOpP);

Definition at line 197 of file ConstrainMatrixCtx.cpp.

197  {
199  void *void_ctx;
200  CHKERR MatShellGetContext(P, &void_ctx);
201  ConstrainMatrixCtx *ctx = (ConstrainMatrixCtx *)void_ctx;
202  PetscLogEventBegin(ctx->MOFEM_EVENT_projP, 0, 0, 0, 0);
203  CHKERR ctx->initializeQorP(x);
204  CHKERR VecScatterBegin(ctx->sCatter, x, ctx->X, INSERT_VALUES,
205  SCATTER_FORWARD);
206  CHKERR VecScatterEnd(ctx->sCatter, x, ctx->X, INSERT_VALUES, SCATTER_FORWARD);
207  CHKERR MatMult(ctx->C, ctx->X, ctx->Cx);
208  CHKERR KSPSolve(ctx->kSP, ctx->Cx, ctx->CCTm1_Cx);
209  CHKERR MatMult(ctx->CT, ctx->CCTm1_Cx, ctx->CT_CCTm1_Cx);
210  CHKERR VecZeroEntries(f);
211  CHKERR VecGhostUpdateBegin(f, INSERT_VALUES, SCATTER_FORWARD);
212  CHKERR VecGhostUpdateEnd(f, INSERT_VALUES, SCATTER_FORWARD);
213  CHKERR VecScatterBegin(ctx->sCatter, ctx->CT_CCTm1_Cx, f, INSERT_VALUES,
214  SCATTER_REVERSE);
215  CHKERR VecScatterEnd(ctx->sCatter, ctx->CT_CCTm1_Cx, f, INSERT_VALUES,
216  SCATTER_REVERSE);
217  PetscLogEventEnd(ctx->MOFEM_EVENT_projP, 0, 0, 0, 0);
219 }

◆ ConstrainMatrixMultOpR

MoFEMErrorCode ConstrainMatrixMultOpR ( Mat  R,
Vec  x,
Vec  f 
)
friend

Multiplication operator for R = CT(CCT)^-1.

Mat R; //for problem
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,m,m,M,M,&projection_matrix_ctx,&R);
MatShellSetOperation(R,MATOP_MULT,(void(*)(void))ConstrainMatrixMultOpR);

Definition at line 221 of file ConstrainMatrixCtx.cpp.

221  {
223  void *void_ctx;
224  CHKERR MatShellGetContext(R, &void_ctx);
225  ConstrainMatrixCtx *ctx = (ConstrainMatrixCtx *)void_ctx;
226  PetscLogEventBegin(ctx->MOFEM_EVENT_projR, 0, 0, 0, 0);
227  if (ctx->initQorP)
228  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
229  "you have to call first initQorP or use Q matrix");
230  CHKERR KSPSolve(ctx->kSP, x, ctx->CCTm1_Cx);
231  CHKERR MatMult(ctx->CT, ctx->CCTm1_Cx, ctx->CT_CCTm1_Cx);
232  CHKERR VecZeroEntries(f);
233  CHKERR VecGhostUpdateBegin(f, INSERT_VALUES, SCATTER_FORWARD);
234  CHKERR VecGhostUpdateEnd(f, INSERT_VALUES, SCATTER_FORWARD);
235  CHKERR VecScatterBegin(ctx->sCatter, ctx->CT_CCTm1_Cx, f, INSERT_VALUES,
236  SCATTER_REVERSE);
237  CHKERR VecScatterEnd(ctx->sCatter, ctx->CT_CCTm1_Cx, f, INSERT_VALUES,
238  SCATTER_REVERSE);
239  PetscLogEventEnd(ctx->MOFEM_EVENT_projR, 0, 0, 0, 0);
241 }

◆ ConstrainMatrixMultOpRT

MoFEMErrorCode ConstrainMatrixMultOpRT ( Mat  RT,
Vec  x,
Vec  f 
)
friend

Multiplication operator for RT = (CCT)^-TC.

Mat RT; //for problem
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,m,m,M,M,&projection_matrix_ctx,&RT);
MatShellSetOperation(RT,MATOP_MULT,(void(*)(void))ConstrainMatrixMultOpRT);

Definition at line 243 of file ConstrainMatrixCtx.cpp.

243  {
245  void *void_ctx;
246  CHKERR MatShellGetContext(RT, &void_ctx);
247  ConstrainMatrixCtx *ctx = (ConstrainMatrixCtx *)void_ctx;
248  PetscLogEventBegin(ctx->MOFEM_EVENT_projRT, 0, 0, 0, 0);
249  if (ctx->initQorP)
250  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
251  "you have to call first initQorP or use Q matrix");
252  CHKERR VecScatterBegin(ctx->sCatter, x, ctx->X, INSERT_VALUES,
253  SCATTER_FORWARD);
254  CHKERR VecScatterEnd(ctx->sCatter, x, ctx->X, INSERT_VALUES, SCATTER_FORWARD);
255  CHKERR MatMult(ctx->C, ctx->X, ctx->Cx);
256  CHKERR KSPSolve(ctx->kSP, ctx->Cx, f);
257  PetscLogEventEnd(ctx->MOFEM_EVENT_projRT, 0, 0, 0, 0);
259 }

◆ ProjectionMatrixMultOpQ

MoFEMErrorCode ProjectionMatrixMultOpQ ( Mat  Q,
Vec  x,
Vec  f 
)
friend

Multiplication operator for Q = I-CTC(CCT)^-1C.

Mat Q; //for problem
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,m,m,M,M,&projection_matrix_ctx,&Q);
MatShellSetOperation(Q,MATOP_MULT,(void(*)(void))ProjectionMatrixMultOpQ);
MatShellSetOperation(Q,MATOP_DESTROY,(void(*)(void))ConstrainMatrixDestroyOpPorQ);

Definition at line 163 of file ConstrainMatrixCtx.cpp.

163  {
165  void *void_ctx;
166  CHKERR MatShellGetContext(Q, &void_ctx);
167  ConstrainMatrixCtx *ctx = (ConstrainMatrixCtx *)void_ctx;
168  PetscLogEventBegin(ctx->MOFEM_EVENT_projQ, 0, 0, 0, 0);
169  CHKERR ctx->initializeQorP(x);
170  CHKERR VecCopy(x, f);
171  CHKERR VecScatterBegin(ctx->sCatter, x, ctx->X, INSERT_VALUES,
172  SCATTER_FORWARD);
173  CHKERR VecScatterEnd(ctx->sCatter, x, ctx->X, INSERT_VALUES, SCATTER_FORWARD);
174  if (debug) {
175  // CHKERR VecView(ctx->X,PETSC_VIEWER_STDOUT_WORLD);
176  CHKERR VecScatterBegin(ctx->sCatter, ctx->X, f, INSERT_VALUES,
177  SCATTER_REVERSE);
178  CHKERR VecScatterEnd(ctx->sCatter, ctx->X, f, INSERT_VALUES,
179  SCATTER_REVERSE);
180  PetscBool flg;
181  CHKERR VecEqual(x, f, &flg);
182  if (flg == PETSC_FALSE)
183  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "scatter is not working");
184  }
185  CHKERR MatMult(ctx->C, ctx->X, ctx->Cx);
186  CHKERR KSPSolve(ctx->kSP, ctx->Cx, ctx->CCTm1_Cx);
187  CHKERR MatMult(ctx->CT, ctx->CCTm1_Cx, ctx->CT_CCTm1_Cx);
188  CHKERR VecScale(ctx->CT_CCTm1_Cx, -1);
189  CHKERR VecScatterBegin(ctx->sCatter, ctx->CT_CCTm1_Cx, f, ADD_VALUES,
190  SCATTER_REVERSE);
191  CHKERR VecScatterEnd(ctx->sCatter, ctx->CT_CCTm1_Cx, f, ADD_VALUES,
192  SCATTER_REVERSE);
193  PetscLogEventEnd(ctx->MOFEM_EVENT_projQ, 0, 0, 0, 0);
195 }

Member Data Documentation

◆ absTol

PetscReal ConstrainMatrixCtx::absTol

Definition at line 70 of file ConstrainMatrixCtx.hpp.

◆ C

Mat ConstrainMatrixCtx::C

Definition at line 21 of file ConstrainMatrixCtx.hpp.

◆ cancelKSPMonitor

bool ConstrainMatrixCtx::cancelKSPMonitor

Definition at line 27 of file ConstrainMatrixCtx.hpp.

◆ CCT

Mat ConstrainMatrixCtx::CCT

Definition at line 21 of file ConstrainMatrixCtx.hpp.

◆ CCTm1_Cx

Vec ConstrainMatrixCtx::CCTm1_Cx

Definition at line 22 of file ConstrainMatrixCtx.hpp.

◆ createKSP

bool ConstrainMatrixCtx::createKSP

Definition at line 25 of file ConstrainMatrixCtx.hpp.

◆ createScatter

bool ConstrainMatrixCtx::createScatter

Definition at line 26 of file ConstrainMatrixCtx.hpp.

◆ CT

Mat ConstrainMatrixCtx::CT

Definition at line 21 of file ConstrainMatrixCtx.hpp.

◆ CT_CCTm1_Cx

Vec ConstrainMatrixCtx::CT_CCTm1_Cx

Definition at line 22 of file ConstrainMatrixCtx.hpp.

◆ CTC

Mat ConstrainMatrixCtx::CTC

Definition at line 21 of file ConstrainMatrixCtx.hpp.

◆ CTCx

Vec ConstrainMatrixCtx::CTCx

Definition at line 22 of file ConstrainMatrixCtx.hpp.

◆ Cx

Vec ConstrainMatrixCtx::Cx

Definition at line 22 of file ConstrainMatrixCtx.hpp.

◆ dTol

PetscReal ConstrainMatrixCtx::dTol

Definition at line 70 of file ConstrainMatrixCtx.hpp.

◆ initQorP

bool ConstrainMatrixCtx::initQorP

Definition at line 24 of file ConstrainMatrixCtx.hpp.

◆ initQTKQ

bool ConstrainMatrixCtx::initQTKQ

Definition at line 24 of file ConstrainMatrixCtx.hpp.

◆ K

Mat ConstrainMatrixCtx::K

Definition at line 21 of file ConstrainMatrixCtx.hpp.

◆ KQx

Vec ConstrainMatrixCtx::KQx

Definition at line 23 of file ConstrainMatrixCtx.hpp.

◆ kSP

KSP ConstrainMatrixCtx::kSP

Definition at line 20 of file ConstrainMatrixCtx.hpp.

◆ maxIts

PetscInt ConstrainMatrixCtx::maxIts

Definition at line 71 of file ConstrainMatrixCtx.hpp.

◆ mField

MoFEM::Interface& ConstrainMatrixCtx::mField

Definition at line 18 of file ConstrainMatrixCtx.hpp.

◆ MOFEM_EVENT_projCTC_QTKQ

PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projCTC_QTKQ

Definition at line 41 of file ConstrainMatrixCtx.hpp.

◆ MOFEM_EVENT_projInit

PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projInit

Definition at line 36 of file ConstrainMatrixCtx.hpp.

◆ MOFEM_EVENT_projP

PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projP

Definition at line 38 of file ConstrainMatrixCtx.hpp.

◆ MOFEM_EVENT_projQ

PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projQ

Definition at line 37 of file ConstrainMatrixCtx.hpp.

◆ MOFEM_EVENT_projR

PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projR

Definition at line 39 of file ConstrainMatrixCtx.hpp.

◆ MOFEM_EVENT_projRT

PetscLogEvent ConstrainMatrixCtx::MOFEM_EVENT_projRT

Definition at line 40 of file ConstrainMatrixCtx.hpp.

◆ ownConstrainMatrix

bool ConstrainMatrixCtx::ownConstrainMatrix

Definition at line 28 of file ConstrainMatrixCtx.hpp.

◆ Qx

Vec ConstrainMatrixCtx::Qx

Definition at line 23 of file ConstrainMatrixCtx.hpp.

◆ rTol

PetscReal ConstrainMatrixCtx::rTol

Definition at line 68 of file ConstrainMatrixCtx.hpp.

◆ sCatter

VecScatter ConstrainMatrixCtx::sCatter

Definition at line 33 of file ConstrainMatrixCtx.hpp.

◆ X

Vec ConstrainMatrixCtx::X

Definition at line 23 of file ConstrainMatrixCtx.hpp.

◆ xProblem

string ConstrainMatrixCtx::xProblem

Definition at line 34 of file ConstrainMatrixCtx.hpp.

◆ yProblem

string ConstrainMatrixCtx::yProblem

Definition at line 34 of file ConstrainMatrixCtx.hpp.


The documentation for this struct was generated from the following file:
ConstrainMatrixCtx::initializeQorP
MoFEMErrorCode initializeQorP(Vec x)
initialize vectors and matrices for Q and P shell matrices, scattering is set based on x_problem and ...
ConstrainMatrixCtx::KQx
Vec KQx
Definition: ConstrainMatrixCtx.hpp:23
ConstrainMatrixCtx::destroyQorP
MoFEMErrorCode destroyQorP()
destroy sub-matrices used for shell matrices P, Q, R, RT
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
ConstrainMatrixCtx::MOFEM_EVENT_projCTC_QTKQ
PetscLogEvent MOFEM_EVENT_projCTC_QTKQ
Definition: ConstrainMatrixCtx.hpp:41
ConstrainMatrixCtx::ConstrainMatrixMultOpCTC_QTKQ
friend MoFEMErrorCode ConstrainMatrixMultOpCTC_QTKQ(Mat CTC_QTKQ, Vec x, Vec f)
Multiplication operator for RT = (CCT)^-TC.
Definition: ConstrainMatrixCtx.cpp:261
ConstrainMatrixCtx::ConstrainMatrixMultOpRT
friend MoFEMErrorCode ConstrainMatrixMultOpRT(Mat RT, Vec x, Vec f)
Multiplication operator for RT = (CCT)^-TC.
Definition: ConstrainMatrixCtx.cpp:243
ConstrainMatrixCtx::X
Vec X
Definition: ConstrainMatrixCtx.hpp:23
ConstrainMatrixCtx::C
Mat C
Definition: ConstrainMatrixCtx.hpp:21
ConstrainMatrixCtx::K
Mat K
Definition: ConstrainMatrixCtx.hpp:21
MOFEM_IMPOSSIBLE_CASE
@ MOFEM_IMPOSSIBLE_CASE
Definition: definitions.h:35
ConstrainMatrixCtx::kSP
KSP kSP
Definition: ConstrainMatrixCtx.hpp:20
ConstrainMatrixCtx::initQorP
bool initQorP
Definition: ConstrainMatrixCtx.hpp:24
ConstrainMatrixCtx::ConstrainMatrixDestroyOpPorQ
friend MoFEMErrorCode ConstrainMatrixDestroyOpPorQ()
ConstrainMatrixCtx::destroyQTKQ
MoFEMErrorCode destroyQTKQ()
destroy sub-matrices used for shell matrix QTKQ
PlasticOps::M
FTensor::Index< 'M', 3 > M
Definition: PlasticOps.hpp:117
ConstrainMatrixCtx::ConstrainMatrixMultOpR
friend MoFEMErrorCode ConstrainMatrixMultOpR(Mat R, Vec x, Vec f)
Multiplication operator for R = CT(CCT)^-1.
Definition: ConstrainMatrixCtx.cpp:221
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
ConstrainMatrixCtx::Cx
Vec Cx
Definition: ConstrainMatrixCtx.hpp:22
ConstrainMatrixCtx::MOFEM_EVENT_projR
PetscLogEvent MOFEM_EVENT_projR
Definition: ConstrainMatrixCtx.hpp:39
ConstrainMatrixCtx::Qx
Vec Qx
Definition: ConstrainMatrixCtx.hpp:23
R
@ R
Definition: free_surface.cpp:394
ConstrainMatrixCtx::ConstrainMatrixMultOpP
friend MoFEMErrorCode ConstrainMatrixMultOpP(Mat P, Vec x, Vec f)
Multiplication operator for P = CT(CCT)^-1C.
Definition: ConstrainMatrixCtx.cpp:197
ConstrainMatrixCtx::ProjectionMatrixMultOpQ
friend MoFEMErrorCode ProjectionMatrixMultOpQ(Mat Q, Vec x, Vec f)
Multiplication operator for Q = I-CTC(CCT)^-1C.
Definition: ConstrainMatrixCtx.cpp:163
EshelbianPlasticity::P
@ P
Definition: EshelbianContact.cpp:197
ConstrainMatrixCtx::CT_CCTm1_Cx
Vec CT_CCTm1_Cx
Definition: ConstrainMatrixCtx.hpp:22
ConstrainMatrixCtx::sCatter
VecScatter sCatter
Definition: ConstrainMatrixCtx.hpp:33
ConstrainMatrixCtx::ownConstrainMatrix
bool ownConstrainMatrix
Definition: ConstrainMatrixCtx.hpp:28
ConstrainMatrixCtx::MOFEM_EVENT_projRT
PetscLogEvent MOFEM_EVENT_projRT
Definition: ConstrainMatrixCtx.hpp:40
ConstrainMatrixCtx::CTC
Mat CTC
Definition: ConstrainMatrixCtx.hpp:21
ConstrainMatrixCtx::CCTm1_Cx
Vec CCTm1_Cx
Definition: ConstrainMatrixCtx.hpp:22
ConstrainMatrixCtx::ConstrainMatrixDestroyOpQTKQ
friend MoFEMErrorCode ConstrainMatrixDestroyOpQTKQ()
convert.n
n
Definition: convert.py:82
ConstrainMatrixCtx::MOFEM_EVENT_projP
PetscLogEvent MOFEM_EVENT_projP
Definition: ConstrainMatrixCtx.hpp:38
N
const int N
Definition: speed_test.cpp:3
ConstrainMatrixCtx::CTCx
Vec CTCx
Definition: ConstrainMatrixCtx.hpp:22
HenckyOps::f
auto f
Definition: HenckyOps.hpp:15
debug
const static bool debug
Definition: ConstrainMatrixCtx.cpp:13
ConstrainMatrixCtx::mField
MoFEM::Interface & mField
Definition: ConstrainMatrixCtx.hpp:18
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
ConstrainMatrixCtx::MOFEM_EVENT_projQ
PetscLogEvent MOFEM_EVENT_projQ
Definition: ConstrainMatrixCtx.hpp:37
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
ConstrainMatrixCtx::CT
Mat CT
Definition: ConstrainMatrixCtx.hpp:21
ConstrainMatrixCtx
structure for projection matrices
Definition: ConstrainMatrixCtx.hpp:16
ConstrainMatrixCtx::initializeQTKQ
MoFEMErrorCode initializeQTKQ()
initialize vectors and matrices for CTC+QTKQ shell matrices, scattering is set based on x_problem and...
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359