void NonlinearRelationReduced2::computeJacglambda(double t, SiconosVector& lambda, SimpleMatrix& B) { B.setValue(0, 0, -40.0); B.setValue(1, 0, 0.0); B.setValue(0, 1, 0.0); B.setValue(1, 1, -40.0); }
void NonlinearRelationReduced2::computeJachx(double t, SiconosVector& x, SiconosVector& lambda, SimpleMatrix& C) { C.setValue(0, 0, -1); C.setValue(0, 1, 0); C.setValue(1, 0, 0); C.setValue(1, 1, -1); }
void NonlinearRelationWithSignInversed::computeJachx(double t, SiconosVector& x, SiconosVector& lambda, SimpleMatrix& C) { C.setValue(0, 0, 1); C.setValue(0, 1, 0); C.setValue(1, 0, 0); C.setValue(1, 1, 1); C.setValue(2, 0, 1); C.setValue(2, 1, 0); C.setValue(3, 0, 0); C.setValue(3, 1, 1); #ifdef SICONOS_DEBUG std::cout << "NonlinearRelationWithSignInversed::computeJachx computeJachx " << " at " << " " << t << ":" << std::endl; C.display(); std::cout << std::endl; #endif }
void NonlinearRelationWithSignInversed::computeJacglambda(double t, SiconosVector& lambda, SimpleMatrix& B) { B.setValue(0, 0, 0); B.setValue(1, 0, -10.0 * (1 + lambda(3))); B.setValue(0, 1, -10.0 * (1 + lambda(2))); B.setValue(1, 1, 0); B.setValue(0, 2, 10.0 * (1 - lambda(1))); B.setValue(1, 2, 0); B.setValue(0, 3, 0); B.setValue(1, 3, 10.0 * (1 - lambda(0))); #ifdef SICONOS_DEBUG std::cout << "NonlinearRelationWithSignInversed::computeJacgx " << " at " << " " << t << std::endl; B.display(); std::cout << std::endl; #endif }