diff --git a/README.md b/README.md index 3db6346..4524f64 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Py2D leverages JAX, a high-performance numerical computing library, allowing for - python 3.10 - [jax](https://pypi.org/project/jax/) - - [scipy](https://pypi.org/project/scipy/) + - [jaxlib](https://pypi.org/project/jaxlib/) - [numpy](https://pypi.org/project/numpy/) ## Installation @@ -44,20 +44,14 @@ Then install py2d locally on your system cd py2d pip install -e ./ ``` -Install basic scientific libraries -``` -pip install numpy scipy -``` -### Install JAX -JAX can be installed for either CPU-only or GPU-supported environments. Follow the instructions below based on your requirements: -#### For CPU-only usage -> This installation will allow you to use JAX with CPU support but without GPU acceleration. -``` -pip install jax -``` +### A note on JAX +JAX can be installed for either CPU-only or GPU-supported environments. + +The default installation above will install JAX with CPU support but without GPU acceleration. + #### For GPU support -[Installing JAX](https://jax.readthedocs.io/en/latest/installation.html) +For instructions on installing with GPU support see [Installing JAX](https://jax.readthedocs.io/en/latest/installation.html). > Note: Note: GPU support requires a compatible NVIDIA GPU and the correct CUDA and CuDNN versions installed on your system. If you're unsure about your CUDA and CuDNN versions, consult the documentation for your GPU and the JAX installation guide for further guidance. ### If using JAX with Pytorch: diff --git a/py2d/Py2D_solver.py b/py2d/Py2D_solver.py index a500582..66b4940 100644 --- a/py2d/Py2D_solver.py +++ b/py2d/Py2D_solver.py @@ -8,7 +8,6 @@ # Import os module import os -# os.chdir('../../py2d/') from pathlib import Path # Import Python Libraries @@ -24,10 +23,10 @@ print(jax.devices()) # Import Custom Module -from py2d.convection_conserved import convection_conserved, convection_conserved_dealias -from py2d.convert import Omega2Psi_2DFHIT_spectral, Psi2UV_2DFHIT_spectral -from py2d.aposteriori_analysis import eddyTurnoverTime_2DFHIT -from py2d.SGSModel import * +from .convection_conserved import convection_conserved +from .convert import Omega2Psi_2DFHIT_spectral, Psi2UV_2DFHIT_spectral +from .aposteriori_analysis import eddyTurnoverTime_2DFHIT +from .SGSModel import * # from py2d.uv2tau_CNN import * from py2d.initialize import gridgen, initialize_wavenumbers_2DFHIT, initialize_perturbation @@ -479,4 +478,4 @@ def Py2D_solver(Re, fkx, fky, alpha, beta, NX, SGSModel_string, eddyViscosityCoe readTrue=False, ICnum=1, # Initial condition number: Choose between 1 to 20 resumeSim=False, # tart new simulation (False) or resume simulation (True) - ) \ No newline at end of file + ) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9416e6f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[build-system] +requires = ["setuptools >= 61"] +build-backend = "setuptools.build_meta" + +[project] +name = "Py2D" +version = "0.1" +description = "Python solver for incompressible 2D Navier-Stokes equations." +authors = [ + { name="Karan Jakhar", email="karanj@uchicago.edu" }, +] +readme = "README.md" +license = {file = "LICENSE"} +requires-python = ">=3.10" +classifiers = [ + "License :: OSI Approved :: MIT License", + "Development Status :: 3 - Alpha", + "Natural Language :: English", + "Programming Language :: Python :: 3", + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + "Operating System :: OS Independent", +] +dependencies = [ + "numpy", + "jax", + "jaxlib", +] + +[project.urls] +"Homepage" = "https://github.com/envfluids/py2d" +"Bug Tracker" = "https://github.com/envfluids/py2d/issues" + +[tool.setuptools] +packages = ["py2d"] +include-package-data = true \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 939aad7..0000000 --- a/setup.py +++ /dev/null @@ -1,7 +0,0 @@ -from distutils.core import setup -setup( - name='py2d', - version='0.1', - packages=['py2d'], - Description="Python 2D Navier-Stokes solver", -)