DSDP
Data Structures | Typedefs | Functions
dsdpschurmat.h File Reference

Methods of a Schur Matrix. More...

Go to the source code of this file.

Data Structures

struct  DSDPSchurMat_C
 Schur complement matrix whose solution is the Newton direction. More...
 

Typedefs

typedef struct DSDPSchurMat_C DSDPSchurMat
 This object represents the Schur Matrix. Its structure is opaque to the DSDP solver, but it must implement the interface below and provide a structure of function pointers. More...
 

Functions

int DSDPSchurMatAddDiagonal (DSDPSchurMat, DSDPVec)
 Add elements to a row of the Schur matrix. More...
 
int DSDPSchurMatAddDiagonalElement (DSDPSchurMat, int, double)
 Determine with the cone should compute this diagonal element of M and RHS. More...
 
int DSDPSchurMatAddR (DSDPSchurMat, int, double)
 Add an element to the Schur matrix correponding the variable r. More...
 
int DSDPSchurMatAddRow (DSDPSchurMat, int, double, DSDPVec)
 Add elements to a row of the Schur matrix. More...
 
int DSDPSchurMatAssemble (DSDPSchurMat)
 Final assembly of M. More...
 
int DSDPSchurMatDestroy (DSDPSchurMat *)
 Free the memory in the data structure. More...
 
int DSDPSchurMatDiagonalScaling (DSDPSchurMat, DSDPVec)
 Get the scaling and nonzero pattern of each diagonal element of the matrix. More...
 
int DSDPSchurMatFactor (DSDPSchurMat, DSDPTruth *)
 Factor M. More...
 
int DSDPSchurMatInitialize (DSDPSchurMat *)
 Initialize pointers to null. More...
 
int DSDPSchurMatInParallel (DSDPSchurMat, DSDPTruth *)
 Determine whether M is computed in parallel. More...
 
int DSDPSchurMatMultiply (DSDPSchurMat, DSDPVec, DSDPVec)
 Multiply M by a vector. y = M x. More...
 
int DSDPSchurMatReducePVec (DSDPSchurMat, DSDPVec)
 Collect elements of the vector. More...
 
int DSDPSchurMatRowColumnScaling (DSDPSchurMat, int, DSDPVec, int *)
 Get the scaling and nonzero pattern of each column in this row of the matrix. More...
 
int DSDPSchurMatRowScaling (DSDPSchurMat, DSDPVec)
 Identify which rows on on this processor. More...
 
int DSDPSchurMatSetData (DSDPSchurMat *, struct DSDPSchurMat_Ops *, void *)
 Set the Schur matrix with an opaque pointer and structure of function pointers. More...
 
int DSDPSchurMatSetR (DSDPSchurMat, double)
 Set up the data structure. More...
 
int DSDPSchurMatSetup (DSDPSchurMat, DSDPVec)
 Set up the data structure. More...
 
int DSDPSchurMatShiftDiagonal (DSDPSchurMat, double)
 Add a scalar to each diagonal element of the matrix. More...
 
int DSDPSchurMatSolve (DSDPSchurMat, DSDPVec, DSDPVec)
 Solve the linear system. More...
 
int DSDPSchurMatVariableCompute (DSDPSchurMat, int, double *)
 Determine with the cone should compute this diagonal element of M and RHS. More...
 
int DSDPSchurMatVariableComputeR (DSDPSchurMat, double *)
 Add an element to the Schur matrix correponding the variable r. More...
 
int DSDPSchurMatView (DSDPSchurMat)
 Print the matrix. More...
 
int DSDPSchurMatZeroEntries (DSDPSchurMat)
 Zero all element in the matrix. More...
 

Detailed Description

Methods of a Schur Matrix.

Definition in file dsdpschurmat.h.

Typedef Documentation

This object represents the Schur Matrix. Its structure is opaque to the DSDP solver, but it must implement the interface below and provide a structure of function pointers.

Definition at line 49 of file dsdpschurmat.h.

Function Documentation

int DSDPSchurMatAddDiagonal ( DSDPSchurMat  M,
DSDPVec  D 
)

Add elements to a row of the Schur matrix.

Parameters
Mmatrix
Ddiagonal elements.

Conic object call this routine when evaluating the Hessian of the barrier term.

See also
DSDPSchurMatDiagonalScaling()

Definition at line 272 of file dsdpschurmatadd.c.

int DSDPSchurMatAddDiagonalElement ( DSDPSchurMat  M,
int  row,
double  dd 
)

Determine with the cone should compute this diagonal element of M and RHS.

Parameters
Mmatrix
rowcorreponding the y variable
ddzero or one..
See also
DSDPSchurMatVariableCompute()

Definition at line 157 of file dsdpschurmatadd.c.

int DSDPSchurMatAddR ( DSDPSchurMat  M,
int  row,
double  dd 
)

Add an element to the Schur matrix correponding the variable r.

Parameters
Mmatrix
rowcorresponding to variable y.
ddelement

Definition at line 198 of file dsdpschurmatadd.c.

int DSDPSchurMatAddRow ( DSDPSchurMat  M,
int  row,
double  alpha,
DSDPVec  R 
)

Add elements to a row of the Schur matrix.

