Skip to content

Commit

Permalink
Add test for user defined tearing
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaeuber committed May 9, 2016
1 parent 0cd621f commit 17a3d11
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions simulation/modelica/tearing/Makefile
Expand Up @@ -78,6 +78,7 @@ AnnotationTest2-omc.mos \
totalTearing1.mos \
totalTearing2.mos \
totalTearing3.mos \
userDefinedTearing1.mos \



Expand Down
63 changes: 63 additions & 0 deletions simulation/modelica/tearing/userDefinedTearing1.mos
@@ -0,0 +1,63 @@
// name: userDefinedTearing1
// keywords: user defined tearing
// status: correct


loadFile("Tearing11.mo"); getErrorString();

setCommandLineOptions("+d=backenddaeinfo --setTearingVars=2,1,1 --setResidualEqns=2,1,2"); getErrorString();
simulate(Tearing11); getErrorString();

// Result:
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "Tearing11_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Tearing11', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Notification: Model statistics after passing the front-end and creating the data structures used by the back-end:
// * Number of equations: 11
// * Number of variables: 11
// Notification: Model statistics after passing the back-end for initialization:
// * Number of independent subsystems: 1
// * Number of states: 0 ('+d=stateselection' for list of states)
// * Number of discrete variables: 0 ('+d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('+d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for initialization (2):
// * Single equations (assignments): 1
// * Array equations: 0
// * Algorithm blocks: 0
// * Record equations: 0
// * When equations: 0
// * If-equations: 0
// * Equation systems (linear and non-linear blocks): 0
// * Torn equation systems: 1
// * Mixed (continuous/discrete) equation systems: 0
// Notification: Torn system details for strict tearing set:
// * Linear torn systems: 1 {(3,88.9%) 7}
// * Non-linear torn systems: 0
// Notification: Model statistics after passing the back-end for simulation:
// * Number of independent subsystems: 1
// * Number of states: 0 ('+d=stateselection' for list of states)
// * Number of discrete variables: 0 ('+d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('+d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for simulation (2):
// * Single equations (assignments): 1
// * Array equations: 0
// * Algorithm blocks: 0
// * Record equations: 0
// * When equations: 0
// * If-equations: 0
// * Equation systems (linear and non-linear blocks): 0
// * Torn equation systems: 1
// * Mixed (continuous/discrete) equation systems: 0
// Notification: Torn system details for strict tearing set:
// * Linear torn systems: 1 {(1,100.0%) 9}
// * Non-linear torn systems: 0
// "
// endResult

0 comments on commit 17a3d11

Please sign in to comment.