Giter Site home page Giter Site logo

rajeshrinet / pystokes Goto Github PK

View Code? Open in Web Editor NEW
42.0 7.0 17.0 49.1 MB

PyStokes: phoresis and Stokesian hydrodynamics in Python

Home Page: https://pystokes.readthedocs.io

License: MIT License

Python 3.34% Makefile 0.25% Cython 96.41%
hydrodynamic-interactions phoretic-interactions force-fields stokesian-hydrodynamics active-particles colloids stokes-flow traction python cython

pystokes's People

Contributors

harpolea avatar khinsen avatar rajeshrinet avatar ronojoy avatar takodas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pystokes's Issues

Request for forming the full linear system so that the full system can be solved through linear algebra solvers

We want to request the fully coupled linear system (say the 47N*47N dense matrix for l=3) to be solved (or at least get the linear system assembled and we can pass to an external solver) so that we can get desired accuracy.

Some comments from Aleks in a list of emails discussing with Ronojoy,

Note that even if mat-vec product is O(N^2) and you use an iterative method like Conjugate Gradient, there is no reason to believe it will converge in O(1) iterations and thus be O(N^2) overall (though the wall screens hydrodynamic interactions so it may be). We have had a lot of luck with block-diagonal preconditioners though as we have discussed in the past, and this should work here too and help a lot. So in principle if one can write a matrix-vector product (which sounds like you more or less have already) and just assemble the dense (47*N)^2 matrices for each particle (the block diagonal blocks), this should be good enough to get a full solve easily in python.

What we need is an accurate mobility solver, i.e., we know forces and torques and slip, and want to get motion. This may require perhaps slight massaging of the linear system.

Update and document examples/other

The main example notebooks work fine, and are well documented. Under examples/other, there is additional example code that is not up to date (benchmarks/potDipole.py is for Python 2 and apparently a very old version of PyStokes, mima2d examples don't work for whatever reason). With the exception of periodic, there is no explanation either of what these examples are good for.

License copyright information

@rajeshrinet just checking the license for the purpose of the JOSS review.

I see that the copyright information is Rajesh Singh, and this may be completely correct. I just wanted to double check this, and that it should not be an institution? (For instance, I know that at Oxford I do not own the copyright to projects I work on.)

Dependencies not specified in setup.py

Sorry for another (similar) issue!

When following instructions to install from a checkout of the repo:

>> git clone https://github.com/rajeshrinet/pystokes.git
>> cd pystokes
>> python setup.py install

I am unable to

>> make test

because Matplotlib is missing.

Not sure where the requirements are currently specified: matplotlib is in the requirements.txt it looks as though setup.py does not look in there by default.

I'm not sure exactly how to solve this. Easiest would be to document for users to run:

pip install -r requirements.txt

Else if using pip to install you could specify install_requires in setup.py (which I see is currently commented out).

Reporting coverage

I'm not sure how much effort would be required for this, but it would be great to automatically generate a code coverage report so you could see what proportion of the code is currently covered by tests.

If this was a pure Python library, it would be very straightforward using coverage to generate the coverage info and codecov to produce reports.

However, because this is a Cython library, I am not sure what would be required to get coverage reporting up-and-running, so for now this is only open as a suggestion.

Optional dependency OdesPy

The instructions for installation from source mention OdesPy as an optional dependency, but don't say what difference OdesPy makes. Does it add functionality? Improve performance? As a JOSS reviewer, should I test PyStokes with or without OdesPy?

Provide instructions for contributing

JOSS requires "clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support". 2) and 3) are discussed in the README, but I didn't find guidelines for potential contributors.

pip install fails without cython installed

The instructions in the README to install using pip fail in a clean virtual environment. To reproduce:

python3 -m venv venv
source venv/bin/activate
pip install pystokes

This fails due to

ModuleNotFoundError: No module named 'Cython'

This is due to setup.py requiring Cython before it gets around to installing it as a dependency.

See here for more info about the problem:
http://docs.cython.org/en/latest/src/userguide/source_files_and_compilation.html#basic-setup-py

I've not dealt with this directly before, but it might be sufficient to create a pyproject.toml as suggested.

installation via pip broken

Several months ago I managed to install pystokes using pip with no issue. Currently this is not working. Installation steps:

  1. Created a virtual enviroment and upgaded pip to 24.0
  2. pip install pystokes
    Relevant output:
Collecting pystokes
  Downloading pystokes-2.3.0.tar.gz (2.4 MB)
Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "/home/XXX/virtual/pystokes/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/XXX/virtual/pystokes/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/XXX/virtual/pystokes/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-notslatr/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-notslatr/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-notslatr/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-notslatr/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 98, in <module>
        File "/tmp/pip-build-env-notslatr/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1010, in cythonize
          module_list, module_metadata = create_extension_list(
                                         ^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-notslatr/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 845, in create_extension_list
          for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
        File "/tmp/pip-build-env-notslatr/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 117, in nonempty
          raise ValueError(error_msg)
      ValueError: 'pystokes/power/*.pyx' doesn't match any files
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.