Parameters
Mmatrix
rowcorreponding to variable y
alphamultiply elements in R by this scalar.
Ra row of elements.

Conic object call this routine when evaluating the Hessian of the barrier term. This routine is to be used with DSDPSchurMatRowColumnScaling().

See also
DSDPSchurMatRowColumnScaling()

Definition at line 76 of file dsdpschurmatadd.c.

Referenced by DSDPAddSchurRow(), and SDPConeComputeHessian().

int DSDPSchurMatAssemble ( DSDPSchurMat  M)

Final assembly of M.

Parameters
Mmatrix

Important in parallel implementation.

Definition at line 174 of file dsdpschurmat.c.

Referenced by DSDPComputeHessian().

int DSDPSchurMatDestroy ( DSDPSchurMat M)

Free the memory in the data structure.

Parameters
Mmatrix

Definition at line 414 of file dsdpschurmat.c.

Referenced by DSDPTakeDown().

int DSDPSchurMatDiagonalScaling ( DSDPSchurMat  M,
DSDPVec  D 
)

Get the scaling and nonzero pattern of each diagonal element of the matrix.

Parameters
Mmatrix
Dmultply each element of the diagonal by this quantity.

Conic object call this routine when evaluating the Hessian of the barrier term. The elements will be a 0 or a 1. Important for parallel version.

See also
DSDPSchurMatAddDiagonal()

Definition at line 235 of file dsdpschurmatadd.c.

Referenced by DSDPSchurMatRowScaling().

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().

int DSDPSchurMatInitialize ( DSDPSchurMat M)

Initialize pointers to null.

Parameters
MSchur matrix object

Definition at line 79 of file dsdpschurmat.c.

Referenced by DSDPCreate().

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 DSDPSchurMatDiagonalScaling(), DSDPSchurMatReducePVec(), and DSDPSchurMatVariableCompute().

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.

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.

Referenced by DSDPComputeG(), DSDPComputeHessian(), and DSDPHessianMultiplyAdd().

int DSDPSchurMatRowColumnScaling ( DSDPSchurMat  M,
int  row,
DSDPVec  V,
int *  nzcols 
)

Get the scaling and nonzero pattern of each column in this row of the matrix.

Parameters
Mmatrix
rowcorreponding to variable y
Vmultply each element of the row by this quantity.
nzcolshow many nonzeros. Check for a 0! Conic object call this routine when evaluating the Hessian of the barrier term. The vector V identifies sparsity, whether its using upper or lower half of Schur, and also used to distribute rows over processros The elements will be a 0 or a 1. This routine is to be used with DSDPSchurMatAddRow().
See also
DSDPSchurMatAddRow()

Definition at line 33 of file dsdpschurmatadd.c.

Referenced by SDPConeComputeHessian().

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.

Referenced by DSDPComputeG(), and DSDPHessianMultiplyAdd().

int DSDPSchurMatSetData ( DSDPSchurMat M,
struct DSDPSchurMat_Ops *  ops,
void *  data 
)

Set the Schur matrix with an opaque pointer and structure of function pointers.

Parameters
MSchur matrix object
opsaddress of a structure of function pointers.
dataopaque pointer to its internal data structure.

Definition at line 28 of file dsdpschurmat.c.

Referenced by DSDPSchurMatDestroy(), DSDPSchurMatInitialize(), and DSDPSetSchurMatOps().

int DSDPSchurMatSetR ( DSDPSchurMat  M,
double  rr 
)

Set up the data structure.

Parameters
Mmatrix
rrresidual

Definition at line 338 of file dsdpschurmat.c.

Referenced by DSDPComputeG(), DSDPComputeHessian(), and DSDPComputeNewY().

int DSDPSchurMatSetup ( DSDPSchurMat  M,
DSDPVec  Y 
)

Set up the data structure.

Parameters
Mmatrix
Yvariable vector.

Definition at line 352 of file dsdpschurmat.c.

Referenced by DSDPSetup().

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().

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.

Referenced by DSDPCGSolve().

int DSDPSchurMatVariableCompute ( DSDPSchurMat  M,
int  row,
double *  rcv 
)

Determine with the cone should compute this diagonal element of M and RHS.

Parameters
Mmatrix
rowcorreponding the y variable
rcvUsed to evaluate M. Important in parallel implementation.
See also
DSDPSchurMatAddDiagonalElement()

Definition at line 120 of file dsdpschurmatadd.c.

Referenced by DSDPObjectiveGH().

int DSDPSchurMatVariableComputeR ( DSDPSchurMat  M,
double *  rcv 
)

Add an element to the Schur matrix correponding the variable r.

Parameters
Mmatrix
*rcvzero or one

Definition at line 181 of file dsdpschurmatadd.c.

int DSDPSchurMatView ( DSDPSchurMat  M)

Print the matrix.

Parameters
Mmatrix

Definition at line 376 of file dsdpschurmat.c.

Referenced by DSDPComputeDualStepDirections().

int DSDPSchurMatZeroEntries ( DSDPSchurMat  M)

Zero all element in the matrix.

Parameters
Mmatrix

Definition at line 97 of file dsdpschurmat.c.

Referenced by DSDPComputeHessian().