|
| v0.14.0
|
|
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 (Mat Q) |
| Destroy shell matrix Q. More...
|
|
MoFEMErrorCode | ConstrainMatrixDestroyOpQTKQ (Mat QTKQ) |
| Destroy shell matrix. More...
|
|
◆ ConstrainMatrixDestroyOpPorQ()
Destroy shell matrix Q.
Mat Q;
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,
m,
m,
M,
M,&projection_matrix_ctx,&Q);
Definition at line 294 of file ConstrainMatrixCtx.cpp.
297 CHKERR MatShellGetContext(Q, &void_ctx);
◆ ConstrainMatrixDestroyOpQTKQ()
Destroy shell matrix.
Mat CTC_QTKQ;
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_DESTROY,(void(*)(void))mat_destroy_QTKQ);
Definition at line 302 of file ConstrainMatrixCtx.cpp.
305 CHKERR MatShellGetContext(QTKQ, &void_ctx);
◆ ConstrainMatrixMultOpCTC_QTKQ()
MoFEMErrorCode ConstrainMatrixMultOpCTC_QTKQ |
( |
Mat |
CTC_QTKQ, |
|
|
Vec |
x, |
|
|
Vec |
f |
|
) |
| |
Multiplication operator for RT = (CCT)^-TC.
Mat CTC_QTKQ;
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
MatCreateShell(PETSC_COMM_WORLD,
m,
m,
M,
M,&projection_matrix_ctx,&CTC_QTKQ);
Definition at line 265 of file ConstrainMatrixCtx.cpp.
268 CHKERR MatShellGetContext(CTC_QTKQ, &void_ctx);
276 CHKERR MatShellSetOperation(Q, MATOP_MULT,
284 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpP()
Multiplication operator for P = CT(CCT)^-1C.
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,
m,
m,
M,
M,&projection_matrix_ctx,&
P);
Definition at line 201 of file ConstrainMatrixCtx.cpp.
204 CHKERR MatShellGetContext(
P, &void_ctx);
210 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
215 CHKERR VecGhostUpdateBegin(
f, INSERT_VALUES, SCATTER_FORWARD);
216 CHKERR VecGhostUpdateEnd(
f, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpR()
Multiplication operator for R = CT(CCT)^-1.
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,
m,
m,
M,
M,&projection_matrix_ctx,&
R);
Definition at line 225 of file ConstrainMatrixCtx.cpp.
228 CHKERR MatShellGetContext(
R, &void_ctx);
233 "you have to call first initQorP or use Q matrix");
237 CHKERR VecGhostUpdateBegin(
f, INSERT_VALUES, SCATTER_FORWARD);
238 CHKERR VecGhostUpdateEnd(
f, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpRT()
Multiplication operator for RT = (CCT)^-TC.
Mat RT;
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,
m,
m,
M,
M,&projection_matrix_ctx,&RT);
Definition at line 247 of file ConstrainMatrixCtx.cpp.
250 CHKERR MatShellGetContext(RT, &void_ctx);
255 "you have to call first initQorP or use Q matrix");
258 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
◆ ProjectionMatrixMultOpQ()
Multiplication operator for Q = I-CTC(CCT)^-1C.
Mat Q;
projection_matrix_ctx(m_field,problem_name,contrains_problem_name);
CHKERR MatCreateShell(PETSC_COMM_WORLD,
m,
m,
M,
M,&projection_matrix_ctx,&Q);
Definition at line 167 of file ConstrainMatrixCtx.cpp.
170 CHKERR MatShellGetContext(Q, &void_ctx);
177 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
186 if (flg == PETSC_FALSE)
MoFEMErrorCode ConstrainMatrixMultOpCTC_QTKQ(Mat CTC_QTKQ, Vec x, Vec f)
Multiplication operator for RT = (CCT)^-TC.
MoFEMErrorCode initializeQorP(Vec x)
initialize vectors and matrices for Q and P shell matrices, scattering is set based on x_problem and ...
MoFEMErrorCode destroyQorP()
destroy sub-matrices used for shell matrices P, Q, R, RT
virtual MPI_Comm & get_comm() const =0
PetscLogEvent MOFEM_EVENT_projCTC_QTKQ
MoFEMErrorCode ConstrainMatrixDestroyOpPorQ(Mat Q)
Destroy shell matrix Q.
MoFEMErrorCode destroyQTKQ()
destroy sub-matrices used for shell matrix QTKQ
MoFEMErrorCode ConstrainMatrixMultOpRT(Mat RT, Vec x, Vec f)
Multiplication operator for RT = (CCT)^-TC.
FTensor::Index< 'M', 3 > M
#define CHKERR
Inline error check.
PetscLogEvent MOFEM_EVENT_projR
PetscLogEvent MOFEM_EVENT_projRT
PetscLogEvent MOFEM_EVENT_projP
MoFEMErrorCode ProjectionMatrixMultOpQ(Mat Q, Vec x, Vec f)
Multiplication operator for Q = I-CTC(CCT)^-1C.
MoFEM::Interface & mField
PetscLogEvent MOFEM_EVENT_projQ
FTensor::Index< 'm', 3 > m
structure for projection matrices
MoFEMErrorCode initializeQTKQ()
initialize vectors and matrices for CTC+QTKQ shell matrices, scattering is set based on x_problem and...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode ConstrainMatrixDestroyOpQTKQ(Mat QTKQ)
Destroy shell matrix.
MoFEMErrorCode ConstrainMatrixMultOpR(Mat R, Vec x, Vec f)
Multiplication operator for R = CT(CCT)^-1.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
MoFEMErrorCode ConstrainMatrixMultOpP(Mat P, Vec x, Vec f)
Multiplication operator for P = CT(CCT)^-1C.