SimVascular / svZeroDSolver-Archived

A Python lumped-parameter solver for blood flow and pressure in hemodynamic networks
Other
12 stars 15 forks source link

Reorganized the repository files to be a Python package #30

Closed ktbolt closed 3 years ago

ktbolt commented 3 years ago

We would like to reorganized the repository files to represent a Python package. This will allow the 0D Solver to be run

1) Directly from the cloned repository

2) From SimVascular/Python/site-packages

3) As an installed Python package

ktbolt commented 3 years ago

@mrp089 @JonathanPham Here's a proposed organization

└── svZeroDSolver
    └── svzerodsolver
        ├── __init__.py
        ├── blocks.py
        ├── connections.py
        ├── setup.py
        ├── solver.py
        ├── time_integration.py
        ├── use_steady_bcs.py
        └── utils.py

where svZeroDSolver.py has been renamed solver.py.

You can execute the 0D solver directly from the github repo using

# Augment the default search path for module files. 
export PYTHONPATH=$PYTHONPATH:svZeroDSolver

# Execute the Python script as a module.
python -m svzerodsolver.solver solver.in
JonathanPham commented 3 years ago

@ktbolt Sounds good, thanks for reorganizing the 0D solver!

ktbolt commented 3 years ago

@JonathanPham @mrp089 I've merged the changes to reorganize the repository. I also updated the README.md describing how to access the svzerodsolver and install it.

JonathanPham commented 3 years ago

@ktbolt Thanks for making the updates!