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.
int | DSDPSchurMatDestroy (DSDPSchurMat *M)
| Free the memory in the data structure.
int | DSDPSchurMatFactor (DSDPSchurMat M, DSDPTruth *successful)
| Factor M.
int | DSDPSchurMatInitialize (DSDPSchurMat *M)
| Initialize pointers to null.
int | DSDPSchurMatInParallel (DSDPSchurMat M, DSDPTruth *flag)
| Determine whether M is computed in parallel.
int | DSDPSchurMatMultiply (DSDPSchurMat M, DSDPVec x, DSDPVec y)
| Multiply M by a vector. y = M x.
int | DSDPSchurMatOpsInitialize (struct DSDPSchurMat_Ops *dops)
| Initialize function pointers to 0.
int | DSDPSchurMatReducePVec (DSDPSchurMat M, DSDPVec x)
| Collect elements of the vector.
int | DSDPSchurMatRowScaling (DSDPSchurMat M, DSDPVec D)
| Identify which rows on on this processor.
int | DSDPSchurMatSetData (DSDPSchurMat *M, struct DSDPSchurMat_Ops *ops, void *data)
| Set the Schur matrix with an opaque pointer and structure of function pointers.
int | DSDPSchurMatSetR (DSDPSchurMat M, double rr)
| Set up the data structure.
int | DSDPSchurMatSetup (DSDPSchurMat M, DSDPVec Y)
| Set up the data structure.
int | DSDPSchurMatShiftDiagonal (DSDPSchurMat M, double dd)
| Add a scalar to each diagonal element of the matrix.
int | DSDPSchurMatSolve (DSDPSchurMat M, DSDPVec b, DSDPVec x)
| Solve the linear system.
int | DSDPSchurMatView (DSDPSchurMat M)
| Print the matrix.
int | DSDPSchurMatZeroEntries (DSDPSchurMat M)
| Zero all element in the matrix.
int | DSDPSparsityInSchurMat (DSDP dsdp, int row, int rnnz[], int mm)
| Identify nonzero elements in a row of the Schur complement.

## 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

  M | matrix

Important in parallel implementation.

Definition at line 174 of file dsdpschurmat.c.

Referenced by DSDPComputeHessian().

## DSDPSchurMatDestroy()

int DSDPSchurMatDestroy | ( | DSDPSchurMat * | M | ) |

Free the memory in the data structure.

Parameters

  M | matrix

Definition at line 414 of file dsdpschurmat.c.

Referenced by DSDPTakeDown().

## DSDPSchurMatFactor()

int DSDPSchurMatFactor | ( | DSDPSchurMat | M,
|  | DSDPTruth * | successful
| ) |  |

Factor M.

Parameters

  M | matrix
  successful | false if factorization failed.

Definition at line 196 of file dsdpschurmat.c.

Referenced by DSDPComputeDualStepDirections().

## DSDPSchurMatInitialize()

int DSDPSchurMatInitialize | ( | DSDPSchurMat * | M | ) |

Initialize pointers to null.

Parameters

  M | Schur 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

  M | matrix
  flag | true or false

Important in parallel implementation.

Definition at line 149 of file dsdpschurmat.c.

Referenced by DSDPSchurMatDiagonalScaling(), DSDPSchurMatReducePVec(), and DSDPSchurMatVariableCompute().

## DSDPSchurMatMultiply()

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

Multiply M by a vector. y = M x.

Parameters

  M | matrix
  x | in vector.
  y | product.

Definition at line 231 of file dsdpschurmat.c.

## DSDPSchurMatOpsInitialize()

int DSDPSchurMatOpsInitialize | ( | struct DSDPSchurMat_Ops * | dops | ) |

Initialize function pointers to 0.

Parameters

  dops | address of a structure of function pointers.

Definition at line 44 of file dsdpschurmat.c.

Referenced by DSDPSchurMatDestroy(), and DSDPSchurMatInitialize().

## DSDPSchurMatReducePVec()

int DSDPSchurMatReducePVec | ( | DSDPSchurMat | M,
|  | DSDPVec | x
| ) |  |

Collect elements of the vector.

Parameters

  M | matrix
  x | vector.

Important in parallel implementation. Otherwise does nothing.

Definition at line 307 of file dsdpschurmat.c.

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

## DSDPSchurMatRowScaling()

int DSDPSchurMatRowScaling | ( | DSDPSchurMat | M,
|  | DSDPVec | D
| ) |  |

Identify which rows on on this processor.

Parameters

  M | matrix
  D | Variables marked with 0 or 1.

Definition at line 399 of file dsdpschurmat.c.

Referenced by DSDPComputeG(), and DSDPHessianMultiplyAdd().

## DSDPSchurMatSetData()

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

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

Parameters

  M | Schur matrix object
  ops | address of a structure of function pointers.
  data | opaque pointer to its internal data structure.

Definition at line 28 of file dsdpschurmat.c.

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

## DSDPSchurMatSetR()

int DSDPSchurMatSetR | ( | DSDPSchurMat | M,
|  | double | rr
| ) |  |

Set up the data structure.

Parameters

  M | matrix
  rr | residual

Definition at line 338 of file dsdpschurmat.c.

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

## DSDPSchurMatSetup()

int DSDPSchurMatSetup | ( | DSDPSchurMat | M,
|  | DSDPVec | Y
| ) |  |

Set up the data structure.

Parameters

  M | matrix
  Y | variable 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

  M | matrix
  dd | diagonal 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

  M | matrix
  b | the right-hand side
  x | solution

Definition at line 466 of file dsdpschurmat.c.

Referenced by DSDPCGSolve().

## DSDPSchurMatView()

int DSDPSchurMatView | ( | DSDPSchurMat | M | ) |

Print the matrix.

Parameters

  M | matrix

Definition at line 376 of file dsdpschurmat.c.

Referenced by DSDPComputeDualStepDirections().

## DSDPSchurMatZeroEntries()

int DSDPSchurMatZeroEntries | ( | DSDPSchurMat | M | ) |

Zero all element in the matrix.

Parameters

  M | matrix

Definition at line 97 of file dsdpschurmat.c.

Referenced by DSDPComputeHessian().

## DSDPSparsityInSchurMat()

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

Identify nonzero elements in a row of the Schur complement.

Parameters

  dsdp | solver
  row | corresponding to variable y.
  rnnz | array to be marked nonzero if nonzero.
  mm | dimension of M matrix

Definition at line 649 of file dsdpschurmat.c.