00001
00002
00003
00004
00005 #ifndef QPBOUNDPETSCMEHROTRA
00006 #define QPBOUNDPETSCMEHROTRA
00007
00008 #include "petscmat.h"
00009 #include "OoqpMonitorData.h"
00010
00011 #ifdef __cplusplus
00012 extern "C" {
00013 #endif
00014
00017 typedef struct {
00018 void * solver;
00019 void * prob;
00020 void * qp;
00021 } QpBoundPetscContext;
00022
00023 void PetscQpBoundSolve( double alpha, Vec c, Mat Q, int nnzQ,
00024 Vec xlow, Vec ixlow, Vec xupp, Vec ixupp,
00025 Vec x,
00026 int * ierr );
00027 void PetscQpBoundSetup( double alpha, Vec c, Mat Q, int nnzQ,
00028 Vec xlow, Vec ixlow, Vec xupp, Vec ixupp,
00029 QpBoundPetscContext * ctx,
00030 int * ierr );
00031 void PetscQpBoundFinish( QpBoundPetscContext * ctx,
00032 Vec x, Vec t, Vec v, Vec tau, Vec nu,
00033 int * ierr );
00034 void PetscQpBoundCleanUp( QpBoundPetscContext * ctx );
00035
00036 void PetscQpBoundAddMonitor ( QpBoundPetscContext * ctx, DoItCFunc cmon,
00037 void * monitorContext );
00038 void PetscQpBoundUseStatus ( QpBoundPetscContext * ctx, int (*sta)(void *),
00039 void * statusContext );
00040 void PetscQpBoundMonitorSelf( QpBoundPetscContext * ctx );
00041 #ifdef __cplusplus
00042 }
00043 #endif
00044
00045 #endif