Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Sep 5, 2024
1 parent 14357eb commit 85724ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
28 changes: 13 additions & 15 deletions tests/amr/models/test_models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ using InitFunctionT = PHARE::initializer::InitFunction<1>;
PHARE::initializer::PHAREDict createDict()
{
PHARE::initializer::PHAREDict dict;
dict["ions"]["nbrPopulations"] = std::size_t{2};
dict["ions"]["pop0"]["name"] = std::string{"protons"};
dict["ions"]["pop0"]["mass"] = 1.;
dict["ions"]["pop0"]["particle_initializer"]["name"]
= std::string{"MaxwellianParticleInitializer"};
dict["ions"]["nbrPopulations"] = std::size_t{2};
dict["ions"]["pop0"]["name"] = std::string{"protons"};
dict["ions"]["pop0"]["mass"] = 1.;
dict["ions"]["pop0"]["particle_initializer"]["name"] = std::string{"maxwellian"};
dict["ions"]["pop0"]["particle_initializer"]["density"] = static_cast<InitFunctionT>(density);

dict["ions"]["pop0"]["particle_initializer"]["bulk_velocity_x"]
Expand All @@ -85,14 +84,13 @@ PHARE::initializer::PHAREDict createDict()
= static_cast<InitFunctionT>(vthz);


dict["ions"]["pop0"]["particle_initializer"]["nbrPartPerCell"] = int{100};
dict["ions"]["pop0"]["particle_initializer"]["charge"] = -1.;
dict["ions"]["pop0"]["particle_initializer"]["basis"] = std::string{"Cartesian"};
dict["ions"]["pop0"]["particle_initializer"]["nbr_part_per_cell"] = int{100};
dict["ions"]["pop0"]["particle_initializer"]["charge"] = -1.;
dict["ions"]["pop0"]["particle_initializer"]["basis"] = std::string{"cartesian"};

dict["ions"]["pop1"]["name"] = std::string{"alpha"};
dict["ions"]["pop1"]["mass"] = 1.;
dict["ions"]["pop1"]["particle_initializer"]["name"]
= std::string{"MaxwellianParticleInitializer"};
dict["ions"]["pop1"]["name"] = std::string{"alpha"};
dict["ions"]["pop1"]["mass"] = 1.;
dict["ions"]["pop1"]["particle_initializer"]["name"] = std::string{"maxwellian"};
dict["ions"]["pop1"]["particle_initializer"]["density"] = static_cast<InitFunctionT>(density);

dict["ions"]["pop1"]["particle_initializer"]["bulk_velocity_x"]
Expand All @@ -115,9 +113,9 @@ PHARE::initializer::PHAREDict createDict()
= static_cast<InitFunctionT>(vthz);


dict["ions"]["pop1"]["particle_initializer"]["nbrPartPerCell"] = int{100};
dict["ions"]["pop1"]["particle_initializer"]["charge"] = -1.;
dict["ions"]["pop1"]["particle_initializer"]["basis"] = std::string{"Cartesian"};
dict["ions"]["pop1"]["particle_initializer"]["nbr_part_per_cell"] = int{100};
dict["ions"]["pop1"]["particle_initializer"]["charge"] = -1.;
dict["ions"]["pop1"]["particle_initializer"]["basis"] = std::string{"cartesian"};

dict["electromag"]["name"] = std::string{"EM"};
dict["electromag"]["electric"]["name"] = std::string{"E"};
Expand Down
3 changes: 2 additions & 1 deletion tests/core/numerics/ion_updater/test_updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ struct IonUpdaterTest : public ::testing::Test
// now let's initialize Electromag fields to user input functions
// and ion population particles to user supplied moments

ElectromagInitializerFactory_t::create<Electromag, GridLayout>(init_dict)->init(EM, layout);
ElectromagInitializerFactory_t::create<Electromag, GridLayout>(init_dict["electromag"])
->init(EM, layout);
for (auto& pop : ions)
{
auto const& info = pop.particleInitializerInfo();
Expand Down

0 comments on commit 85724ca

Please sign in to comment.