feat: higher order Taylor expansions (quad/oct) - #33
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements higher order of Taylor expansions (quadrupoles and octupoles).
They act as a source of higher accuracy for those who need it, in cost of performance.
Quadrupoles are toggled as a sensible default (
#define PS_ORDER = 2).Below are some benchmarks showcasing the general difference performance and accuracy-wise between each setting, with
THETA=sqrt(12)ACCURACY TESTS
PS_ORDER = 1
[METRIC] uniform-512: rms_relative_error=0.036429 max_relative_error=0.217696
[METRIC] two-clusters-512: rms_relative_error=0.058618 max_relative_error=0.155663
PS_ORDER = 2
[METRIC] uniform-512: rms_relative_error=0.004189 max_relative_error=0.046053
[METRIC] two-clusters-512: rms_relative_error=0.007404 max_relative_error=0.037780
PS_ORDER = 3
[METRIC] uniform-512: rms_relative_error=0.000971 max_relative_error=0.012762
[METRIC] two-clusters-512: rms_relative_error=0.001346 max_relative_error=0.008965
PERFORMANCE TESTS
PS_ORDER = 1
N,Direct_Time,FMM_Time_ST,FMM_Time_MT
1000,0.000295,0.012052,0.007970
2500,0.001651,0.030599,0.007863
5000,0.006747,0.062310,0.025426
10000,0.026680,0.138287,0.046062
15000,0.061499,0.220854,0.056385
20000,0.108018,0.292596,0.074394
25000,0.173939,0.381255,0.098638
50000,0.702443,0.797964,0.197827
75000,1.653841,1.267395,0.306517
100000,3.227759,1.785016,0.424795
150000,7.673903,2.694467,0.645317
200000,12.886704,3.581957,0.959547
PS_ORDER = 2
N,Direct_Time,FMM_Time_ST,FMM_Time_MT
1000,0.000294,0.013998,0.012526
2500,0.001699,0.038598,0.008462
5000,0.006940,0.089117,0.031664
10000,0.029166,0.194092,0.045111
15000,0.066810,0.298451,0.069497
20000,0.122342,0.411555,0.098001
25000,0.193367,0.540451,0.128979
50000,0.774554,1.167462,0.265204
75000,1.777199,1.820340,0.422292
100000,3.239737,2.480748,0.582213
150000,7.637159,3.806646,0.917729
200000,13.223941,5.074902,1.274119
PS_ORDER = 3
N,Direct_Time,FMM_Time_ST,FMM_Time_MT
1000,0.000257,0.017439,0.018197
2500,0.001653,0.054577,0.021085
5000,0.006793,0.130414,0.034317
10000,0.028812,0.290678,0.076779
15000,0.067244,0.456550,0.119921
20000,0.120827,0.617777,0.164437
25000,0.191577,0.803649,0.206227
50000,0.776518,1.754386,0.460201
75000,1.777746,2.771423,0.715856
100000,3.227438,3.826405,0.991993
150000,7.677042,5.730357,1.544024
200000,13.468767,7.907193,2.099430
NOTE: bad performance is caused by high theta value, a sensible default for real-time simulations and
PS_ORDER>1isTHETA=1.5F.