Skip to content

Commit

Permalink
Add Runge-Kutta numerical integration algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuttari committed Jul 30, 2024
1 parent 4b2b0c7 commit 99c5ab9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -8696,7 +8696,7 @@ def model : Joined<["--"], "model=">,
def solver : Joined<["--"], "solver=">,
Group<Simulation_Group>,
Visibility<[MarcoOption, MC1Option]>,
HelpText<"Solver (possible options: euler-forward, ida)">;
HelpText<"Solver (possible options: euler-forward, ida, rk4, rk-euler-forward, rk-midpoint, rk-heun, rk-ralston, rk-heun-euler, rk-bogacki-shampine, rk-fehlberg, rk-cash-karp, rk-dormand-prince, rk-euler-backward)">;

def variables_filter : Joined<["--"], "variables-filter=">,
Group<Simulation_Group>,
Expand Down
4 changes: 4 additions & 0 deletions clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,10 @@ void tools::addMarcoLinkerArgs(
} else if (solverString == "ida") {
CmdArgs.push_back("-lMARCORuntimeDriverIDA");
CmdArgs.push_back("-lMARCORuntimeSolverIDA");
} else if (solverString == "rk4" ||
solverString.starts_with("rk-")) {
CmdArgs.push_back("-lMARCORuntimeDriverRungeKutta");
CmdArgs.push_back("-lMARCORuntimeSolverRungeKutta");
}

// Add the remaining runtime libraries.
Expand Down

0 comments on commit 99c5ab9

Please sign in to comment.