Commit Graph

51 Commits

Author SHA1 Message Date
Marek Nečada 1328077490 Ewald sum optimisation
Avoiding repeated cpow() calls yields more than 5x speedup
in the off-plane case.
2020-07-03 11:46:34 +03:00
Marek Nečada 6009de6fa2 Evaluate scattered electric fields in 2d-periodic system.
Former-commit-id: 36386215f9d330a3047cb9a294ccc1de55f2121f
2020-05-31 16:34:09 +03:00
Marek Nečada 61a2baecb0 Constant factors in general (off-plane) Ewald 2D-in-3D sum
Former-commit-id: a8224c69682b765a36988ee62e399d97cd979f2c
2020-05-30 22:39:20 +03:00
Marek Nečada 97977dbb46 WIP Ewald 2D in 3D general z != 0 constant factors.
Former-commit-id: 787689f357bd8670948ba8ce7d8dc1205ca77d0f
2020-05-29 15:55:52 +03:00
Marek Nečada 975d23b557 Branch selection for Δ_n in Ewald sum
Former-commit-id: 6c3d6e6aa9010bb66975f65397b8a061fac1b5ef
2020-05-28 13:13:08 +03:00
Marek Nečada c50f40a747 Implementation of the Δ_n factor as a series; error estimates.
The error estimate for the recurrence approach is buggy.


Former-commit-id: f5183eaacf6a592461f07f72e04d346a42f9fca6
2020-05-27 15:52:13 +03:00
Marek Nečada 85dbf79caa WIP 2D-in-3D Ewald sum for z != 0
Not tested; error estimates not yet implemented.


Former-commit-id: d6886f64eb8b7e137abf6f187f8cd75f21a5f591
2020-05-19 17:10:00 +03:00
Marek Nečada 999dc7f72e Move MIN,MAX,SQ macros to a common header
Former-commit-id: 5f2598476b090ca3f9254325c1f69315182c8c30
2020-04-26 17:07:59 +03:00
Marek Nečada 1b4b397093 Cleanup: eliminate bare abort()s
Former-commit-id: bb1e4ada19e6bcbf87d6ea1fce0897c4478fb045
2020-03-26 19:19:40 +02:00
Marek Nečada 4dd3234b0a Remove the branch cut at negative real axis in Ewald sum.
Move the cut to the negative imaginary axis instead.

Also update comments.


Former-commit-id: a70e6a4db0ac33836d672d9ee2356ea19a899a30
2019-10-09 13:20:20 +03:00
Marek Nečada e7f0e0131f Basic branch selection functionality for incomplete Γ.
No modifications with effects on Ewald sums done yet.


Former-commit-id: e362341713ce306482386b9e6f2a48c336fad7a1
2019-10-06 01:30:29 +03:00
Marek Nečada 7e74cb100c Experimental speedup by earlier cutoff for Ewald summation.
TODO check whether PGen is properly destroyed


Former-commit-id: db2c64292b9c1bd80e97255bf71e570385b409a4
2019-09-30 17:57:06 +03:00
Marek Nečada e8a2426b55 Handle k->0 in Ewald sum.
Former-commit-id: fb61b297ead4828541b763b2ecdb0c81de1d35f1
2019-09-16 12:37:32 +03:00
Marek Nečada 20fac6036f Complex wave number for ewald sum (failing) + unit test.
Former-commit-id: a6c5e566028602ecd1047bc0b44677a4eeae3046
2019-08-19 15:10:39 +03:00
Marek Nečada a20a5ac067 ewald translations legacy code removal
Former-commit-id: da74041f5105d6b3a3f9fe3ddaa7306e973bd440
2019-08-19 10:55:45 +03:00
Marek Nečada 9bfba7077b Doxygen, TODO list.
Former-commit-id: 72381c6157319efecf6c62f98851df6194e2a972
2019-06-27 16:42:35 +03:00
Marek Nečada 1cbfb982d4 Replace PGEN_NEWR flag with PGEN_OLD_R with the opposite meaning.
Former-commit-id: 5fef7e81addc980a7202b55fd52152981abe5cba
2019-06-27 12:15:34 +03:00
Marek Nečada 328d22de89 Rename ewald3_constants, move legacy code
Former-commit-id: e83dcfa532f7b8d7345103752aca924a56ad7138
2018-12-21 19:31:45 +00:00
Marek Nečada fd1aed02ca Complex k support for new ewald sums.
Basic tests give good results (only up to rounding error differences
compared to the previous versions), the time increase is almost negligible.


Former-commit-id: 0907517ca94f130a0d8b140ba7b525653e24090f
2018-12-21 19:05:52 +00:00
Marek Nečada d2b34f9407 Some preparation for complex k
Former-commit-id: 62f3bc88de27f43ba82199a2fe221ba60b199e0d
2018-12-21 16:50:53 +02:00
Marek Nečada 4695792772 Test of the new api – results disagree with the old one.
Former-commit-id: ed09750246bca9a71e810745f443612ea0b989e8
2018-12-11 11:36:12 +00:00
Marek Nečada 3972f0a2e3 ewald.c fix new init memory management.
Former-commit-id: 582e34027bad4bd1ee017886d3dc2120a8c0bf3c
2018-12-11 11:09:38 +00:00
Marek Nečada be7da65b5a Wrap function ewald3_sigma_long
Former-commit-id: b36f1095d792b9bfd54d28fa9d0da5de0da0ba3f
2018-11-24 23:10:32 +00:00
Marek Nečada 0c55595d08 Implement LR part of 1D in 3D Ewald sum along z-axis; compiles, untested
Former-commit-id: 2a9b972dc012401c08758ee768667dfd3a3882c4
2018-11-24 12:51:57 +00:00
Marek Nečada b90bf2875b Práce na 1D ewaldovi; du dom.
Former-commit-id: dbecec91884dd005a2001c71d4bbe50de74fc8d0
2018-11-22 16:49:37 +02:00
Marek Nečada 577a4a5a28 Duspát
Former-commit-id: 03503b9541198b86495636cef73271f5cce1d759
2018-11-22 00:02:31 +00:00
Marek Nečada c7c9dc52b0 General 3D Ewald short-range part now compiles.
Unchecked, untested.


