GithubHelp home page GithubHelp logo

sbrisard / pw85 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.58 MB

C++ implementation of the overlap test for ellipsoids introduced by Perram and Wertheim (J. Comp. Phys, 58(3), 409–416, 1985)

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.18% C 5.98% Python 27.81% Batchfile 1.93% Emacs Lisp 0.10% Meson 1.74% TeX 22.33% C++ 38.93%

pw85's People

Contributors

sbrisard avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pw85's Issues

Poor accuracy with spheres

The test of contact_function shows very poor accuracy with the following parameters

    golden_ratio = (1.+np.sqrt(5.))/2.
    norm = np.sqrt(1+golden_ratio**2)
    u_abs = 1./norm
    v_abs = golden_ratio/norm

    r = np.array([0., u_abs, v_abs])
    n1 = np.array([0., u_abs, v_abs])
    n2 = np.array([0., u_abs, v_abs])
    a1 = c1 = 1.999
    a2 = c2 = 0.0199

(these are spheres!)

Sphinx: make html

This ticket is strongly related to #1: the same changes should be implemented in the Makefile.

Change license to GPL?

PW85 now invokes the GSL implementation of the Brent algorithm. This probably requires to change the license to GPL (check the legal issue).

pw85.h.in → pw85.h generation problem

In the meson.build script, the following command

pw85_version = run_command('more', # `more` works on both windows and linux
			   join_paths(meson.source_root(),
				      '..',
				      'metadata',
				      'version.txt')).stdout().strip()

Leads to an incorrect header file

#define PW85_VERSION "::::::::::::::
C:/Users/sbrisard/Documents/programmes/pw85/src/../metadata/version.txt
::::::::::::::
1.0"

under windows/MSYS2. Replacing more with cat works fine.

DllExport?

This directive conflicts with how breathe processes the signature of functions.

The role of this directive is not clear. What is the consequence of removing it?

Sphinx: make.bat html

The make.bat that is automatically generated by sphinx-quickstart has been altered in order to place the generated html files in PROJECT_ROOT/docs (this is required by GitHub pages).

For the time being, the following command is executed

if exist "_build\html\" xcopy /i /s /e _build\html ..\docs

This hack should be made a bit more robust, by

  • testing whether the html target was indeed invoked,
  • sphinx-build ran successfully.

Change signature of function pw85_f

Owing to the use of the GSL library, the function pw85_f (to be maximized) needs to have a signature that is compatible with GSL, namely

double func(double x, void* params)

We propose to write a "low-level" implementation of pw85_f with precisely this signature. Besides, the value returned by this low-level implementation should be negated (as gsl_min_fminimizer_brent seeks minimizers). The hi-level implementation would keep the present signature.

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.