@@ -3543,18 +3543,18 @@ protected function TDS_replaceSimEqSysIdxInJacobianMatrixWithUpdate "author: Wau
35433543algorithm
35443544 (jacOut,tplOut) := matchcontinue(jacIn,tplIn)
35453545 local
3546- Integer maxCol,jacIdx;
3546+ Integer maxCol,jacIdx,partIdx ;
35473547 list< SimCode . JacobianColumn > jacCols;
35483548 list< SimCodeVar . SimVar > vars;
35493549 String name;
3550- tuple < list < tuple < Integer , list < Integer >>>,list < tuple < Integer , list < Integer >>>> sparsePatt ;
3550+ SimCode . SparsityPattern sparsity,sparsityT ;
35513551 list< list< Integer >> colCols;
35523552 array< Integer > ass;
35533553 Integer newIdx;
3554- case (SOME ((jacCols,vars,name,sparsePatt, colCols,maxCol,jacIdx)),(newIdx,ass))
3554+ case (SOME (SimCode . JAC_MATRIX (jacCols,vars,name,sparsity,sparsityT, colCols,maxCol,jacIdx,partIdx )),(newIdx,ass))
35553555 equation
35563556 (jacCols,(newIdx,ass)) = List . mapFold(jacCols,TDS_replaceSimEqSysIdxInJacobianColumnWithUpdate ,(newIdx,ass));
3557- then (SOME ((jacCols,vars,name,sparsePatt, colCols,maxCol,jacIdx)),(newIdx,ass));
3557+ then (SOME (SimCode . JAC_MATRIX (jacCols,vars,name,sparsity,sparsityT, colCols,maxCol,jacIdx,partIdx )),(newIdx,ass));
35583558 else (jacIn,tplIn);
35593559 end matchcontinue;
35603560end TDS_replaceSimEqSysIdxInJacobianMatrixWithUpdate ;
@@ -3570,13 +3570,13 @@ algorithm
35703570 local
35713571 list< SimCode . SimEqSystem > simEqs;
35723572 list< SimCodeVar . SimVar > simVars;
3573- String colLen ;
3573+ Integer rowLen ;
35743574 array< Integer > ass;
35753575 Integer newIdx;
3576- case ( (simEqs,simVars,colLen ),(newIdx,ass))
3576+ case ( SimCode . JAC_COLUMN (simEqs,simVars,rowLen ),(newIdx,ass))
35773577 equation
35783578 (simEqs,(newIdx,ass)) = List . mapFold(simEqs,TDS_replaceSimEqSysIndexWithUpdate ,(newIdx,ass));
3579- then( (simEqs,simVars,colLen ),(newIdx,ass));
3579+ then ( SimCode . JAC_COLUMN (simEqs,simVars,rowLen ),(newIdx,ass));
35803580 else (jacIn,tplIn);
35813581 end matchcontinue;
35823582end TDS_replaceSimEqSysIdxInJacobianColumnWithUpdate ;
@@ -3585,22 +3585,15 @@ protected function TDS_replaceSimEqSysIdxInJacobianMatrix "author: Waurich TUD 2
35853585 Replaces the index with the assigned one in a jacobian matrix."
35863586 input Option < SimCode . JacobianMatrix > jacIn;
35873587 input array< Integer > assIn;
3588- output Option < SimCode . JacobianMatrix > jacOut;
3588+ output Option < SimCode . JacobianMatrix > jacOut = jacIn ;
35893589algorithm
3590- jacOut := matchcontinue(jacIn,assIn )
3590+ jacOut := matchcontinue(jacIn)
35913591 local
3592- Integer maxCol,jacIdx;
3593- list< SimCode . JacobianColumn > jacCols;
3594- list< SimCodeVar . SimVar > vars;
3595- String name;
3596- tuple< list< tuple< Integer , list< Integer >>>,list< tuple< Integer , list< Integer >>>> sparsePatt;
3597- list< list< Integer >> colCols;
3598- array< Integer > ass;
3599- Integer newIdx;
3600- case (SOME ((jacCols,vars,name,sparsePatt,colCols,maxCol,jacIdx)),_)
3592+ SimCode . JacobianMatrix jacMatrix;
3593+ case SOME (jacMatrix as SimCode . JAC_MATRIX ())
36013594 equation
3602- jacCols = List . map1(jacCols, TDS_replaceSimEqSysIdxInJacobianColumn ,assIn);
3603- then SOME ((jacCols,vars,name,sparsePatt,colCols,maxCol,jacIdx) );
3595+ jacMatrix . columns = List . map1(jacMatrix . columns, TDS_replaceSimEqSysIdxInJacobianColumn , assIn);
3596+ then SOME (jacMatrix );
36043597 else jacIn;
36053598 end matchcontinue;
36063599end TDS_replaceSimEqSysIdxInJacobianMatrix ;
@@ -3609,21 +3602,9 @@ protected function TDS_replaceSimEqSysIdxInJacobianColumn "author: Waurich TUD 2
36093602 Replaces the index with the assigned one in a jacobian column."
36103603 input SimCode . JacobianColumn jacIn;
36113604 input array< Integer > assIn;
3612- output SimCode . JacobianColumn jacOut;
3605+ output SimCode . JacobianColumn jacOut = jacIn ;
36133606algorithm
3614- jacOut := matchcontinue(jacIn,assIn)
3615- local
3616- list< SimCode . SimEqSystem > simEqs;
3617- list< SimCodeVar . SimVar > simVars;
3618- String colLen;
3619- array< Integer > ass;
3620- Integer newIdx;
3621- case ((simEqs,simVars,colLen),_)
3622- equation
3623- simEqs = List . map1(simEqs,TDS_replaceSimEqSysIndex ,assIn);
3624- then ((simEqs,simVars,colLen));
3625- else jacIn;
3626- end matchcontinue;
3607+ jacOut. columnEqns := List . map1(jacOut. columnEqns, TDS_replaceSimEqSysIndex , assIn);
36273608end TDS_replaceSimEqSysIdxInJacobianColumn ;
36283609
36293610protected function TDS_updateModelInfo "
0 commit comments