Skip to content

Commit f637d37

Browse files
committed
Reviewer comments
1 parent 118a86c commit f637d37

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

lib/python/picongpu/picmi/grid.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,8 @@ def get_as_pypicongpu(self):
8989
raise ValueError("Z: boundary condition not supported")
9090

9191
g = grid.Grid3D()
92-
g.cell_size_x_si = self.get_cell_size()[0]
93-
g.cell_size_y_si = self.get_cell_size()[1]
94-
g.cell_size_z_si = self.get_cell_size()[2]
95-
g.cell_cnt_x = self.number_of_cells[0]
96-
g.cell_cnt_y = self.number_of_cells[1]
97-
g.cell_cnt_z = self.number_of_cells[2]
92+
g.cell_size_x_si, g.cell_size_y_si, g.cell_size_z_si = self.get_cell_size()
93+
g.cell_cnt_x, g.cell_cnt_y, g.cell_cnt_z = self.number_of_cells
9894
g.boundary_condition_x = picongpu_boundary_condition_by_picmi_id[self.lower_boundary_conditions[0]]
9995
g.boundary_condition_y = picongpu_boundary_condition_by_picmi_id[self.lower_boundary_conditions[1]]
10096
g.boundary_condition_z = picongpu_boundary_condition_by_picmi_id[self.lower_boundary_conditions[2]]

test/python/picongpu/compiling/distribution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_gaussian(self):
9393
sigma_rear=5.0e-6,
9494
power=4.0,
9595
factor=-1.0,
96-
vacuum_front=50 * 9.07264e-5,
96+
vacuum_front=50 * 9.07264e-5 / 2048,
9797
density=8e24,
9898
)
9999
self._compile_distribution(gaussian_dist)

test/python/picongpu/end-to-end/free_formula_density.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self):
3939
self.distributions = {
4040
"predefined": picmi.GaussianDistribution(**self.parameters),
4141
"free_form": picmi.AnalyticDistribution(
42-
lambda x, y, z: self.free_form(y, cell_size_y=1.0, **self.parameters)
42+
lambda x, y, z: self.free_form(y, cell_size_y=CELL_SIZE[1], **self.parameters)
4343
),
4444
}
4545

@@ -57,9 +57,9 @@ def free_form(
5757
factor,
5858
):
5959
# apparently, our SI position is the centre of the cell
60-
y += -0.5 * CELL_SIZE[1]
60+
y += -0.5 * cell_size_y
6161
# The last term undoes the shift to the cell origin.
62-
vacuum_y = int(vacuum_front / CELL_SIZE[1]) * CELL_SIZE[1] - 0.5 * CELL_SIZE[1]
62+
vacuum_y = int(vacuum_front / cell_size_y) * cell_size_y - 0.5 * cell_size_y
6363

6464
exponent = sympy.Piecewise(
6565
(sympy.Abs((y - center_front) / sigma_front), y < center_front),

test/python/picongpu/quick/pypicongpu/rendering/pmaccprinter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
# "trunc": (???, "pmacc::math::trunc(x)"),
7171
# "lround": (???, "pmacc::math::lround(x)"),
7272
# "llround": (???, "pmacc::math::llround(x)"),
73+
# Sinc can be used but isn't translated into the pmacc equivalent
74+
# but the defining formula.
75+
# Bessel functions are available upon request...
7376
}
7477

7578

0 commit comments

Comments
 (0)