00001
00002
00003
00004
00005 #ifndef PETSCQPGEN
00006 #define PETSCQPGEN
00007
00008 #include "petscmat.h"
00009
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013
00014 void newPetscBounds( Vec templateVec,
00015 Vec * low, Vec * ilow,
00016 Vec * upp, Vec * iupp,
00017 int * ierr );
00018
00019 void freePetscBounds( Vec low, Vec ilow,
00020 Vec upp, Vec iupp );
00021
00022
00023 void newPetscQpGen( Vec templateXVec,
00024 Vec * c,
00025 Mat * Q, int * nnzQrows,
00026 Vec * xlow, Vec * ixlow, Vec * xupp, Vec * ixupp,
00027 Vec templateYVec,
00028 Mat * A, int * nnzArows, Vec * b,
00029 Vec templateZVec,
00030 Mat * C, int * nnzCrows,
00031 Vec * clow, Vec * iclow, Vec * cupp, Vec * icupp,
00032 int * ierr );
00033
00034 void freePetscQpGen( Vec c, Mat Q,
00035 Vec xlow, Vec ixlow, Vec xupp, Vec ixupp,
00036 Mat A, Vec b,
00037 Mat C, Vec clow,
00038 Vec iclow, Vec cupp, Vec icupp );
00039
00040 void PetscQPSolve( Vec c, Mat Q, int nnzQ,
00041 Vec xlow, Vec ixlow, Vec xupp, Vec ixupp,
00042 Mat A, int nnzA, Vec b,
00043 Mat C, int nnzC,
00044 Vec clow, Vec iclow, Vec cupp, Vec icupp,
00045 Vec x, Vec y, Vec z,
00046 int * ierr );
00047
00048 #ifdef __cplusplus
00049 };
00050 #endif
00051
00052 #endif