-
Notifications
You must be signed in to change notification settings - Fork 13
Modularize Radial Quadrature Generation #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
20683c9
Starting modularization of radial quadratures, demonstrated on MHL
wavefunction91 a14393d
Moved over MHL entirely over to auto generator, starting working on TA
wavefunction91 ea87884
Merge branch 'master' into feature/modular_radial
wavefunction91 034f8bf
Fixup of TA radial traits
wavefunction91 4c994e8
Merge branch 'master' into feature/modular_radial
wavefunction91 4e01441
Added Treutler-Ahlrichs RadialTransformQuadrature, confirmed the same…
wavefunction91 785f6cc
Moved TA implementation over to RadialTransformQuadrature
wavefunction91 8152951
Added MuraKnowles RadialTransformQuadrature, confirmed the same as ha…
wavefunction91 55f2f88
Moved MK implementation over to RadialTransformQuadrature
wavefunction91 c9936ea
Add dox to new MHL implemenatation
wavefunction91 01a1ce4
Add dox to new TA implemenatation
wavefunction91 7331e2c
Dox fixup
wavefunction91 adbcddc
Merge branch 'master' into feature/modular_radial
wavefunction91 ffad94c
RadialTraits are now runtime configurable
wavefunction91 2443b80
Merge branch 'master' into feature/modular_radial
wavefunction91 44e6c97
Remove internal bounds transformations from GC quadratures
wavefunction91 680ff08
Merge branch 'master' into feature/modular_radial
wavefunction91 ec2283a
Update GC header conventions
wavefunction91 734dfb6
Merge branch 'master' into feature/modular_radial
wavefunction91 af58ea7
Merge branch 'master' into feature/modular_radial
wavefunction91 8caf841
Add reference MK data from Molpro (HT @pjknowles)
wavefunction91 5842dbb
Rename TreutlerAhlrichs{M4,}RadialTraits, add dox for M3 code path
wavefunction91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| #pragma once | ||
|
|
||
| #include <integratorxx/quadrature.hpp> | ||
|
|
||
| namespace IntegratorXX { | ||
|
|
||
| template <typename BaseQuad, typename RadialTraits> | ||
| struct RadialTransformQuadrature : | ||
| public Quadrature<RadialTransformQuadrature<BaseQuad, RadialTraits>> { | ||
|
|
||
| using base_type = Quadrature<RadialTransformQuadrature<BaseQuad, RadialTraits>>; | ||
|
|
||
| public: | ||
|
|
||
| using point_type = typename base_type::point_type; | ||
| using weight_type = typename base_type::weight_type; | ||
| using point_container = typename base_type::point_container; | ||
| using weight_container = typename base_type::weight_container; | ||
|
|
||
| RadialTransformQuadrature(size_t npts, const RadialTraits& traits = RadialTraits()) : | ||
| base_type( npts, traits ) { } | ||
|
|
||
| RadialTransformQuadrature( const RadialTransformQuadrature& ) = default; | ||
| RadialTransformQuadrature( RadialTransformQuadrature&& ) noexcept = default; | ||
|
|
||
| }; | ||
|
|
||
| template <typename BaseQuad, typename RadialTraits> | ||
| struct quadrature_traits<RadialTransformQuadrature<BaseQuad, RadialTraits>> { | ||
|
|
||
| using point_type = typename BaseQuad::point_type; | ||
| using weight_type = typename BaseQuad::weight_type; | ||
| using point_container = typename BaseQuad::point_container; | ||
| using weight_container = typename BaseQuad::weight_container; | ||
|
|
||
| inline static std::tuple<point_container,weight_container> | ||
| generate( size_t npts, const RadialTraits& traits ) { | ||
|
|
||
| using base_quad_traits = quadrature_traits<BaseQuad>; | ||
|
|
||
| point_container points( npts ); | ||
| weight_container weights( npts ); | ||
|
|
||
|
|
||
| const auto npts_base = base_quad_traits::bound_inclusive ? npts+2 : npts; | ||
| auto [base_x, base_w] = base_quad_traits::generate(npts_base); | ||
|
|
||
| const auto ipts_offset = !!base_quad_traits::bound_inclusive; | ||
| for(size_t i = 0; i < npts; ++i) { | ||
| const auto xi = base_x[i + ipts_offset]; | ||
| const auto wi = base_w[i + ipts_offset]; | ||
| points[i] = traits.radial_transform(xi); | ||
| weights[i] = wi * traits.radial_jacobian(xi); | ||
| } | ||
|
|
||
| return std::make_tuple(points, weights); | ||
| } | ||
|
|
||
| }; | ||
|
|
||
|
|
||
|
|
||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.