Skip to content

Commit

Permalink
provide error message before map exception can take place
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn committed Dec 16, 2024
1 parent bc02488 commit 5cdb93f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions amr-wind/wind_energy/actuator/FLLC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ void fllc_parse(const utils::ActParser& pp, FLLCData& data)
pp.query("fllc_start_time", data.fllc_start_time);
std::string typeString = "variable_chord";
pp.query("fllc_type", typeString);
const int match = FLLCTypeMap.count(typeString);
if (match == 0) {
amrex::Abort(
"fllc_parse: Invalid fllc_type provided. Available options are "
"constant_chord and variable_chord.");
}
data.correction_type = FLLCTypeMap.at(typeString);
pp.query("fllc_nonuniform", data.nonuniform);
pp.query("fllc_epsilon_dr_ratio", data.eps_dr);
Expand Down

0 comments on commit 5cdb93f

Please sign in to comment.