[kernel] correct bug in initialization
@@ -472,14 +472,23 @@ void NewMarkAlphaOSI::fillDSLinks(Interaction &inter,
assert(ds1);
assert(ds2);
+ VectorOfBlockVectors& DSlink = inter.linkToDSVariables();
+ interProp.workVectors.reset(new VectorOfVectors);
+ interProp.workMatrices.reset(new VectorOfSMatrices);
+
+
VectorOfVectors& workV = *interProp.workVectors;
- workV.resize(NewMarkAlphaOSI::WORK_INTERACTION_LENGTH);
- workV[NewMarkAlphaOSI::OSNSP_RHS].reset(new SiconosVector(inter.getSizeOfY()));
+ VectorOfSMatrices& workM = *interProp.workMatrices;
+
- VectorOfBlockVectors& DSlink = inter.linkToDSVariables();
Relation &relation = *inter.relation();
+ relation.initializeWorkVectorsAndMatrices(inter, DSlink, workV, workM);
RELATION::TYPES relationType = relation.getType();
+ workV.resize(NewMarkAlphaOSI::WORK_INTERACTION_LENGTH);
+ workV[NewMarkAlphaOSI::OSNSP_RHS].reset(new SiconosVector(inter.getSizeOfY()));
+
+
NonSmoothLaw & nslaw = *inter.nonSmoothLaw();
Type::Siconos nslType = Type::value(nslaw);
