DSDP
dsdpschurmat.h
Go to the documentation of this file.
1#if !defined(__DSDP_SCHURMATRIXOPERATIONS_H)
2#define __DSDP_SCHURMATRIXOPERATIONS_H
3
9#include "dsdpvec.h"
10#include "dsdpbasictypes.h"
11#include "dsdpcg.h"
12
13
14typedef struct {
15 int *var;
16 int nvars;
17 int nmaxvars;
18 double *fval;
19 double *fdual;
20 double *xout;
21} FixedVariables;
22
23typedef struct {
24 FixedVariables fv;
25 DSDPVec rhs3,dy3;
26 double dd,r;
27 int m;
28} DSDPSchurInfo;
29
36 void* data;
37 struct DSDPSchurMat_Ops *dsdpops;
38 DSDPSchurInfo* schur;
39};
40
50
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
56extern int DSDPSchurMatSetData(DSDPSchurMat*,struct DSDPSchurMat_Ops*, void*);
57
62extern int DSDPSchurMatShiftDiagonal(DSDPSchurMat, double);
65extern int DSDPSchurMatMultR(DSDPSchurMat, DSDPVec, DSDPVec);
71extern int DSDPSchurMatSetR(DSDPSchurMat, double);
72
74extern int DSDPSchurMatAddRow(DSDPSchurMat, int, double, DSDPVec);
75
76extern int DSDPSchurMatVariableCompute(DSDPSchurMat, int, double*);
77extern int DSDPSchurMatVariableComputeC(DSDPSchurMat, double*);
79extern int DSDPSchurMatAddDiagonalElement(DSDPSchurMat, int, double);
80extern int DSDPSchurMatAddC(DSDPSchurMat,int,double);
81extern int DSDPSchurMatAddR(DSDPSchurMat,int,double);
82
85
87
88extern int DSDPZeroFixedVariables( DSDPSchurMat, DSDPVec);
89extern int DSDPApplyFixedVariables( DSDPSchurMat, DSDPVec);
90extern int DSDPIsFixed( DSDPSchurMat, int, DSDPTruth*);
91extern int DSDPInitializeFixedVariable( FixedVariables *);
92extern int DSDPAddFixedVariable( DSDPSchurMat, int, double);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
99
100
Solver, solution types, termination codes,.
DSDPTruth
Boolean variables.
Internal data structure for CG method.
int DSDPSchurMatInParallel(DSDPSchurMat, DSDPTruth *)
Determine whether M is computed in parallel.
Definition: dsdpschurmat.c:149
int DSDPSchurMatSetData(DSDPSchurMat *, struct DSDPSchurMat_Ops *, void *)
Set the Schur matrix with an opaque pointer and structure of function pointers.
Definition: dsdpschurmat.c:28
int DSDPSchurMatShiftDiagonal(DSDPSchurMat, double)
Add a scalar to each diagonal element of the matrix.
Definition: dsdpschurmat.c:120
int DSDPSchurMatAddDiagonal(DSDPSchurMat, DSDPVec)
Add elements to a row of the Schur matrix.
int DSDPSchurMatAddR(DSDPSchurMat, int, double)
Add an element to the Schur matrix correponding the variable r.
int DSDPSchurMatSetup(DSDPSchurMat, DSDPVec)
Set up the data structure.
Definition: dsdpschurmat.c:352
int DSDPSchurMatSolve(DSDPSchurMat, DSDPVec, DSDPVec)
Solve the linear system.
Definition: dsdpschurmat.c:466
int DSDPSchurMatZeroEntries(DSDPSchurMat)
Zero all element in the matrix.
Definition: dsdpschurmat.c:97
int DSDPSchurMatMultiply(DSDPSchurMat, DSDPVec, DSDPVec)
Multiply M by a vector. y = M x.
Definition: dsdpschurmat.c:231
int DSDPSchurMatRowScaling(DSDPSchurMat, DSDPVec)
Identify which rows on on this processor.
Definition: dsdpschurmat.c:399
int DSDPSchurMatView(DSDPSchurMat)
Print the matrix.
Definition: dsdpschurmat.c:376
int DSDPSchurMatVariableCompute(DSDPSchurMat, int, double *)
Determine with the cone should compute this diagonal element of M and RHS.
int DSDPSchurMatFactor(DSDPSchurMat, DSDPTruth *)
Factor M.
Definition: dsdpschurmat.c:196
int DSDPSchurMatRowColumnScaling(DSDPSchurMat, int, DSDPVec, int *)
Get the scaling and nonzero pattern of each column in this row of the matrix.
int DSDPSchurMatSetR(DSDPSchurMat, double)
Set up the data structure.
Definition: dsdpschurmat.c:338
int DSDPSchurMatInitialize(DSDPSchurMat *)
Initialize pointers to null.
Definition: dsdpschurmat.c:79
int DSDPSchurMatAssemble(DSDPSchurMat)
Final assembly of M.
Definition: dsdpschurmat.c:174
int DSDPSchurMatVariableComputeR(DSDPSchurMat, double *)
Add an element to the Schur matrix correponding the variable r.
int DSDPSchurMatDestroy(DSDPSchurMat *)
Free the memory in the data structure.
Definition: dsdpschurmat.c:414
int DSDPSchurMatAddDiagonalElement(DSDPSchurMat, int, double)
Determine with the cone should compute this diagonal element of M and RHS.
int DSDPSchurMatReducePVec(DSDPSchurMat, DSDPVec)
Collect elements of the vector.
Definition: dsdpschurmat.c:307
int DSDPSchurMatAddRow(DSDPSchurMat, int, double, DSDPVec)
Add elements to a row of the Schur matrix.
int DSDPSchurMatDiagonalScaling(DSDPSchurMat, DSDPVec)
Get the scaling and nonzero pattern of each diagonal element of the matrix.
Vector operations used by the solver.
struct DSDPVec_C DSDPVec
This object hold m+2 variables: a scaling of C, the y variables, and r.
Definition: dsdpvec.h:25
Schur complement matrix whose solution is the Newton direction.
Definition: dsdpschurmat.h:35