Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 7, 2023
1 parent 5ab6c48 commit 944c31a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/simulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1816,15 +1816,14 @@ template <typename problem_t> void AMRSimulation<problem_t>::WriteMetadataFile(s
template <typename problem_t> void AMRSimulation<problem_t>::ReadMetadataFile(std::string const &chkfilename)
{
// read metadata file in on all ranks (needed when restarting from checkpoint)
const
const

// read YAML file into simulationMetadata_ std::map
YAML::Node metadata = YAML::LoadFile(MetadataFileName);
// read YAML file into simulationMetadata_ std::map
YAML::Node metadata = YAML::LoadFile(MetadataFileName);
amrex::Print() << "Reading " << MetadataFileName << "...\n";

for (YAML::const_iterator it = metadata.begin(); it != metadata.end(); ++it) {
const
std::optional<amrex::Real> value_real = YAML::as_if<amrex::Real, std::optional<amrex::Real>>(it->second)();
const std::optional<amrex::Real> value_real = YAML::as_if<amrex::Real, std::optional<amrex::Real>>(it->second)();
std::optional<std::string> value_string = YAML::as_if<std::string, std::optional<std::string>>(it->second)();

if (value_real) {
Expand Down

0 comments on commit 944c31a

Please sign in to comment.