Former-commit-id: 40c10a0eef6575cd29e95be5a0908e28c24ded1d
2018-11-21 19:41:20 +00:00
Marek Nečada 11f380170a Half-implemented the general short-range part of ewald sum in 3D,
unchecked, untested, dudom.


Former-commit-id: b3551114b8c7136e378feb6dc78cb575a5bfc162
2018-11-21 19:49:07 +02:00
Marek Nečada c00855a1e6 dudom
Former-commit-id: 9584e40968c45c3acc25e90b51d28a1bb28b8f0c
2018-11-14 18:36:15 +02:00
Marek Nečada f660107925 Ewald summation – stupid implementation of alternative lattice sums
Former-commit-id: de2830e9e5b65fd679fcf5fd1e8ec3e13dba116a
2018-09-18 10:37:07 +00:00
Marek Nečada 68c1bf711a ewald.c: type qualifiers
Former-commit-id: d1436642545f21bf3bf4a74f4365ece45b3a5c7d
2018-09-15 18:32:49 +00:00
Marek Nečada 169c091806 Shifted lattices now consistent, TODO check overall shift sign and fix LR declarations
Former-commit-id: ff8a3a0b93447566a605bc7fe6ddbfe34dec3cd2
2018-09-14 21:10:10 +00:00
Marek Nečada e204242817 Fix branch selection in long-range ewald sum.
Now everything is consistent except for sigma0


Former-commit-id: 86132a0db0604ed8c56f725eb95c5b22a103b804
2018-09-13 01:16:13 +03:00
Marek Nečada 84a2b7f64d Fix spherical harmonics for negative m in ewald.c.
Former-commit-id: 960dd721a009e2b2f82c986677c3faa65d36394c
2018-09-10 15:28:41 +03:00
Marek Nečada 0426524842 konstantisace; dudopráce
Former-commit-id: a146fe83f9dbf17044cc723c325ba70230969e44
2018-09-10 05:10:13 +00:00
Marek Nečada bad8105c9b Fix legendre function indexing. Test pass for even m now.
Former-commit-id: 2bd5bfddc3eab30a0e1e7590d18f31bf5098d54e
2018-09-07 20:11:50 +00:00
Marek Nečada 1fca413cab Catch underflows; fix some off-by-one errors. Some test values pass now.
Former-commit-id: 3add9f21ad6fee5d443fafc3a6b2c02f2f8b6524
2018-09-07 17:46:07 +00:00
Marek Nečada fcf836e62e [ewald.c] Fix malloc size
Former-commit-id: a2da5e820d4835e1cf91ab308a63f0aedd431789
2018-09-07 12:39:52 +00:00
Marek Nečada fd6380a085 Found some memory-related bug
Former-commit-id: 684f9cbe9f7f8112aff5981215076182051c8235
2018-09-06 16:17:28 +03:00
Marek Nečada 5357d53fc5 Fix ewalds.c test output; n.b. the current long-range parts.
Former-commit-id: f51675842d53a2ba0c6c2821180c11fe60445257
2018-09-06 15:00:38 +03:00
Marek Nečada 1cd4733e85 Fix ewald32_sigma0()
Former-commit-id: 969764c516c0e0e8cc928e18447eb5327791d5bc
2018-09-06 11:52:54 +03:00
Marek Nečada adc731029e More test params etc. (still wrong results)
Former-commit-id: 589f4a643ac318f384554b83318355289fdf827d
2018-09-05 19:45:28 +00:00
Marek Nečada b707f65d83 Ewald sum first test compiles
Former-commit-id: bb63ffdade407900478c26f2e10bc0ee8efb5154
2018-09-05 18:50:02 +00:00
Marek Nečada e11f995b52 Scalar m,n indexing to allow n = 0.
Former-commit-id: 4b6f2f3611a00e2019b54bfe73c407baafdd8355
2018-09-05 12:39:02 +00:00
Marek Nečada 16ce3a6ba8 Sigma0 ready, it's time for writing some tests.
Former-commit-id: 956254dcd4c337374d945465ff228fc40595fc3e
2018-09-05 11:09:22 +00:00
Marek Nečada 03ab9755a5 ewald.c compiles
Former-commit-id: 7bcd240f3d9b5aba233550e4242736e700f96c35
2018-09-05 07:58:13 +00:00
Marek Nečada 858e997981 Ewald short-range part etc.
Former-commit-id: 181d2da97f80dfcbe942d27819d831895a2df263
2018-09-05 09:07:03 +03:00
Marek Nečada 6c09121a5d SR ewald sum in progress
Former-commit-id: 927486c4e73f5d60dd1f3c94ff5b4878506a5e17
2018-08-27 11:39:29 +00:00
Marek Nečada 7c0f285c23 Jdunakonferenci
Former-commit-id: e734bb63665d03b986a98e45f937979eacab58c4
2018-08-27 10:28:34 +03:00
Marek Nečada 758c37b2b2 Ewald summation LR part, stupid.
Former-commit-id: 9795ad00b41e83c30feb027853a13959d8b506ea
2018-08-27 09:45:11 +03:00