Skip to content

Commit

Permalink
added testcase for klu solver
Browse files Browse the repository at this point in the history
  • Loading branch information
Willi Braun committed Nov 12, 2015
1 parent 4a66b7a commit e54dc5e
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions simulation/modelica/linear_system/problem2.mos
Expand Up @@ -42,6 +42,15 @@ val(u3, 1.0);
val(i2, 0.0);
val(i2, 1.0);

simulate(linear_system.problem2, simflags="-ls klu");
getErrorString();

val(u3, 0.0);
val(u3, 1.0);
val(i2, 0.0);
val(i2, 1.0);



setCommandLineOptions("-d=dumpRecursiveTearing --recursiveTearing=1");

Expand Down Expand Up @@ -93,6 +102,16 @@ val(u3, 1.0);
val(i2, 0.0);
val(i2, 1.0);

simulate(linear_system.problem2, simflags="-ls klu");
getErrorString();

val(u3, 0.0);
val(u3, 1.0);
val(i2, 0.0);
val(i2, 1.0);



// Result:
// true
// ""
Expand Down Expand Up @@ -136,6 +155,16 @@ val(i2, 1.0);
// 2.804903282692988
// 8.881784197001253e-17
// 0.2804903282692989
// record SimulationResult
// resultFile = "linear_system.problem2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'linear_system.problem2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-ls klu'",
// messages = ""
// end SimulationResult;
// ""
// 0.0
// 2.804903282692988
// 0.0
// 0.2804903282692989
// true
// INeqn => i2 = u2 / r2[1]
// INeqn => i3 = u2 / r3[2]
Expand Down Expand Up @@ -201,4 +230,14 @@ val(i2, 1.0);
// 2.783634542322879
// -9.720195818495717e-28
// 0.2818936215284423
// record SimulationResult
// resultFile = "linear_system.problem2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'linear_system.problem2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-ls klu'",
// messages = ""
// end SimulationResult;
// ""
// 0.0
// 2.804903282692988
// 0.0
// 0.2804903282692989
// endResult

0 comments on commit e54dc5e

Please sign in to comment.