 |
| v0.14.0
|
|
MoFEMErrorCode | MoFEM::ProjectionMatrixMultOpQ (Mat Q, Vec x, Vec f) |
| Multiplication operator for Q = I-CTC(CCT)^-1C. More...
|
|
MoFEMErrorCode | MoFEM::ConstrainMatrixMultOpP (Mat P, Vec x, Vec f) |
| Multiplication operator for P = CT(CCT)^-1C. More...
|
|
MoFEMErrorCode | MoFEM::ConstrainMatrixMultOpR (Mat R, Vec x, Vec f) |
| Multiplication operator for R = CT(CCT)^-1. More...
|
|
MoFEMErrorCode | MoFEM::ConstrainMatrixMultOpRT (Mat RT, Vec x, Vec f) |
| Multiplication operator for RT = (CCT)^-TC. More...
|
|
MoFEMErrorCode | MoFEM::ConstrainMatrixMultOpCTC_QTKQ (Mat CTC_QTKQ, Vec x, Vec f) |
| Multiplication operator for RT = (CCT)^-TC. More...
|
|
MoFEMErrorCode | MoFEM::ConstrainMatrixDestroyOpPorQ (Mat Q) |
| Destroy shell matrix Q. More...
|
|
MoFEMErrorCode | MoFEM::ConstrainMatrixDestroyOpQTKQ (Mat QTKQ) |
| Destroy shell matrix. More...
|
|
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() [1/2]
MoFEMErrorCode ConstrainMatrixDestroyOpPorQ |
( |
Mat |
Q | ) |
|
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 290 of file ConstrainMatrixCtx.cpp.
293 CHKERR MatShellGetContext(Q, &void_ctx);
◆ ConstrainMatrixDestroyOpPorQ() [2/2]
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 290 of file ConstrainMatrixCtx.cpp.
293 CHKERR MatShellGetContext(Q, &void_ctx);
◆ ConstrainMatrixDestroyOpQTKQ() [1/2]
MoFEMErrorCode ConstrainMatrixDestroyOpQTKQ |
( |
Mat |
QTKQ | ) |
|
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 298 of file ConstrainMatrixCtx.cpp.
301 CHKERR MatShellGetContext(QTKQ, &void_ctx);
◆ ConstrainMatrixDestroyOpQTKQ() [2/2]
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 298 of file ConstrainMatrixCtx.cpp.
301 CHKERR MatShellGetContext(QTKQ, &void_ctx);
◆ ConstrainMatrixMultOpCTC_QTKQ() [1/2]
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 261 of file ConstrainMatrixCtx.cpp.
264 CHKERR MatShellGetContext(CTC_QTKQ, &void_ctx);
272 CHKERR MatShellSetOperation(Q, MATOP_MULT,
280 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpCTC_QTKQ() [2/2]
MoFEMErrorCode MoFEM::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 261 of file ConstrainMatrixCtx.cpp.
264 CHKERR MatShellGetContext(CTC_QTKQ, &void_ctx);
272 CHKERR MatShellSetOperation(Q, MATOP_MULT,
280 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpP() [1/2]
MoFEMErrorCode ConstrainMatrixMultOpP |
( |
Mat |
P, |
|
|
Vec |
x, |
|
|
Vec |
f |
|
) |
| |
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 197 of file ConstrainMatrixCtx.cpp.
200 CHKERR MatShellGetContext(
P, &void_ctx);
206 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
211 CHKERR VecGhostUpdateBegin(
f, INSERT_VALUES, SCATTER_FORWARD);
212 CHKERR VecGhostUpdateEnd(
f, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpP() [2/2]
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 197 of file ConstrainMatrixCtx.cpp.
200 CHKERR MatShellGetContext(
P, &void_ctx);
206 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
211 CHKERR VecGhostUpdateBegin(
f, INSERT_VALUES, SCATTER_FORWARD);
212 CHKERR VecGhostUpdateEnd(
f, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpR() [1/2]
MoFEMErrorCode ConstrainMatrixMultOpR |
( |
Mat |
R, |
|
|
Vec |
x, |
|
|
Vec |
f |
|
) |
| |
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 221 of file ConstrainMatrixCtx.cpp.
224 CHKERR MatShellGetContext(
R, &void_ctx);
229 "you have to call first initQorP or use Q matrix");
233 CHKERR VecGhostUpdateBegin(
f, INSERT_VALUES, SCATTER_FORWARD);
234 CHKERR VecGhostUpdateEnd(
f, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpR() [2/2]
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 221 of file ConstrainMatrixCtx.cpp.
224 CHKERR MatShellGetContext(
R, &void_ctx);
229 "you have to call first initQorP or use Q matrix");
233 CHKERR VecGhostUpdateBegin(
f, INSERT_VALUES, SCATTER_FORWARD);
234 CHKERR VecGhostUpdateEnd(
f, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpRT() [1/2]
MoFEMErrorCode ConstrainMatrixMultOpRT |
( |
Mat |
RT, |
|
|
Vec |
x, |
|
|
Vec |
f |
|
) |
| |
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 243 of file ConstrainMatrixCtx.cpp.
246 CHKERR MatShellGetContext(RT, &void_ctx);
251 "you have to call first initQorP or use Q matrix");
254 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
◆ ConstrainMatrixMultOpRT() [2/2]
MoFEMErrorCode MoFEM::ConstrainMatrixMultOpRT |
( |
Mat |
RT, |
|
|
Vec |
x, |
|
|
Vec |
f |
|
) |
| |
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 243 of file ConstrainMatrixCtx.cpp.
246 CHKERR MatShellGetContext(RT, &void_ctx);
251 "you have to call first initQorP or use Q matrix");
254 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
◆ ProjectionMatrixMultOpQ() [1/2]
MoFEMErrorCode ProjectionMatrixMultOpQ |
( |
Mat |
Q, |
|
|
Vec |
x, |
|
|
Vec |
f |
|
) |
| |
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 163 of file ConstrainMatrixCtx.cpp.
166 CHKERR MatShellGetContext(Q, &void_ctx);
173 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
182 if (flg == PETSC_FALSE)
◆ ProjectionMatrixMultOpQ() [2/2]
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 163 of file ConstrainMatrixCtx.cpp.
166 CHKERR MatShellGetContext(Q, &void_ctx);
173 CHKERR VecScatterEnd(ctx->
sCatter, x, ctx->
X, INSERT_VALUES, SCATTER_FORWARD);
182 if (flg == PETSC_FALSE)
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
MoFEMErrorCode ConstrainMatrixMultOpRT(Mat RT, Vec x, Vec f)
Multiplication operator for RT = (CCT)^-TC.
virtual MPI_Comm & get_comm() const =0
PetscLogEvent MOFEM_EVENT_projCTC_QTKQ
MoFEMErrorCode ConstrainMatrixDestroyOpPorQ(Mat Q)
Destroy shell matrix Q.
MoFEMErrorCode ConstrainMatrixMultOpP(Mat P, Vec x, Vec f)
Multiplication operator for P = CT(CCT)^-1C.
MoFEMErrorCode destroyQTKQ()
destroy sub-matrices used for shell matrix QTKQ
FTensor::Index< 'M', 3 > M
#define CHKERR
Inline error check.
PetscLogEvent MOFEM_EVENT_projR
MoFEMErrorCode ProjectionMatrixMultOpQ(Mat Q, Vec x, Vec f)
Multiplication operator for Q = I-CTC(CCT)^-1C.
MoFEMErrorCode ConstrainMatrixMultOpCTC_QTKQ(Mat CTC_QTKQ, Vec x, Vec f)
Multiplication operator for RT = (CCT)^-TC.
PetscLogEvent MOFEM_EVENT_projRT
MoFEMErrorCode ConstrainMatrixDestroyOpQTKQ(Mat QTKQ)
Destroy shell matrix.
PetscLogEvent MOFEM_EVENT_projP
MoFEMErrorCode ProjectionMatrixMultOpQ(Mat Q, Vec x, Vec f)
Multiplication operator for Q = I-CTC(CCT)^-1C.
MoFEM::Interface & mField
MoFEMErrorCode ConstrainMatrixMultOpR(Mat R, Vec x, Vec f)
Multiplication operator for R = CT(CCT)^-1.
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()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...