Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions Source/ERF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2901,50 +2901,6 @@ ERF::ReadParameters ()
ParameterSanityChecks();
}

void CheckForDuplicateInputs ()
{
amrex::ParmParse pp;
const auto& tbl = pp.table();

bool found = false;

for (const auto& [full_name, entry] : tbl)
{
std::string prefix;
std::string name;

auto pos = full_name.find('.');

if (pos != std::string::npos)
{
prefix = full_name.substr(0, pos);
name = full_name.substr(pos + 1);
}
else
{
prefix = "global";
name = full_name;
}

if (entry.m_vals.size() > 1)
{
found = true;

amrex::Print() << "Duplicate input: ";

if (prefix == "global")
amrex::Print() << name;
else
amrex::Print() << prefix << "." << name;

amrex::Print() << " (" << entry.m_vals.size() << " occurrences)\n";
}
}

if (found)
amrex::Abort("Duplicate inputs detected");
}

// Read in some parameters from inputs file
void
ERF::ParameterSanityChecks ()
Expand Down Expand Up @@ -3010,8 +2966,6 @@ ERF::ParameterSanityChecks ()
if (solverChoice.coupling_type == CouplingType::TwoWay && cf_width > 0) {
Abort("For two-way coupling you must set cf_width = 0");
}

CheckForDuplicateInputs();
}

// Create horizontal average quantities for 5 variables:
Expand Down
Loading