dsdpschurmat.h
Go to the documentation of this file.
#if !defined(__DSDP_SCHURMATRIXOPERATIONS_H)
#define __DSDP_SCHURMATRIXOPERATIONS_H
#include "dsdpvec.h"
#include "dsdpbasictypes.h"
#include "dsdpcg.h"
typedef struct {
int *var;
int nvars;
int nmaxvars;
double *fval;
double *fdual;
double *xout;
} FixedVariables;
typedef struct {
FixedVariables fv;
DSDPVec rhs3,dy3;
double dd,r;
int m;
} DSDPSchurInfo;
struct DSDPSchurMat_C{
void* data;
struct DSDPSchurMat_Ops *dsdpops;
DSDPSchurInfo* schur;
};
typedef struct DSDPSchurMat_C DSDPSchurMat;
#ifdef __cplusplus
extern "C" {
#endif
extern int DSDPSchurMatSetData(DSDPSchurMat*,struct DSDPSchurMat_Ops*, void*);
extern int DSDPSchurMatInitialize(DSDPSchurMat*);
extern int DSDPSchurMatSetup(DSDPSchurMat, DSDPVec);
extern int DSDPSchurMatZeroEntries(DSDPSchurMat);
extern int DSDPSchurMatInParallel(DSDPSchurMat, DSDPTruth*);
extern int DSDPSchurMatShiftDiagonal(DSDPSchurMat, double);
extern int DSDPSchurMatAssemble(DSDPSchurMat);
extern int DSDPSchurMatMultiply(DSDPSchurMat, DSDPVec, DSDPVec);
extern int DSDPSchurMatMultR(DSDPSchurMat, DSDPVec, DSDPVec);
extern int DSDPSchurMatReducePVec(DSDPSchurMat, DSDPVec);
extern int DSDPSchurMatFactor(DSDPSchurMat,DSDPTruth*);
extern int DSDPSchurMatSolve(DSDPSchurMat, DSDPVec, DSDPVec);
extern int DSDPSchurMatDestroy(DSDPSchurMat*);
extern int DSDPSchurMatView(DSDPSchurMat);
extern int DSDPSchurMatSetR(DSDPSchurMat, double);
extern int DSDPSchurMatRowColumnScaling(DSDPSchurMat,int, DSDPVec,int*);
extern int DSDPSchurMatAddRow(DSDPSchurMat, int, double, DSDPVec);
extern int DSDPSchurMatVariableCompute(DSDPSchurMat, int, double*);
extern int DSDPSchurMatVariableComputeC(DSDPSchurMat, double*);
extern int DSDPSchurMatVariableComputeR(DSDPSchurMat, double*);
extern int DSDPSchurMatAddDiagonalElement(DSDPSchurMat, int, double);
extern int DSDPSchurMatAddC(DSDPSchurMat,int,double);
extern int DSDPSchurMatAddR(DSDPSchurMat,int,double);
extern int DSDPSchurMatDiagonalScaling(DSDPSchurMat, DSDPVec);
extern int DSDPSchurMatAddDiagonal(DSDPSchurMat, DSDPVec);
extern int DSDPSchurMatRowScaling(DSDPSchurMat, DSDPVec);
extern int DSDPZeroFixedVariables( DSDPSchurMat, DSDPVec);
extern int DSDPApplyFixedVariables( DSDPSchurMat, DSDPVec);
extern int DSDPIsFixed( DSDPSchurMat, int, DSDPTruth*);
extern int DSDPInitializeFixedVariable( FixedVariables *);
extern int DSDPAddFixedVariable( DSDPSchurMat, int, double);
#ifdef __cplusplus
}
#endif
#endif
dsdpbasictypes.h
Solver, solution types, termination codes,.
DSDPTruth
DSDPTruth
Boolean variables.
Definition dsdpbasictypes.h:19
dsdpcg.h
Internal data structure for CG method.
DSDPSchurMatInParallel
int DSDPSchurMatInParallel(DSDPSchurMat, DSDPTruth *)
Determine whether M is computed in parallel.
Definition dsdpschurmat.c:149
DSDPSchurMatSetData
int DSDPSchurMatSetData(DSDPSchurMat *, struct DSDPSchurMat_Ops *, void *)
Set the Schur matrix with an opaque pointer and structure of function pointers.
Definition dsdpschurmat.c:28
DSDPSchurMatShiftDiagonal
int DSDPSchurMatShiftDiagonal(DSDPSchurMat, double)
Add a scalar to each diagonal element of the matrix.
Definition dsdpschurmat.c:120
DSDPSchurMatAddDiagonal
int DSDPSchurMatAddDiagonal(DSDPSchurMat, DSDPVec)
Add elements to a row of the Schur matrix.
Definition dsdpschurmatadd.c:272
DSDPSchurMatAddR
int DSDPSchurMatAddR(DSDPSchurMat, int, double)
Add an element to the Schur matrix correponding the variable r.
Definition dsdpschurmatadd.c:198
DSDPSchurMatSetup
int DSDPSchurMatSetup(DSDPSchurMat, DSDPVec)
Set up the data structure.
Definition dsdpschurmat.c:352
DSDPSchurMatSolve
int DSDPSchurMatSolve(DSDPSchurMat, DSDPVec, DSDPVec)
Solve the linear system.
Definition dsdpschurmat.c:466
DSDPSchurMatZeroEntries
int DSDPSchurMatZeroEntries(DSDPSchurMat)
Zero all element in the matrix.
Definition dsdpschurmat.c:97
DSDPSchurMatMultiply
int DSDPSchurMatMultiply(DSDPSchurMat, DSDPVec, DSDPVec)
Multiply M by a vector. y = M x.
Definition dsdpschurmat.c:231
DSDPSchurMatRowScaling
int DSDPSchurMatRowScaling(DSDPSchurMat, DSDPVec)
Identify which rows on on this processor.
Definition dsdpschurmat.c:399
DSDPSchurMatView
int DSDPSchurMatView(DSDPSchurMat)
Print the matrix.
Definition dsdpschurmat.c:376
DSDPSchurMatVariableCompute
int DSDPSchurMatVariableCompute(DSDPSchurMat, int, double *)
Determine with the cone should compute this diagonal element of M and RHS.
Definition dsdpschurmatadd.c:120
DSDPSchurMatFactor
int DSDPSchurMatFactor(DSDPSchurMat, DSDPTruth *)
Factor M.
Definition dsdpschurmat.c:196
DSDPSchurMatRowColumnScaling
int DSDPSchurMatRowColumnScaling(DSDPSchurMat, int, DSDPVec, int *)
Get the scaling and nonzero pattern of each column in this row of the matrix.
Definition dsdpschurmatadd.c:33
DSDPSchurMatSetR
int DSDPSchurMatSetR(DSDPSchurMat, double)
Set up the data structure.
Definition dsdpschurmat.c:338
DSDPSchurMatInitialize
int DSDPSchurMatInitialize(DSDPSchurMat *)
Initialize pointers to null.
Definition dsdpschurmat.c:79
DSDPSchurMatAssemble
int DSDPSchurMatAssemble(DSDPSchurMat)
Final assembly of M.
Definition dsdpschurmat.c:174
DSDPSchurMatVariableComputeR
int DSDPSchurMatVariableComputeR(DSDPSchurMat, double *)
Add an element to the Schur matrix correponding the variable r.
Definition dsdpschurmatadd.c:181
DSDPSchurMatDestroy
int DSDPSchurMatDestroy(DSDPSchurMat *)
Free the memory in the data structure.
Definition dsdpschurmat.c:414
DSDPSchurMatAddDiagonalElement
int DSDPSchurMatAddDiagonalElement(DSDPSchurMat, int, double)
Determine with the cone should compute this diagonal element of M and RHS.
Definition dsdpschurmatadd.c:157
DSDPSchurMatReducePVec
int DSDPSchurMatReducePVec(DSDPSchurMat, DSDPVec)
Collect elements of the vector.
Definition dsdpschurmat.c:307
DSDPSchurMatAddRow
int DSDPSchurMatAddRow(DSDPSchurMat, int, double, DSDPVec)
Add elements to a row of the Schur matrix.
Definition dsdpschurmatadd.c:76
DSDPSchurMatDiagonalScaling
int DSDPSchurMatDiagonalScaling(DSDPSchurMat, DSDPVec)
Get the scaling and nonzero pattern of each diagonal element of the matrix.
Definition dsdpschurmatadd.c:235
dsdpvec.h
Vector operations used by the solver.
DSDPVec
struct DSDPVec_C DSDPVec
This object hold m+2 variables: a scaling of C, the y variables, and r.
Definition dsdpvec.h:25
DSDPSchurMat_C
Schur complement matrix whose solution is the Newton direction.
Definition dsdpschurmat.h:35