DSDP
Functions
dsdpschurmat.c File Reference

Solve the Schur matrix for a step direction. More...

Go to the source code of this file.

Functions

int DSDPSchurMatAssemble (DSDPSchurMat M)
 Final assembly of M. More...
 
int DSDPSchurMatDestroy (DSDPSchurMat *M)
 Free the memory in the data structure. More...
 
int DSDPSchurMatFactor (DSDPSchurMat M, DSDPTruth *successful)
 Factor M. More...
 
int DSDPSchurMatInitialize (DSDPSchurMat *M)
 Initialize pointers to null. More...
 
int DSDPSchurMatInParallel (DSDPSchurMat M, DSDPTruth *flag)
 Determine whether M is computed in parallel. More...
 
int DSDPSchurMatMultiply (DSDPSchurMat M, DSDPVec x, DSDPVec y)
 Multiply M by a vector. y = M x. More...
 
int DSDPSchurMatOpsInitialize (struct DSDPSchurMat_Ops *dops)
 Initialize function pointers to 0. More...
 
int DSDPSchurMatReducePVec (DSDPSchurMat M, DSDPVec x)
 Collect elements of the vector. More...
 
int DSDPSchurMatRowScaling (DSDPSchurMat M, DSDPVec D)
 Identify which rows on on this processor. More...
 
int DSDPSchurMatSetR (DSDPSchurMat M, double rr)
 Set up the data structure. More...
 
int DSDPSchurMatSetup (DSDPSchurMat M, DSDPVec Y)
 Set up the data structure. More...
 
int DSDPSchurMatShiftDiagonal (DSDPSchurMat M, double dd)
 Add a scalar to each diagonal element of the matrix. More...
 
int DSDPSchurMatSolve (DSDPSchurMat M, DSDPVec b, DSDPVec x)
 Solve the linear system. More...
 
int DSDPSchurMatView (DSDPSchurMat M)
 Print the matrix. More...
 
int DSDPSchurMatZeroEntries (DSDPSchurMat M)
 Zero all element in the matrix. More...
 
int DSDPSetFixedVariable (DSDP dsdp, int vari, double val)
 Fix variable y to exact value. More...
 
int DSDPSetFixedVariables (DSDP dsdp, double vars[], double vals[], double xout[], int nvars)
 Fix variable y to exact values. More...
 
int DSDPSparsityInSchurMat (DSDP dsdp, int row, int rnnz[], int mm)
 Identify nonzero elements in a row of the Schur complement. More...
 

Detailed Description

Solve the Schur matrix for a step direction.

Definition in file dsdpschurmat.c.

Function Documentation

◆ DSDPSchurMatAssemble()

int DSDPSchurMatAssemble ( DSDPSchurMat  M)

Final assembly of M.

Parameters
Mmatrix

Important in parallel implementation.

Definition at line 174 of file dsdpschurmat.c.

◆ DSDPSchurMatDestroy()

int DSDPSchurMatDestroy ( DSDPSchurMat M)

Free the memory in the data structure.

Parameters
Mmatrix

Definition at line 414 of file dsdpschurmat.c.

◆ DSDPSchurMatFactor()

int DSDPSchurMatFactor ( DSDPSchurMat  M,
DSDPTruth successful 
)

Factor M.

Parameters
Mmatrix
successfulfalse if factorization failed.

Definition at line 196 of file dsdpschurmat.c.

Referenced by DSDPComputeDualStepDirections().

◆ DSDPSchurMatInitialize()

int DSDPSchurMatInitialize ( DSDPSchurMat M)

Initialize pointers to null.

Parameters
MSchur matrix object

Definition at line 79 of file dsdpschurmat.c.

◆ DSDPSchurMatInParallel()

int DSDPSchurMatInParallel ( DSDPSchurMat  M,
DSDPTruth flag 
)

Determine whether M is computed in parallel.

Parameters
Mmatrix
flagtrue or false

Important in parallel implementation.

Definition at line 149 of file dsdpschurmat.c.

Referenced by DSDPSchurMatReducePVec(), and DSDPSchurMatVariableCompute().

◆ DSDPSchurMatMultiply()

int DSDPSchurMatMultiply ( DSDPSchurMat  M,
DSDPVec  x,
DSDPVec  y 
)

Multiply M by a vector. y = M x.

Parameters
Mmatrix
xin vector.
yproduct.

Definition at line 231 of file dsdpschurmat.c.

◆ DSDPSchurMatOpsInitialize()

int DSDPSchurMatOpsInitialize ( struct DSDPSchurMat_Ops *  dops)

Initialize function pointers to 0.

Parameters
dopsaddress of a structure of function pointers.

Definition at line 44 of file dsdpschurmat.c.

Referenced by DSDPSchurMatInitialize().

◆ DSDPSchurMatReducePVec()

int DSDPSchurMatReducePVec ( DSDPSchurMat  M,
DSDPVec  x 
)

Collect elements of the vector.

Parameters
Mmatrix
xvector.

Important in parallel implementation. Otherwise does nothing.

Definition at line 307 of file dsdpschurmat.c.

◆ DSDPSchurMatRowScaling()

int DSDPSchurMatRowScaling ( DSDPSchurMat  M,
DSDPVec  D 
)

Identify which rows on on this processor.

Parameters
Mmatrix
DVariables marked with 0 or 1.

Definition at line 399 of file dsdpschurmat.c.

◆ DSDPSchurMatSetR()

int DSDPSchurMatSetR ( DSDPSchurMat  M,
double  rr 
)

Set up the data structure.

Parameters
Mmatrix
rrresidual

Definition at line 338 of file dsdpschurmat.c.

◆ DSDPSchurMatSetup()

int DSDPSchurMatSetup ( DSDPSchurMat  M,
DSDPVec  Y 
)

Set up the data structure.

Parameters
Mmatrix
Yvariable vector.

Definition at line 352 of file dsdpschurmat.c.

◆ DSDPSchurMatShiftDiagonal()

int DSDPSchurMatShiftDiagonal ( DSDPSchurMat  M,
double  dd 
)

Add a scalar to each diagonal element of the matrix.

Parameters
Mmatrix
dddiagonal shift

Definition at line 120 of file dsdpschurmat.c.

Referenced by DSDPComputeDualStepDirections().

◆ DSDPSchurMatSolve()

int DSDPSchurMatSolve ( DSDPSchurMat  M,
DSDPVec  b,
DSDPVec  x 
)

Solve the linear system.

Parameters
Mmatrix
bthe right-hand side
xsolution

Definition at line 466 of file dsdpschurmat.c.

◆ DSDPSchurMatView()

int DSDPSchurMatView ( DSDPSchurMat  M)

Print the matrix.

Parameters
Mmatrix

Definition at line 376 of file dsdpschurmat.c.

Referenced by DSDPComputeDualStepDirections().

◆ DSDPSchurMatZeroEntries()

int DSDPSchurMatZeroEntries ( DSDPSchurMat  M)

Zero all element in the matrix.

Parameters
Mmatrix

Definition at line 97 of file dsdpschurmat.c.

◆ DSDPSparsityInSchurMat()

int DSDPSparsityInSchurMat ( DSDP  dsdp,
int  row,
int  rnnz[],
int  mm 
)

Identify nonzero elements in a row of the Schur complement.

Parameters
dsdpsolver
rowcorresponding to variable y.
rnnzarray to be marked nonzero if nonzero.
mmdimension of M matrix

Definition at line 649 of file dsdpschurmat.c.