Skip to content
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

Integrated Green's Function Poisson Solver using heFFTe #4937

Merged
merged 61 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6bb19f9
[WIP]Integrated Green Function Poisson Solver
Haavaan May 16, 2024
d008dae
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2024
8202839
updated inputs
Haavaan Jun 4, 2024
a3eba97
Modified IGF.cpp file
Haavaan Jun 4, 2024
1279f59
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Haavaan Jun 5, 2024
59db31a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 5, 2024
0ee00c3
Latest IGF.cpp
Haavaan Jun 5, 2024
e894472
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 5, 2024
b34c665
Fixed the IGF file
Haavaan Jun 5, 2024
f6e3b1d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 5, 2024
846466b
IGF final
Haavaan Jun 6, 2024
66a4cc6
IGF final
Haavaan Jun 6, 2024
b2d30de
IGF file final
Haavaan Jun 6, 2024
514e7b7
Added BL_PROFILE in IGF file
Haavaan Jun 6, 2024
c5f4ad0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 6, 2024
8238888
Merge remote-tracking branch 'mainline/development' into heffte
Jun 13, 2024
4e65416
Merge remote-tracking branch 'mainline/development' into heffte
Jun 18, 2024
19501fa
Updated IntegratedGreenFunctionSolver
Jun 27, 2024
be9d339
Added CI Tests
Haavaan Jul 1, 2024
4fada0e
Check Compilation Flags
Haavaan Jul 2, 2024
e7d79b0
Added Multiplication
Haavaan Jul 5, 2024
203e61e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2024
73f95fc
Merge branch 'development' of github.com:ECP-WarpX/WarpX into alfredp…
aeriforme Aug 8, 2024
54edf7b
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Haavaan Aug 8, 2024
26f5a1d
removed inputs
Haavaan Aug 8, 2024
f6456d2
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Haavaan Aug 12, 2024
6922986
Merge branch 'heffte' of github.com:Haavaan/WarpX into alfredpr4937
aeriforme Aug 12, 2024
5280eb8
Update Source/ablastr/fields/IntegratedGreenFunctionSolver.cpp
Haavaan Aug 12, 2024
18dd29b
change import orders
Haavaan Aug 13, 2024
ad26eb6
Merge branch 'heffte' of github.com:Haavaan/WarpX into alfredpr4937
aeriforme Aug 13, 2024
5c3548a
fix macros and add timers
aeriforme Aug 14, 2024
70493c9
Merge remote-tracking branch 'mainline/development' into heffte
Haavaan Aug 14, 2024
3b14023
Merge pull request #3 from aeriforme/alfredpr4937
Haavaan Aug 14, 2024
27ff850
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 14, 2024
b46e025
update checksums and changed ifdefs
aeriforme Aug 14, 2024
91e504b
Merge pull request #4 from aeriforme/alfredpr4937
Haavaan Aug 14, 2024
f9f8892
Merge branch 'development' of github.com:ECP-WarpX/WarpX into alfredp…
aeriforme Aug 14, 2024
e7d842f
Merge pull request #5 from aeriforme/alfredpr4937
Haavaan Aug 14, 2024
6ceea04
mod GNUmake
aeriforme Aug 14, 2024
24d8164
Merge branch 'heffte' of github.com:Haavaan/WarpX into alfredpr4937
aeriforme Aug 14, 2024
7313e3e
fix GNUmakefile for real
aeriforme Aug 14, 2024
2d077f6
Merge pull request #6 from aeriforme/alfredpr4937
Haavaan Aug 14, 2024
985858e
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Haavaan Aug 19, 2024
7c16d44
Merge branch 'heffte' of github.com:Haavaan/Warpx into heffte
Haavaan Aug 19, 2024
7b05997
Merge branch 'development' of github.com:ECP-WarpX/WarpX into pr4937
aeriforme Sep 17, 2024
8478d7e
Merge branch 'development' of github.com:ECP-WarpX/WarpX into pr4937
aeriforme Sep 17, 2024
25b2426
heffte ctest
aeriforme Sep 17, 2024
0899f61
fix test input name
aeriforme Sep 17, 2024
acda0cc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 17, 2024
d6d05ee
Apply suggestions from code review
RemiLehe Sep 17, 2024
74a4a79
Update Source/ablastr/fields/IntegratedGreenFunctionSolver.cpp
RemiLehe Sep 17, 2024
60dbaf4
Start refactoring
RemiLehe Sep 17, 2024
0c33961
Continue refactoring
RemiLehe Sep 17, 2024
b105615
Continue refactoring
RemiLehe Sep 17, 2024
8bad107
Finish refactoring
RemiLehe Sep 17, 2024
723f04b
Fix unused variable
RemiLehe Sep 17, 2024
569bd1a
Fix compilation without heFFTe
RemiLehe Sep 18, 2024
66f2d6d
Fix bugs without heFFTe
RemiLehe Sep 18, 2024
70cbc23
Remove unneeded ifdef
RemiLehe Sep 18, 2024
58d4890
Merge branch 'development' into heffte
RemiLehe Sep 18, 2024
eb88d43
Update checksum
RemiLehe Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Examples/Tests/open_bc_poisson_solver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ if(WarpX_FFT)
OFF # dependency
)
endif()

