Program listing for file kernel/src/simulationTools/QP.hpp#

  1#ifndef QP_H
  2#define QP_H
  3
  4#include "OneStepNSProblem.hpp"
  5#include "SimpleMatrix.hpp"
  6#include "SiconosVector.hpp"
  7
  8
  9
 10class QP : public OneStepNSProblem
 11{
 12private:
 13
 14  ACCEPT_SERIALIZATION(QP);
 15
 16
 17
 18  SP::SiconosMatrix _Q;
 19
 20
 21  SP::SiconosVector _p;
 22
 23
 24
 25
 26public:
 27
 28
 29  QP() = default;
 30
 31
 32  ~QP(){};
 33
 34
 35
 36
 37
 38  inline const SimpleMatrix getQ() const
 39  {
 40    return *_Q;
 41  }
 42
 43
 44  inline SP::SiconosMatrix q() const
 45  {
 46    return _Q;
 47  }
 48
 49
 50  inline void setQ(const SiconosMatrix& newValue)
 51  {
 52    *_Q = newValue;
 53  }
 54
 55
 56  inline void setQPtr(SP::SiconosMatrix newPtr)
 57  {
 58    _Q = newPtr;
 59  }
 60
 61
 62
 63  inline const SiconosVector getP() const
 64  {
 65    return *_p;
 66  }
 67
 68
 69  inline SP::SiconosVector p() const
 70  {
 71    return _p;
 72  }
 73
 74
 75  inline void setP(const SiconosVector& newValue)
 76  {
 77    *_p = newValue;
 78  }
 79
 80
 81  inline void setPPtr(SP::SiconosVector newPtr)
 82  {
 83    _p = newPtr;
 84  }
 85
 86
 87
 88
 89  int compute(double time);
 90
 91
 92  void display() const;
 93
 94
 95  void computeInteractionBlock(const InteractionsGraph::EDescriptor&)
 96  {
 97    assert(false);
 98  }
 99
100  void computeDiagonalInteractionBlock(const InteractionsGraph::VDescriptor&)
101  {
102    assert(false);
103  }
104
105  virtual bool preCompute(double time)
106  {
107    assert(false);
108    return false;
109  }
110
111  void postCompute()
112  {
113    assert(false);
114  }
115
116};
117
118#endif