Skip to content

Commit

Permalink
Fixing minimalTearing
Browse files Browse the repository at this point in the history
  - Reversing lists that should be reversed so that equations and jacobians are in the same order
  - Fixing wrong print for minimalTearing
  • Loading branch information
AnHeuermann authored and AnHeuermann committed Feb 1, 2021
1 parent a609e58 commit 7e9cf32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions OMCompiler/Compiler/BackEnd/Tearing.mo
Expand Up @@ -159,7 +159,7 @@ protected function callTearingMethod
input BackendDAE.Shared ishared;
input list<Integer> eindex;
input list<Integer> vindx;
input Option<list<tuple<Integer, Integer, BackendDAE.Equation>>> ojac;
input BackendDAE.FullJacobian ojac;
input BackendDAE.JacobianType jacType;
input Boolean mixedSystem;
input Integer strongComponentIndex;
Expand Down Expand Up @@ -221,7 +221,7 @@ algorithm
case MINIMAL_TEARING()
algorithm
if Flags.isSet(Flags.TEARING_DUMP) or Flags.isSet(Flags.TEARING_DUMPVERBOSE) then
print("\nTearing type: total\n");
print("\nTearing type: minimal\n");
end if;
ocomp := minimalTearing(isyst, ishared, eindex, vindx, jacType, mixedSystem);
if debug then execStat("Tearing.minimalTearing"); end if;
Expand Down Expand Up @@ -1853,7 +1853,7 @@ try
// dumpTearingSetGlobalIndexes(BackendDAE.TEARINGSET(iterationVars, residualequations, listReverse(innerEquations), BackendDAE.EMPTY_JACOBIAN()),size," - STRICT SET");

// Return torn system
ocomp := BackendDAE.TORNSYSTEM(BackendDAE.TEARINGSET(iterationVars, residualequations, listReverse(innerEquations), BackendDAE.EMPTY_JACOBIAN()), NONE(), linear, mixedSystem);
ocomp := BackendDAE.TORNSYSTEM(BackendDAE.TEARINGSET(listReverse(iterationVars), listReverse(residualequations), listReverse(innerEquations), BackendDAE.EMPTY_JACOBIAN()), NONE(), linear, mixedSystem);
else
Error.addInternalError("function minimalTearing failed", sourceInfo());
fail();
Expand Down
Expand Up @@ -29,7 +29,7 @@ val(x8,1.0); getErrorString();
// resultFile = "Tearing18_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Tearing18', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// assert | debug | Solving non-linear system 34 failed at time=0.246.
// assert | debug | Solving non-linear system 34 failed at time=0.086.
// | | | | For more information please use -lv LOG_NLS.
// stdout | warning | Integrator attempt to handle a problem with a called assert.
// LOG_SUCCESS | info | The simulation finished successfully.
Expand Down

0 comments on commit 7e9cf32

Please sign in to comment.