Skip to content

Commit

Permalink
Implement linear interpolation for both cell-centered and nodal data …
Browse files Browse the repository at this point in the history
…types (#3638)

* use two points and correct weights for higher order interpolation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* better alignment

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update Source/Parallelization/WarpXComm_K.H

Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>

* Reset CI benchmarks

* apply review suggestion

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* white space

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
  • Loading branch information
4 people authored Jan 31, 2023
1 parent 42661be commit 3b46d91
Show file tree
Hide file tree
Showing 14 changed files with 223 additions and 221 deletions.
36 changes: 18 additions & 18 deletions Regression/Checksum/benchmarks_json/Langmuir_multi_2d_MR.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"electrons": {
"particle_momentum_x": 4.244331469283422e-20,
"particle_momentum_x": 4.2444161670627625e-20,
"particle_momentum_y": 0.0,
"particle_momentum_z": 4.244331469283411e-20,
"particle_position_x": 0.655360445407094,
"particle_position_y": 0.6553604454070939,
"particle_momentum_z": 4.2444161670627534e-20,
"particle_position_x": 0.6553600939548604,
"particle_position_y": 0.6553600939548603,
"particle_weight": 3200000000000000.5
},
"lev=0": {
"Bx": 0.0,
"By": 34.880237093101385,
"By": 29.737451538726013,
"Bz": 0.0,
"Ex": 7573738411730.345,
"Ex": 7573333612867.881,
"Ey": 0.0,
"Ez": 7573738411730.373,
"jx": 7301940679621768.0,
"Ez": 7573333612867.912,
"jx": 7302034873723846.0,
"jy": 0.0,
"jz": 7301940679621819.0
"jz": 7302034873723940.0
},
"lev=1": {
"Bx": 0.0,
"By": 663.9253192035617,
"By": 446.4305912221662,
"Bz": 0.0,
"Ex": 7599937806859.2,
"Ex": 7598120399546.991,
"Ey": 0.0,
"Ez": 7599937806859.211,
"jx": 7111706209199148.0,
"Ez": 7598120399547.014,
"jx": 7112353090930550.0,
"jy": 0.0,
"jz": 7111706209199176.0
"jz": 7112353090930540.0
},
"positrons": {
"particle_momentum_x": 4.24387817954511e-20,
"particle_momentum_x": 4.2442478859032927e-20,
"particle_momentum_y": 0.0,
"particle_momentum_z": 4.243878179545099e-20,
"particle_position_x": 0.6553597738022557,
"particle_position_y": 0.6553597738022557,
"particle_momentum_z": 4.2442478859032854e-20,
"particle_position_x": 0.6553594719127074,
"particle_position_y": 0.6553594719127074,
"particle_weight": 3200000000000000.5
}
}
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"electrons": {
"particle_momentum_x": 4.2405417073382216e-20,
"particle_momentum_x": 4.2405874432036894e-20,
"particle_momentum_y": 0.0,
"particle_momentum_z": 4.24319208902951e-20,
"particle_position_x": 0.6553602236954971,
"particle_position_y": 0.6553603460513587,
"particle_momentum_z": 4.244580453138521e-20,
"particle_position_x": 0.6553598605721321,
"particle_position_y": 0.6553603207806843,
"particle_weight": 3200000000000000.5
},
"lev=0": {
"Bx": 0.0,
"By": 29.016398075047086,
"By": 23.062372881797263,
"Bz": 0.0,
"Ex": 7578443960945.405,
"Ex": 7577963733795.349,
"Ey": 0.0,
"Ez": 7572873581953.129,
"jx": 7295166572198360.0,
"Ez": 7570635848192.088,
"jx": 7295313940906670.0,
"jy": 0.0,
"jz": 7303381904136724.0
"jz": 7305416311341798.0
},
"lev=1": {
"Bx": 0.0,
"By": 72.99870260220474,
"By": 56.70499647861526,
"Bz": 0.0,
"Ex": 4606426110840.904,
"Ex": 4604568214719.308,
"Ey": 0.0,
"Ez": 7017198453908.449,
"jx": 4489353143132240.0,
"Ez": 7016601565205.127,
"jx": 4490296323381386.5,
"jy": 0.0,
"jz": 6838171379723720.0
"jz": 6836265054152690.0
},
"positrons": {
"particle_momentum_x": 4.2397727290339454e-20,
"particle_momentum_x": 4.240270916979087e-20,
"particle_momentum_y": 0.0,
"particle_momentum_z": 4.2431934836877495e-20,
"particle_position_x": 0.6553599859378852,
"particle_position_y": 0.655359657073043,
"particle_momentum_z": 4.244576791252681e-20,
"particle_position_x": 0.6553596773141027,
"particle_position_y": 0.6553596834187275,
"particle_weight": 3200000000000000.5
}
}
36 changes: 18 additions & 18 deletions Regression/Checksum/benchmarks_json/Langmuir_multi_2d_MR_psatd.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"electrons": {
"particle_momentum_x": 4.237978127636407e-20,
"particle_momentum_x": 4.238116934276727e-20,
"particle_momentum_y": 0.0,
"particle_momentum_z": 4.2379781109485186e-20,
"particle_position_x": 0.655360346626376,
"particle_position_y": 0.655360346625584,
"particle_momentum_z": 4.238116918188906e-20,
"particle_position_x": 0.6553600150461454,
"particle_position_y": 0.6553600150453582,
"particle_weight": 3200000000000000.5
},
"lev=0": {
"Bx": 0.0,
"By": 49.13289051610905,
"By": 48.481624783762086,
"Bz": 0.0,
"Ex": 7589572073848.546,
"Ex": 7589841440058.995,
"Ey": 0.0,
"Ez": 7589572085733.721,
"jx": 7282449902618536.0,
"Ez": 7589841451955.45,
"jx": 7282092285786011.0,
"jy": 0.0,
"jz": 7282449869844108.0
"jz": 7282092252988784.0
},
"lev=1": {
"Bx": 0.0,
"By": 623.630930990979,
"By": 376.07845874193026,
"Bz": 0.0,
"Ex": 7590754010944.117,
"Ex": 7595314624325.873,
"Ey": 0.0,
"Ez": 7590753791450.942,
"jx": 6596452748155826.0,
"Ez": 7595314408918.084,
"jx": 6594445628310054.0,
"jy": 0.0,
"jz": 6596452562357128.0
"jz": 6594445442498818.0
},
"positrons": {
"particle_momentum_x": 4.2381117997129824e-20,
"particle_momentum_x": 4.2380886359427404e-20,
"particle_momentum_y": 0.0,
"particle_momentum_z": 4.23811177887596e-20,
"particle_position_x": 0.6553599570597749,
"particle_position_y": 0.6553599570604656,
"particle_momentum_z": 4.2380886149634417e-20,
"particle_position_x": 0.6553596427220252,
"particle_position_y": 0.6553596427227213,
"particle_weight": 3200000000000000.5
}
}
10 changes: 5 additions & 5 deletions Regression/Checksum/benchmarks_json/Larmor.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
"Bz": 0.0,
"Ex": 940940.2906508234,
"Ey": 0.0,
"Ez": 675442.3304865544,
"Ez": 675442.3304865547,
"divB": 0.0,
"divE": 9010500.601059087,
"jx": 9956.26936533879,
"jy": 0.0,
"jz": 850.7063264964474,
"jz": 850.7063264963904,
"part_per_cell": 2.0
},
"lev=1": {
"Bx": 0.0,
"By": 0.00016656315627260794,
"By": 0.00022915573780371822,
"Bz": 0.0,
"Ex": 65748.08304808202,
"Ey": 0.0,
"Ez": 13444.392741806332,
"Ez": 20968.793596496947,
"divB": 0.0,
"divE": 271268.5535815401,
"divE": 3.318742179700654e-08,
"jx": 0.0,
"jy": 0.0,
"jz": 0.0,
Expand Down
46 changes: 23 additions & 23 deletions Regression/Checksum/benchmarks_json/LaserAccelerationMR.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"beam": {
"particle_momentum_x": 4.561019131383119e-20,
"particle_momentum_y": 4.149842919134552e-20,
"particle_momentum_z": 1.364708476750903e-17,
"particle_position_x": 4.652770082118157e-05,
"particle_momentum_x": 4.5610191313831193e-20,
"particle_momentum_y": 4.1498429191345516e-20,
"particle_momentum_z": 1.3647084767509034e-17,
"particle_position_x": 4.6527700821181575e-05,
"particle_position_y": 0.001484501913502292,
"particle_weight": 12483018148921.525
},
"electrons": {
"particle_momentum_x": 4.2751178407573573e-20,
"particle_momentum_y": 1.9580305087551049e-19,
"particle_momentum_z": 8.913655221012198e-20,
"particle_position_x": 0.04741929968294934,
"particle_position_y": 0.08483137297620588,
"particle_weight": 119232421874999.98
"particle_momentum_x": 4.275117840757316e-20,
"particle_momentum_y": 1.9580305087552577e-19,
"particle_momentum_z": 8.913655221012749e-20,
"particle_position_x": 0.04741929968294935,
"particle_position_y": 0.08483137297620594,
"particle_weight": 119232421875000.25
},
"lev=0": {
"Bx": 24121595.02471585,
"Bx": 24121595.024715852,
"By": 78232.13397859206,
"Bz": 601058.5314543134,
"Ex": 22865766698494.82,
"Ex": 22865766698494.816,
"Ey": 6508549201873332.0,
"Ez": 32072534017950.55,
"jx": 1130516319665756.0,
"Ez": 32072534017950.547,
"jx": 1130516319665756.2,
"jy": 2.325136305137274e+18,
"jz": 6769519391624705.0,
"rho": 152898720.2638083
},
"lev=1": {
"Bx": 53303280.78531405,
"By": 213820.3084522391,
"Bz": 1321618.978929098,
"Ex": 47846019388623.05,
"Ey": 1.455101409934242e+16,
"Ez": 65304502775874.59,
"Bx": 53303280.77277007,
"By": 213836.7648067578,
"Bz": 1321618.9792460166,
"Ex": 47846162009894.625,
"Ey": 1.4551014101478356e+16,
"Ez": 65304501716354.97,
"jx": 46169274324016.0,
"jy": 9.274837523569297e+18,
"jz": 1.926277235505425e+16,
"rho": 67304284.98422323
"jz": 1.9262772355054252e+16,
"rho": 67304284.98422328
}
}
}
18 changes: 9 additions & 9 deletions Regression/Checksum/benchmarks_json/LaserOnFine.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"lev=0": {
"Bx": 0.0,
"By": 427936.33415736846,
"By": 427936.3341615332,
"Bz": 0.0,
"Ex": 127078291133419.6,
"Ex": 127078291135506.95,
"Ey": 0.0,
"Ez": 5664108687174.143,
"Ez": 5664108686871.884,
"divB": 0.0,
"jx": 6.137404954265724e+17,
"jx": 6.137404955467743e+17,
"jy": 0.0,
"jz": 0.0,
"part_per_cell": 0.0
},
"lev=1": {
"Bx": 0.0,
"By": 1234425.838348821,
"By": 1234533.4970403123,
"Bz": 0.0,
"Ex": 369306119506292.0,
"Ex": 369306810438894.4,
"Ey": 0.0,
"Ez": 17592228452124.82,
"Ez": 17592200791219.773,
"divB": 0.0,
"jx": 2.4549619817062897e+18,
"jx": 2.454961982187098e+18,
"jy": 0.0,
"jz": 0.0,
"part_per_cell": 102.0
}
}
}
8 changes: 4 additions & 4 deletions Regression/Checksum/benchmarks_json/PEC_field_mr.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"lev=0": {
"Bx": 1.3137691514773655,
"Ey": 1052208601.7204809
"Bx": 1.3137691514770886,
"Ey": 1052208601.720587
},
"lev=1": {
"Bx": 0.3714838555919295,
"Bx": 0.3187370090421958,
"Ey": 98224588.87142882
}
}
}
Loading

0 comments on commit 3b46d91

Please sign in to comment.