Skip to content

Commit 25ed89b

Browse files
committed
injector_boundary_inflow: -w
1 parent 94638d5 commit 25ed89b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/include/injector_boundary_inflow.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public:
1717
using Real3 = psc::particle::Inject::Real3;
1818

1919
// FIXME would be nice to just pass 1 thing for kind-related info
20-
ParticleGeneratorMaxwellian(int kind_idx, Grid_t::Kind kind, Real w,
21-
Real3 mean_u, Real3 temperature)
22-
: kind_idx{kind_idx}, w{w}
20+
ParticleGeneratorMaxwellian(int kind_idx, Grid_t::Kind kind, Real3 mean_u,
21+
Real3 temperature)
22+
: kind_idx{kind_idx}
2323
{
2424
for (int d = 0; d < 3; d++) {
2525
Real stdev_u = sqrt(temperature[d] / kind.m);
@@ -35,6 +35,7 @@ public:
3535
}
3636

3737
Real3 u{vdfs[0].get(), vdfs[1].get(), vdfs[2].get()};
38+
Real w = 1.0;
3839
psc::particle::Tag tag = 0;
3940

4041
return {x, u, w, kind_idx, tag};
@@ -43,7 +44,6 @@ public:
4344
private:
4445
using VelocityDistributionFunction = rng::Normal<Real>;
4546
Vec3<VelocityDistributionFunction> vdfs;
46-
Real w;
4747
int kind_idx;
4848
rng::Uniform<Real> uniform_dist{0.0, 1.0};
4949
};

src/libpsc/tests/test_injector_boundary_inflow.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ TEST(InjectorBoundaryInflowTest, ParticleGeneratorMaxwellianTest)
1313
{
1414
int kind_idx = 15;
1515
Grid_t::Kind kind{1.0, 1836.0, "ion"};
16-
ParticleGeneratorMaxwellian::Real w = 2.0;
16+
ParticleGeneratorMaxwellian::Real w = 1.0;
1717
ParticleGeneratorMaxwellian::Real3 mean_u{0.0, 5.0, 15.0};
1818
ParticleGeneratorMaxwellian::Real3 temperature{0.0, 0.0, 0.0};
1919
ParticleGeneratorMaxwellian::Real3 pos{1.0, 2.0, 5.0};
2020

21-
ParticleGeneratorMaxwellian gen{kind_idx, kind, w, mean_u, temperature};
21+
ParticleGeneratorMaxwellian gen{kind_idx, kind, mean_u, temperature};
2222

2323
auto prt = gen.get(pos, {0.0, 0.0, 0.0});
2424

0 commit comments

Comments
 (0)