ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_InputsName.H File Reference
#include <AMReX.H>
#include <AMReX_ParmParse.H>
#include <AMReX_Print.H>
#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <regex>
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for ERF_InputsName.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  erf_inputs_detail::EntryInfo
 
struct  erf_inputs_detail::ScanState
 

Namespaces

 erf_inputs_detail
 

Functions

std::string erf_inputs_detail::prefixed_name (const std::string &name)
 
std::vector< std::string > erf_inputs_detail::split_values (const std::string &rhs)
 
bool erf_inputs_detail::is_override (const EntryInfo &first, const std::vector< int > &includes)
 
void erf_inputs_detail::scan_inputs (const std::string &inputs_file, ScanState &state)
 
void CheckForDuplicateInputs (const std::string &inputs_file)
 

Variables

std::string inputs_name
 

Function Documentation

◆ CheckForDuplicateInputs()

void CheckForDuplicateInputs ( const std::string &  inputs_file)
inline

Abort if a key is set twice in the inputs file, counting the files it includes with FILE = <name>. A file may re-set a key that a file it included earlier set (a base deck included first and then overridden); a key set twice in one file, in two files included side by side, or in a file and then again in a file it includes afterwards is refused. UNSET = <key> drops a key so it may be set again. Keys given on the command line are not checked; they override the file's.

273 {
275  erf_inputs_detail::scan_inputs(inputs_file, state);
276 
277  if (!state.error.empty()) {
278  amrex::Abort(state.error);
279  }
280  if (state.found_duplicates)
281  {
282  amrex::Abort("Duplicate inputs detected in inputs file");
283  }
284 }
void scan_inputs(const std::string &inputs_file, ScanState &state)
Definition: ERF_InputsName.H:115
Definition: ERF_InputsName.H:40
std::string error
Definition: ERF_InputsName.H:46
bool found_duplicates
Definition: ERF_InputsName.H:45

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ inputs_name

std::string inputs_name
extern

Referenced by main(), and ERF::writeJobInfo().