siconos.kernel.QP (Python class)

class siconos.kernel.QP[source]

Bases: siconos.kernel.OneStepNSProblem

Quadratic Problem.

Generated class (swig), based on C++ header Program listing for file kernel/src/simulationTools/QP.hpp.



contains the data of the QP, according to siconos/numerics

compute(double time) → int[source]

To run the solver for ns problem.

Parameters:time – current time
Returns:int, information about the solver convergence.
computeDiagonalInteractionBlock(InteractionsGraph::VDescriptor) → None[source]

compute diagonal Interaction block

Parameters:vd – a vertex descriptor
computeInteractionBlock(InteractionsGraph::EDescriptor) → None[source]

compute extra-diagonal interactionBlock-matrix

Parameters:ed – an edge descriptor
display() → None[source]

print the data to the screen

getP() -> array_like (np.float64, 1D)[source]

get the value of p, the initial state of the DynamicalSystem

  • SiconosVector
  • **Warning** (: SiconosVector is an abstract class => can not be an lvalue =>) – return SiconosVector
getQ() -> array_like (np.float64, 2D)[source]

get the value of Q

p() -> array_like (np.float64, 1D)[source]

get p, the initial state of the DynamicalSystem

Returns:pointer on a SiconosVector
postCompute() → None[source]

post treatment for output of the solver

preCompute(double time) → bool[source]

prepare data of the osns for solving

Parameters:time – the current time
Returns:true if the computation of the OSNS has to be carry on, false otherwise
q() -> array_like (np.float64, 2D)[source]

get Q

Returns:pointer on a SiconosMatrix
setP(array_like (np.float64, 1D) newValue) → None[source]

set the value of p to newValue

Parameters:newValue – SiconosVector
setPPtr(array_like (np.float64, 1D) newPtr) → None[source]

set p to pointer newPtr

Parameters:newPtr – SiconosVector *
setQ(array_like (np.float64, 2D) newValue) → None[source]

set the value of Q to newValue

Parameters:newValue – SiconosMatrix
setQPtr(array_like (np.float64, 2D) newPtr) → None[source]

set Q to pointer newPtr

Parameters:newPtr – the new matrix