Skip to content

Commit

Permalink
rebase/conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Jan 22, 2022
1 parent 861da38 commit a47bdf3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 59 deletions.
9 changes: 0 additions & 9 deletions src/amr/data/particles/refine/split.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/amr/data/particles/refine/split.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "amr/data/particles/refine/split_1d.hpp"
#include "amr/data/particles/refine/split_2d.hpp"
#include "amr/data/particles/refine/split_3d.h"
#include "amr/data/particles/refine/split_3d.hpp"


#endif // endif PHARE_SPLIT_HPP
6 changes: 3 additions & 3 deletions src/amr/data/particles/refine/split_3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Splitting reference material can be found @

#include <array>
#include <cstddef>
#include "core/utilities/point/point.h"
#include "core/utilities/types.h"
#include "splitter.h"
#include "core/utilities/point/point.hpp"
#include "core/utilities/types.hpp"
#include "splitter.hpp"

namespace PHARE::amr
{
Expand Down
2 changes: 1 addition & 1 deletion tests/simulator/advance/test_fields_advance_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_overlaped_fields_are_equal_with_min_max_patch_size_of_max_ghosts(self,
*per_interp(({"L0": {"B0": Box2D(6, 23)}})),
*per_interp(({"L0": {"B0": Box2D( 2, 12), "B1": Box2D(13, 25)}})),
*per_interp(({"L0": {"B0": Box2D( 5, 20)}, "L1": {"B0": Box2D(15, 19)}})),
*per_interp(({"L0": {"B0": Box2D( 5, 20)}, "L1": {"B0": Box2D(12, 38)}, "L2": {"B0": Box2D(30, 52)} })),
*per_interp(({"L0": {"B0": Box2D( 5, 20)}, "L1": {"B0": Box2D(12, 37)}, "L2": {"B0": Box2D(30, 51)} })),
)
@unpack
def test_field_coarsening_via_subcycles(self, interp_order, refinement_boxes):
Expand Down
2 changes: 1 addition & 1 deletion tests/simulator/advance/test_particles_advance_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

ndim = 3
interp_orders = [1, 2, 3]
ppc = 10
ppc = 5

def per_interp(dic):
return [(interp, dic) for interp in interp_orders]
Expand Down
1 change: 0 additions & 1 deletion tests/simulator/test_advance.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def getHierarchy(self, interp_order, refinement_boxes, qty,
dl=0.2, extra_diag_options={}, time_step_nbr=1, timestamps=None, ndim=1):
diag_outputs = f"phare_outputs/advance/{diag_outputs}"
from pyphare.pharein import global_vars
clean_up_diags(global_vars.sim)
global_vars.sim = None
if smallest_patch_size is None:
from pyphare.pharein.simulation import check_patch_size
Expand Down
47 changes: 4 additions & 43 deletions tests/simulator/test_initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def getHierarchy(self, interp_order, refinement_boxes, qty,
cells=120, dl=0.1, ndim=1):
diag_outputs = f"phare_outputs/init/{diag_outputs}"
from pyphare.pharein import global_vars
clean_up_diags(global_vars.sim)
global_vars.sim =None

if smallest_patch_size is None:
Expand Down Expand Up @@ -328,16 +327,14 @@ def domain(patch_data):



<<<<<<< HEAD


def _test_density_is_as_provided_by_user(self, dim, interp_order, **kwargs):
print(f"test_density_is_as_provided_by_user : dim {dim} interp_order {interp_order}")

empirical_dim_devs = {
1: 6e-3,
2: 3e-2,
3: 3e-2,
3: 2e-1,
}
nbParts = {1 : 10000, 2: 1000, 3: 20}
hier = self.getHierarchy(interp_order, {"L0": {"B0": nDBox(dim, 5, 14)}},
Expand All @@ -364,45 +361,9 @@ def _test_density_is_as_provided_by_user(self, dim, interp_order, **kwargs):
nbrGhosts = layout.nbrGhosts(interp_order, centering)
select = tuple([slice(nbrGhosts,-nbrGhosts) for i in range(dim)])

xyz = patch.patch_datas["rho"].meshgrid()
xyz0 = [v[select] for v in xyz]

# if dim == 1:
# x0 = xx[select]
# protons_expected = proton_density_fn(x0)
# beam_expected = beam_density_fn(x0)

# # ion_expected = protons_expected + beam_expected
# # ion_actual = ion_density[nbrGhosts:-nbrGhosts]
# # beam_actual = beam_density[nbrGhosts:-nbrGhosts]
# # protons_actual = proton_density[nbrGhosts:-nbrGhosts]


# if dim == 2:
# xx, yy = patch.patch_datas["rho"].meshgrid()

# x0 = xx[select]
# y0 = yy[select]

# protons_expected = proton_density_fn(x0, y0)
# beam_expected = beam_density_fn(x0, y0)

# # ion_expected = protons_expected + beam_expected
# # ion_actual = ion_density[select]
# # beam_actual = beam_density[select]
# # protons_actual = proton_density[select]



# if dim == 3:
# xx, yy, zz = patch.patch_datas["rho"].meshgrid()

# x0 = xx[select]
# y0 = yy[select]
# z0 = zz[select]

protons_expected = proton_density_fn(*xyz0)
beam_expected = beam_density_fn(*xyz0)
mesh = patch.patch_datas["rho"].meshgrid(select)
protons_expected = proton_density_fn(*mesh)
beam_expected = beam_density_fn(*mesh)
ion_expected = protons_expected + beam_expected

protons_actual = proton_density[select]
Expand Down

0 comments on commit a47bdf3

Please sign in to comment.