Skip to content

Commit

Permalink
fixup: unit format
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Nov 15, 2023
1 parent 9a43013 commit d920000
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/CabanaPD_Input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ class Inputs

// Add additional derived inputs to json. System size.
auto size = inputs["system_size"]["value"];
std::string size_unit = inputs["system_size"]["unit"];
for ( std::size_t d = 0; d < size.size(); d++ )
{
double s = size[d];
inputs["low_corner"]["value"][d] = -0.5 * s;
inputs["low_corner"]["unit"][d] = inputs["system_size"]["unit"];
inputs["low_corner"]["unit"][d] = size_unit;
inputs["high_corner"]["value"][d] = 0.5 * s;
inputs["high_corner"]["unit"][d] = inputs["system_size"]["unit"];
inputs["high_corner"]["unit"][d] = size_unit;
}
// Number of steps.
double tf = inputs["final_time"]["value"];
Expand Down

0 comments on commit d920000

Please sign in to comment.