if(WarpX_HEFFTE)
add_warpx_test(
test_3d_open_bc_poisson_solver_heffte # name
3 # dims
2 # nprocs
inputs_test_3d_open_bc_poisson_solver_heffte # inputs
analysis.py # analysis
diags/diag1000001 # output
OFF # dependency
)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FILE = inputs_test_3d_open_bc_poisson_solver
1 change: 1 addition & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ USE_OPENPMD = FALSE
WarpxBinDir = Bin

USE_FFT = FALSE
USE_HEFFTE = FALSE
USE_RZ = FALSE

USE_EB = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"lev=0": {
"Bx": 100915975.15792876,
"By": 157610677.31483692,
"Bz": 2.404060922276648e-13,
"Ex": 4.725066923361703e+16,
"Ey": 3.0253961494347724e+16,
"Ez": 3276584.4383433666,
"Bx": 100915975.15403552,
"By": 157610677.3147734,
"Bz": 1.2276713711194638e-13,
"Ex": 4.725066923359797e+16,
"Ey": 3.025396149317578e+16,
"Ez": 3276584.4383433824,
"rho": 10994013582437.197
},
"electron": {
"particle_momentum_x": 5.701279599504008e-19,
"particle_momentum_y": 3.650453172860547e-19,
"particle_momentum_x": 5.701279599509506e-19,
"particle_momentum_y": 3.650453172383178e-19,
"particle_momentum_z": 1.145432768297242e-10,
"particle_position_x": 17.31408691249785,
"particle_position_y": 0.2583691267187801,
"particle_position_y": 0.25836912671878015,
"particle_position_z": 10066.329600000008,
"particle_weight": 19969036501.910976
}
}
}
31 changes: 31 additions & 0 deletions Source/ablastr/fields/IntegratedGreenFunctionSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef ABLASTR_IGF_SOLVER_H
#define ABLASTR_IGF_SOLVER_H

#include <ablastr/constant.H>

#include <AMReX_BoxArray.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_MultiFab.H>
Expand Down Expand Up @@ -47,6 +49,35 @@ namespace ablastr::fields
return G;
}

/** @brief add
*
* @param[in] x x-coordinate of given location
* @param[in] y y-coordinate of given location
* @param[in] z z-coordinate of given location
*
* @return the sum of integrated Green function G
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::Real
SumOfIntegratedPotential (amrex::Real x, amrex::Real y, amrex::Real z, amrex::Real dx, amrex::Real dy, amrex::Real dz)
{
using namespace amrex::literals;


amrex::Real const G_value = 1._rt/(4._rt*ablastr::constant::math::pi*ablastr::constant::SI::ep0) * (
IntegratedPotential( x+0.5_rt*dx, y+0.5_rt*dy, z+0.5_rt*dz )
- IntegratedPotential( x-0.5_rt*dx, y+0.5_rt*dy, z+0.5_rt*dz )
- IntegratedPotential( x+0.5_rt*dx, y-0.5_rt*dy, z+0.5_rt*dz )
+ IntegratedPotential( x-0.5_rt*dx, y-0.5_rt*dy, z+0.5_rt*dz )
- IntegratedPotential( x+0.5_rt*dx, y+0.5_rt*dy, z-0.5_rt*dz )
+ IntegratedPotential( x-0.5_rt*dx, y+0.5_rt*dy, z-0.5_rt*dz )
+ IntegratedPotential( x+0.5_rt*dx, y-0.5_rt*dy, z-0.5_rt*dz )
- IntegratedPotential( x-0.5_rt*dx, y-0.5_rt*dy, z-0.5_rt*dz )
);

return G_value;
}

/** @brief Compute the electrostatic potential using the Integrated Green Function method
* as in http://dx.doi.org/10.1103/PhysRevSTAB.9.044204
*
Expand Down
Loading
Loading