diff options
author | kamakshidasan | 2016-12-22 15:42:26 +0530 |
---|---|---|
committer | kamakshidasan | 2016-12-22 15:42:26 +0530 |
commit | a249d85c0e727d8251102e13aa179f64d5f8dbf7 (patch) | |
tree | 175c82701bf3d53ae8d2ba481fcc99f8ee961c40 /webapp/setup.js | |
parent | b2cd0d0cad32683971baf53efa2e50ff8d26f66b (diff) | |
download | xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.tar.gz xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.tar.bz2 xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.zip |
Rearrange folders
Diffstat (limited to 'webapp/setup.js')
-rw-r--r-- | webapp/setup.js | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/webapp/setup.js b/webapp/setup.js new file mode 100644 index 0000000..e1527fb --- /dev/null +++ b/webapp/setup.js @@ -0,0 +1,57 @@ +var finalIntegrationTime = 1.0E05; +var integratorAbsoluteTolerance = 1.0E-06; +var integratorRelativeTolerance = 1.0E-06; +var maximumStepSize = 0.0E00; +var realTimeScaling = 0.0E00; +var toleranceOnTime = 1.0E-10; +var maxIntegrationTimeInterval = 1.00001E05; +var solver = 0.0; +var defaultProperties = null; + +var expressionArray = [""]; + +var solver_kind_array = ["LSodar", "Sundials/CVODE - BDF - NEWTON", + "Sundials/CVODE - BDF - FUNCTIONAL", + "Sundials/CVODE - ADAMS - NEWTON", + "Sundials/CVODE - ADAMS - FUNCTIONAL", + "DOPRI5 - Dormand-Prince 4(5)", + "RK45 - Runge-Kutta 4(5)", + "Implicit RK45 - Implicit Runge-Kutta 4(5)", + "CRANI - Crank-Nicolson 2(3)", + "Sundials/IDA", + "DDaskr - Newton", + "DDaskr - GMRes" +]; + +function setup() { + + if (arguments[0] == "get") { + defaultProperties = { + i_time: ["Final Integration Time", "finalIntegrationTime", finalIntegrationTime], + ab_tolerance: ["Integrator Absolute Tolerance", "integratorAbsoluteTolerance", integratorAbsoluteTolerance], + rl_tolerance: ["Integrator Relative Tolerance", "integratorRelativeTolerance", integratorRelativeTolerance], + max_step_sze: ["Maximum step size(0 means no limit)", "maximumStepSize", maximumStepSize], + rt_scale: ["Real Time Scaling", "realTimeScaling", realTimeScaling], + tm_tolerance: ["Tolerance on Time", "toleranceOnTime", toleranceOnTime], + max_integ_time_interval: ["Maximum Integration Time Interval", "maxIntegrationTimeInterval", maxIntegrationTimeInterval], + solv_kind: ["Solver Kind", "solver", solver] + }; + return defaultProperties; + } else if (arguments[0] == "set") { + var properties = arguments[1]; + for (key in properties) { + window[key] = properties[key]; + } + + } else if (arguments[0] == "getArray") { + return solver_kind_array; + } +} + +function handleContext() { + if (arguments[0] == "get") { + return expressionArray; + } else if (arguments[0] == "set") { + expressionArray = arguments[1]; + } +} |