dftlibs / xcfun

XCFun: A library of exchange-correlation functionals with arbitrary-order derivatives
https://dftlibs.org/xcfun/
Mozilla Public License 2.0
57 stars 32 forks source link

Manual rebase of the user friendly setup routine #74

Closed ilfreddy closed 6 years ago

ilfreddy commented 6 years ago

The new routine takes a few integers as input. It combines them with bit manipulations. The final value corresponds to a unique eval xc_vars. Another integer fixes eval xc_mode. The return statement calls the original xc_eval_setup.

I have not tested it yet. Feedback welcome :-)

Still missing:

codecov-io commented 6 years ago

Codecov Report

Merging #74 into master will decrease coverage by 0.26%. The diff coverage is 35.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   44.25%   43.99%   -0.27%     
==========================================
  Files          78       78              
  Lines        1785     1839      +54     
==========================================
+ Hits          790      809      +19     
- Misses        995     1030      +35
Impacted Files Coverage Δ
src/xcfun.cpp 47.68% <35.18%> (-1.79%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 19eebdf...9de54fe. Read the comment docs.

ilfreddy commented 6 years ago

How do I add a test. I tried to copy the example.c but it does not seem to me that it is used anywhere...

robertodr commented 6 years ago

You have to compile it. Follow the example of testall in test/CMakeLists.txt.

ilfreddy commented 6 years ago

Test added.

ilfreddy commented 6 years ago

clang: I think xcfun si far from compliant with any clang style, (I take it back. XCFun is fully compliant, it seems ;-) ) and I am indeed not a fan of it in general. (this still applies! especially for the 2space indent: UGLY!)

Concerning the documentation of the enum, I am not able to do it properly. I think @bast or @uekstrom should consider that in case. I have closed #48. As far as I'm concerned this is good to go.

ilfreddy commented 6 years ago

I tried to extend the coverage of the test but it did not work... :-(