numODEsolver 0.3__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numodesolver-0.3 → numodesolver-0.4.1}/PKG-INFO +3 -3
- {numodesolver-0.3 → numodesolver-0.4.1}/README.md +2 -2
- {numodesolver-0.3 → numodesolver-0.4.1}/numODEsolver/solver.py +1 -13
- {numodesolver-0.3 → numodesolver-0.4.1}/numODEsolver.egg-info/PKG-INFO +3 -3
- {numodesolver-0.3 → numodesolver-0.4.1}/setup.py +1 -1
- {numodesolver-0.3 → numodesolver-0.4.1}/LICENSE +0 -0
- {numodesolver-0.3 → numodesolver-0.4.1}/numODEsolver/__init__.py +0 -0
- {numodesolver-0.3 → numodesolver-0.4.1}/numODEsolver.egg-info/SOURCES.txt +0 -0
- {numodesolver-0.3 → numodesolver-0.4.1}/numODEsolver.egg-info/dependency_links.txt +0 -0
- {numodesolver-0.3 → numodesolver-0.4.1}/numODEsolver.egg-info/requires.txt +0 -0
- {numodesolver-0.3 → numodesolver-0.4.1}/numODEsolver.egg-info/top_level.txt +0 -0
- {numodesolver-0.3 → numodesolver-0.4.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: numODEsolver
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Tool that solves and plots ODE's numerically. Written in Python.
|
|
5
5
|
Home-page: https://github.com/lukasnf/Numerical-ODE-Solver
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -33,7 +33,7 @@ from numODEsolver import solver
|
|
|
33
33
|
import matplotlib.pyplot as plt #optional for plot
|
|
34
34
|
|
|
35
35
|
solver = solver()
|
|
36
|
-
f = solver.get_function("cos(x)")
|
|
36
|
+
f = solver.get_function("cos(x)")
|
|
37
37
|
x,y = solver.solve_rk4(f,x0=0,y0=1,n=10000,bound=10.1)
|
|
38
38
|
print(solver.get_value(x,y,val=10,dec=5)
|
|
39
39
|
```
|
|
@@ -41,7 +41,7 @@ print(solver.get_value(x,y,val=10,dec=5)
|
|
|
41
41
|
# Version History
|
|
42
42
|
|
|
43
43
|
- 8.12.2024 - v0.1 -> only 1st order ODE's are solvable, more features coming soon
|
|
44
|
-
- 15.12.2024 -v0.2 ->
|
|
44
|
+
- 15.12.2024 - v0.2 -> removed plot function
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
---
|
|
@@ -17,7 +17,7 @@ from numODEsolver import solver
|
|
|
17
17
|
import matplotlib.pyplot as plt #optional for plot
|
|
18
18
|
|
|
19
19
|
solver = solver()
|
|
20
|
-
f = solver.get_function("cos(x)")
|
|
20
|
+
f = solver.get_function("cos(x)")
|
|
21
21
|
x,y = solver.solve_rk4(f,x0=0,y0=1,n=10000,bound=10.1)
|
|
22
22
|
print(solver.get_value(x,y,val=10,dec=5)
|
|
23
23
|
```
|
|
@@ -25,7 +25,7 @@ print(solver.get_value(x,y,val=10,dec=5)
|
|
|
25
25
|
# Version History
|
|
26
26
|
|
|
27
27
|
- 8.12.2024 - v0.1 -> only 1st order ODE's are solvable, more features coming soon
|
|
28
|
-
- 15.12.2024 -v0.2 ->
|
|
28
|
+
- 15.12.2024 - v0.2 -> removed plot function
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
---
|
|
@@ -3,21 +3,9 @@ from scipy.interpolate import interp1d
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
5
|
class solver:
|
|
6
|
-
|
|
7
|
-
def validate_func(self,func):
|
|
8
|
-
symbols = {"x":sp.Symbol("x"),"y":sp.Symbol("y"),"pi":sp.pi,"e":sp.E}
|
|
9
|
-
symbols_2 = sp.__dict__
|
|
10
|
-
try:
|
|
11
|
-
sp.sympify(func, {**symbols, **symbols_2})
|
|
12
|
-
return True
|
|
13
|
-
except:
|
|
14
|
-
raise ValueError("Invalid function")
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# get_function() -> Takes a function of x and y as an input. Make sure to use correct python syntax and put everything in curved brackets.
|
|
6
|
+
# get_function() -> Takes a function of x and y as an input. Make sure to use correct python syntax and put everything in curved brackets.
|
|
18
7
|
# --> Example: numODEsolver.get_function("x+y"), The diff.eq. would then be: y' = x+y and it will be numerically solved for y.
|
|
19
8
|
def get_function(self,func):
|
|
20
|
-
if self.validate_func(func):
|
|
21
9
|
x,y = sp.symbols("x,y")
|
|
22
10
|
func = sp.sympify(func)
|
|
23
11
|
f = sp.lambdify((x,y), func)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: numODEsolver
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Tool that solves and plots ODE's numerically. Written in Python.
|
|
5
5
|
Home-page: https://github.com/lukasnf/Numerical-ODE-Solver
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -33,7 +33,7 @@ from numODEsolver import solver
|
|
|
33
33
|
import matplotlib.pyplot as plt #optional for plot
|
|
34
34
|
|
|
35
35
|
solver = solver()
|
|
36
|
-
f = solver.get_function("cos(x)")
|
|
36
|
+
f = solver.get_function("cos(x)")
|
|
37
37
|
x,y = solver.solve_rk4(f,x0=0,y0=1,n=10000,bound=10.1)
|
|
38
38
|
print(solver.get_value(x,y,val=10,dec=5)
|
|
39
39
|
```
|
|
@@ -41,7 +41,7 @@ print(solver.get_value(x,y,val=10,dec=5)
|
|
|
41
41
|
# Version History
|
|
42
42
|
|
|
43
43
|
- 8.12.2024 - v0.1 -> only 1st order ODE's are solvable, more features coming soon
|
|
44
|
-
- 15.12.2024 -v0.2 ->
|
|
44
|
+
- 15.12.2024 - v0.2 -> removed plot function
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
---
|
|
@@ -8,7 +8,7 @@ classifiers = [
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="numODEsolver",
|
|
11
|
-
version= "0.
|
|
11
|
+
version= "0.4.1",
|
|
12
12
|
description= "Tool that solves and plots ODE's numerically. Written in Python.",
|
|
13
13
|
long_description=open("README.md").read(),
|
|
14
14
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|