From 5cdb93fc4bad35abe9b8b070454fd735f8c01f0a Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 16 Dec 2024 10:43:23 -0700 Subject: [PATCH] provide error message before map exception can take place --- amr-wind/wind_energy/actuator/FLLC.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amr-wind/wind_energy/actuator/FLLC.cpp b/amr-wind/wind_energy/actuator/FLLC.cpp index 01a3577bbb..e24dfa1799 100644 --- a/amr-wind/wind_energy/actuator/FLLC.cpp +++ b/amr-wind/wind_energy/actuator/FLLC.cpp @@ -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);