Skip to content

Commit

Permalink
Catch failure to solve for differentials earlier. At least makes a le…
Browse files Browse the repository at this point in the history
…ss confusing error in cases like #157, #165, #170
  • Loading branch information
dsharlet committed May 5, 2023
1 parent c9351f9 commit 783e389
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Circuit/Simulation/TransientSolution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public static TransientSolution Solve(Analysis Analysis, Expression TimeStep, IE

LogExpressions(Log, MessageType.Verbose, "Discretized system:", system.Select(i => Equal.New(i, 0)));

if (system.DependsOn(dy_dt))
throw new Exception("Failed to eliminate differentials from system of equations.");

// Solving the system...
List<SolutionSet> solutions = new List<SolutionSet>();

Expand Down

0 comments on commit 783e389

Please sign in to comment.