Skip to content

Commit e34760a

Browse files
committed
psc_bnd_fields_impl: fix scalar t
1 parent 0b8e801 commit e34760a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/libpsc/psc_bnd_fields/psc_bnd_fields_impl.hxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,10 @@ struct BndFields_ : BndFieldsBase
557557
real_t s = 0.0;
558558
real_t p = 0.0;
559559
if (radiation) {
560-
Real3 x3_s = (Real3(edge_idx) + Real3::unit(d1) * 0.5) * grid.domain.dx;
561-
Real3 x3_p = (Real3(edge_idx) + Real3::unit(d2) * 0.5) * grid.domain.dx;
560+
Real3 x3_s =
561+
(Real3(edge_idx) + Real3::unit(d1) * real_t(0.5)) * grid.domain.dx;
562+
Real3 x3_p =
563+
(Real3(edge_idx) + Real3::unit(d2) * real_t(0.5)) * grid.domain.dx;
562564
s = radiation->pulse_s_lower(grid.time(), d0, p, x3_s);
563565
p = radiation->pulse_p_lower(grid.time(), d0, p, x3_p);
564566
}
@@ -606,8 +608,10 @@ struct BndFields_ : BndFieldsBase
606608
real_t s = 0.0;
607609
real_t p = 0.0;
608610
if (radiation) {
609-
Real3 x3_s = (Real3(edge_idx) + Real3::unit(d1) * 0.5) * grid.domain.dx;
610-
Real3 x3_p = (Real3(edge_idx) + Real3::unit(d2) * 0.5) * grid.domain.dx;
611+
Real3 x3_s =
612+
(Real3(edge_idx) + Real3::unit(d1) * real_t(0.5)) * grid.domain.dx;
613+
Real3 x3_p =
614+
(Real3(edge_idx) + Real3::unit(d2) * real_t(0.5)) * grid.domain.dx;
611615
s = radiation->pulse_s_upper(grid.time(), d0, p, x3_s);
612616
p = radiation->pulse_p_upper(grid.time(), d0, p, x3_p);
613617
}

0 commit comments

Comments
 (0)