Dakota  Version 6.15
Explore and Predict with Confidence
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
NIDRProblemDescDB Class Reference

The derived input file database utilizing the new IDR parser. More...

Inheritance diagram for NIDRProblemDescDB:
ProblemDescDB

Public Member Functions

 NIDRProblemDescDB (ParallelLibrary &parallel_lib)
 constructor
 
 ~NIDRProblemDescDB ()
 destructor
 
void derived_parse_inputs (const std::string &dakota_input_file, const std::string &dakota_input_string, const std::string &parser_options)
 parses the input file and populates the problem description database using NIDR. More...
 
void derived_broadcast ()
 perform any data processing that must be coordinated with DB buffer broadcasting (performed prior to broadcasting the DB buffer on rank 0 and after receiving the DB buffer on other processor ranks)
 
void derived_post_process ()
 perform any additional data post-processing
 
 KWH (iface_Real)
 
 KWH (iface_Rlit)
 
 KWH (iface_false)
 
 KWH (iface_ilit)
 
 KWH (iface_int)
 
 KWH (iface_lit)
 
 KWH (iface_start)
 
 KWH (iface_stop)
 
 KWH (iface_str)
 
 KWH (iface_str2D)
 
 KWH (iface_strL)
 
 KWH (iface_true)
 
 KWH (iface_type)
 
 KWH (method_Ii)
 
 KWH (method_Real)
 
 KWH (method_Real01)
 
 KWH (method_RealDL)
 
 KWH (method_RealLlit)
 
 KWH (method_Realp)
 
 KWH (method_Realz)
 
 KWH (method_Ri)
 
 KWH (method_false)
 
 KWH (method_szarray)
 
 KWH (method_ilit2)
 
 KWH (method_ilit2p)
 
 KWH (method_int)
 
 KWH (method_ivec)
 
 KWH (method_lit)
 
 KWH (method_litc)
 
 KWH (method_liti)
 
 KWH (method_litp)
 
 KWH (method_litr)
 
 KWH (method_litz)
 
 KWH (method_order)
 
 KWH (method_num_resplevs)
 
 KWH (method_piecewise)
 
 KWH (method_resplevs)
 
 KWH (method_resplevs01)
 
 KWH (method_shint)
 
 KWH (method_sizet)
 
 KWH (method_slit2)
 
 KWH (method_start)
 
 KWH (method_stop)
 
 KWH (method_str)
 
 KWH (method_strL)
 
 KWH (method_true)
 
 KWH (method_tr_final)
 
 KWH (method_type)
 
 KWH (method_usharray)
 
 KWH (method_ushint)
 
 KWH (method_utype)
 
 KWH (method_augment_utype)
 
 KWH (method_utype_lit)
 
 KWH (model_Real)
 
 KWH (model_RealDL)
 
 KWH (model_ivec)
 
 KWH (model_false)
 
 KWH (model_int)
 
 KWH (model_lit)
 
 KWH (model_order)
 
 KWH (model_shint)
 
 KWH (model_sizet)
 
 KWH (model_id_to_index_set)
 
 KWH (model_start)
 
 KWH (model_stop)
 
 KWH (model_str)
 
 KWH (model_strL)
 
 KWH (model_true)
 
 KWH (model_type)
 
 KWH (model_usharray)
 
 KWH (model_ushint)
 
 KWH (model_utype)
 
 KWH (model_augment_utype)
 
 KWH (resp_RealDL)
 
 KWH (resp_RealL)
 
 KWH (resp_false)
 
 KWH (resp_intset)
 
 KWH (resp_ivec)
 
 KWH (resp_lit)
 
 KWH (resp_sizet)
 
 KWH (resp_start)
 
 KWH (resp_stop)
 
 KWH (resp_str)
 
 KWH (resp_strL)
 
 KWH (resp_true)
 
 KWH (resp_utype)
 
 KWH (resp_augment_utype)
 
 KWH (env_int)
 
 KWH (env_start)
 
 KWH (env_str)
 
 KWH (env_strL)
 
 KWH (env_true)
 
 KWH (env_utype)
 
 KWH (env_augment_utype)
 
 KWH (var_RealLb)
 
 KWH (var_RealUb)
 
 KWH (var_IntLb)
 
 KWH (var_categorical)
 
 KWH (var_caulbl)
 
 KWH (var_dauilbl)
 
 KWH (var_dauslbl)
 
 KWH (var_daurlbl)
 
 KWH (var_ceulbl)
 
 KWH (var_deuilbl)
 
 KWH (var_deuslbl)
 
 KWH (var_deurlbl)
 
 KWH (var_sizet)
 
 KWH (var_start)
 
 KWH (var_stop)
 
 KWH (var_str)
 
 KWH (var_strL)
 
 KWH (var_true)
 
 KWH (var_newiarray)
 
 KWH (var_newsarray)
 
 KWH (var_newivec)
 
 KWH (var_newrvec)
 
 KWH (var_ivec)
 
 KWH (var_svec)
 
 KWH (var_rvec)
 
 KWH (var_type)
 
- Public Member Functions inherited from ProblemDescDB
 ProblemDescDB ()
 default constructor More...
 
 ProblemDescDB (ParallelLibrary &parallel_lib)
 standard constructor More...
 
 ProblemDescDB (const ProblemDescDB &db)
 copy constructor More...
 
 ~ProblemDescDB ()
 destructor More...
 
ProblemDescDB operator= (const ProblemDescDB &db)
 assignment operator More...
 
void parse_inputs (ProgramOptions &prog_opts, DbCallbackFunctionPtr callback=NULL, void *callback_data=NULL)
 Parses the input file or input string if present and executes callbacks. Does not perform any validation. More...
 
void check_and_broadcast (const ProgramOptions &prog_opts)
 performs check_input, broadcast, and post_process, but for now, allowing separate invocation through the public API as well More...
 
void check_input ()
 verifies that there is at least one of each of the required keywords in the dakota input file More...
 
void broadcast ()
 invokes send_db_buffer() and receive_db_buffer() to broadcast DB data across the processor allocation. Used by manage_inputs().
 
void post_process ()
 post-processes the (minimal) input specification to assign default variables/responses specification arrays. Used by manage_inputs(). More...
 
void lock ()
 Locks the database in order to prevent data access when the list nodes may not be set properly. Unlocked by a set nodes operation.
 
void unlock ()
 Explicitly unlocks the database. Use with care.
 
void set_db_list_nodes (const String &method_tag)
 set dataMethodIter based on a method identifier string to activate a particular method specification in dataMethodList and use pointers from this method specification to set all other list iterators.
 
void set_db_list_nodes (size_t method_index)
 set dataMethodIter based on an index within dataMethodList to activate a particular method specification and use pointers from this method specification to set all other list iterators.
 
void resolve_top_method (bool set_model_nodes=true)
 For a (default) environment lacking a top method pointer, this function is used to determine which of several potential method specifications corresponds to the top method and then sets the list nodes accordingly.
 
void set_db_method_node (const String &method_tag)
 set dataMethodIter based on a method identifier string to activate a particular method specification (only).
 
void set_db_method_node (size_t method_index)
 set dataMethodIter based on an index within dataMethodList to activate a particular method specification (only).
 
size_t get_db_method_node ()
 return the index of the active node in dataMethodList
 
void set_db_model_nodes (const String &model_tag)
 set the model list iterators (dataModelIter, dataVariablesIter, dataInterfaceIter, and dataResponsesIter) based on the model identifier string
 
void set_db_model_nodes (size_t model_index)
 set the model list iterators (dataModelIter, dataVariablesIter, dataInterfaceIter, and dataResponsesIter) based on an index within dataModelList
 
size_t get_db_model_node ()
 return the index of the active node in dataModelList
 
void set_db_variables_node (const String &variables_tag)
 set dataVariablesIter based on the variables identifier string
 
void set_db_interface_node (const String &interface_tag)
 set dataInterfaceIter based on the interface identifier string
 
void set_db_responses_node (const String &responses_tag)
 set dataResponsesIter based on the responses identifier string
 
ParallelLibraryparallel_library () const
 return the parallelLib reference
 
IteratorList & iterator_list ()
 return a list of all Iterator objects that have been instantiated
 
ModelList & model_list ()
 return a list of all Model objects that have been instantiated
 
VariablesList & variables_list ()
 return a list of all Variables objects that have been instantiated
 
InterfaceList & interface_list ()
 return a list of all Interface objects that have been instantiated
 
ResponseList & response_list ()
 return a list of all Response objects that have been instantiated
 
const RealMatrixArray & get_rma (const String &entry_name) const
 get a RealMatrixArray out of the database based on an identifier string
 
const RealVector & get_rv (const String &entry_name) const
 get a RealVector out of the database based on an identifier string
 
const IntVector & get_iv (const String &entry_name) const
 get an IntVector out of the database based on an identifier string
 
const BitArray & get_ba (const String &entry_name) const
 get a BitArray out of the database based on an identifier string
 
const SizetArray & get_sza (const String &entry_name) const
 get an SizetArray out of the database based on an identifier string
 
const UShortArray & get_usa (const String &entry_name) const
 get an UShortArray out of the database based on an identifier string
 
const RealSymMatrix & get_rsm (const String &entry_name) const
 get a RealSymMatrix out of the database based on an identifier string
 
const RealVectorArray & get_rva (const String &entry_name) const
 get a RealVectorArray out of the database based on an identifier string
 
const IntVectorArray & get_iva (const String &entry_name) const
 get an IntVectorArray out of the database based on an identifier string
 
const IntSet & get_is (const String &entry_name) const
 get an IntSet out of the database based on an identifier string
 
const IntSetArray & get_isa (const String &entry_name) const
 get an IntSetArray out of the database based on an identifier string
 
const SizetSet & get_szs (const String &entry_name) const
 get a SizetSet out of the database based on an identifier string
 
const StringSetArray & get_ssa (const String &entry_name) const
 get an StringSetArray out of the database based on an identifier string
 
const RealSetArray & get_rsa (const String &entry_name) const
 get a RealSetArray out of the database based on an identifier string
 
const IntRealMapArray & get_irma (const String &entry_name) const
 get an IntRealMapArray out of the database based on an identifier string
 
const StringRealMapArray & get_srma (const String &entry_name) const
 get an StringRealMapArray out of the database based on an identifier string
 
const RealRealMapArray & get_rrma (const String &entry_name) const
 get a RealRealMapArray out of the database based on an identifier string
 
const RealRealPairRealMapArray & get_rrrma (const String &entry_name) const
 get a RealRealPairRealMapArray out of the database based on an identifier string
 
const IntIntPairRealMapArray & get_iirma (const String &entry_name) const
 get an IntIntPairRealMapArray out of the database based on an identifier string
 
const StringArray & get_sa (const String &entry_name) const
 get a StringArray out of the database based on an identifier string
 
const String2DArray & get_s2a (const String &entry_name) const
 get a String2DArray out of the database based on an identifier string
 
const String & get_string (const String &entry_name) const
 get a String out of the database based on an identifier string
 
const Real & get_real (const String &entry_name) const
 get a Real out of the database based on an identifier string
 
int get_int (const String &entry_name) const
 get an int out of the database based on an identifier string
 
short get_short (const String &entry_name) const
 get a short out of the database based on an identifier string
 
unsigned short get_ushort (const String &entry_name) const
 get an unsigned short out of the database based on an identifier string
 
size_t get_sizet (const String &entry_name) const
 get a size_t out of the database based on an identifier string
 
bool get_bool (const String &entry_name) const
 get a bool out of the database based on an identifier string
 
void ** get_voidss (const String &entry_name) const
 for getting a void**, e.g., &dlLib More...
 
void insert_node (const DataEnvironment &data_env)
 set the DataEnvironment object
 
void insert_node (const DataMethod &data_method)
 add a DataMethod object to the dataMethodList
 
void insert_node (const DataModel &data_model)
 add a DataModel object to the dataModelList
 
void insert_node (DataVariables &data_variables)
 add a DataVariables object to the dataVariablesList
 
void insert_node (const DataInterface &data_interface)
 add a DataInterface object to the dataInterfaceList
 
void insert_node (const DataResponses &data_responses)
 add a DataResponses object to the dataResponsesList
 
void set (const String &entry_name, const RealVector &rv)
 set a RealVector within the database based on an identifier string
 
void set (const String &entry_name, const IntVector &iv)
 set an IntVector within the database based on an identifier string
 
void set (const String &entry_name, const BitArray &ba)
 set a BitArray within the database based on an identifier string
 
void set (const String &entry_name, const RealSymMatrix &rsm)
 set a RealMatrix within the database based on an identifier string
 
void set (const String &entry_name, const RealVectorArray &rva)
 set a RealVectorArray within the database based on an identifier string
 
void set (const String &entry_name, const IntVectorArray &iva)
 set an IntVectorArray within the database based on an identifier string
 
void set (const String &entry_name, const IntSetArray &isa)
 set an IntSetArray within the database based on an identifier string
 
void set (const String &entry_name, const RealSetArray &rsa)
 set a RealSetArray within the database based on an identifier string
 
void set (const String &entry_name, const IntRealMapArray &irma)
 set an IntRealMapArray within the database based on an identifier string
 
void set (const String &entry_name, const StringRealMapArray &srma)
 set a StringRealMapArray within the database based on an identifier string
 
void set (const String &entry_name, const RealRealMapArray &rrma)
 set a RealRealMapArray within the database based on an identifier string
 
void set (const String &entry_name, const RealRealPairRealMapArray &iirma)
 set a RealRealPairRealMapArray in the db based on an identifier string
 
void set (const String &entry_name, const IntIntPairRealMapArray &iirma)
 set an IntIntPairRealMapArray in the db based on an identifier string
 
void set (const String &entry_name, const StringArray &sa)
 set a StringArray within the database based on an identifier string
 
int min_procs_per_ea ()
 compute minimum evaluation partition size based on lower level overrides
 
int max_procs_per_ea ()
 compute maximum evaluation partition size based on lower level overrides and concurrency levels
 
int min_procs_per_ie ()
 compute minimum iterator partition size based on lower level overrides
 
int max_procs_per_ie (int max_eval_concurrency)
 compute maximum iterator partition size based on lower level overrides and concurrency levels
 
bool method_locked () const
 return methodDBLocked
 
bool model_locked () const
 return modelDBLocked
 
bool variables_locked () const
 return variablesDBLocked
 
bool interface_locked () const
 return interfaceDBLocked
 
bool responses_locked () const
 return responsesDBLocked
 
bool is_null () const
 function to check dbRep (does this envelope contain a letter)
 

Static Public Member Functions

static void botch (const char *fmt,...)
 print and error message and immediately abort
 
static void check_variables (std::list< DataVariables > *)
 check each node in a list of DataVariables, first mapping DataVariables members back to flat NIDR arrays if needed.
 
static void check_responses (std::list< DataResponses > *)
 
static void check_descriptor_format (const StringArray &labels)
 Validate format user-supplied descriptors.
 
static void check_descriptors_for_repeats (const StringArray &labels)
 Ensure no response descriptors are repeated.
 
static void check_descriptors_for_repeats (const StringArray &cd_labels, const StringArray &ddr_labels, const StringArray &ddsi_labels, const StringArray &ddss_labels, const StringArray &ddsr_labels, const StringArray &cs_labels, const StringArray &dsr_labels, const StringArray &dssi_labels, const StringArray &dsss_labels, const StringArray &dssr_labels, const StringArray &cau_labels, const StringArray &diau_labels, const StringArray &dsau_labels, const StringArray &drau_labels, const StringArray &ceu_labels, const StringArray &dieu_labels, const StringArray &dseu_labels, const StringArray &dreu_labels)
 Ensure no variable descriptors are repeated.
 
static void make_variable_defaults (std::list< DataVariables > *)
 Bounds and initial point check and inferred bounds generation. More...
 
static void make_response_defaults (std::list< DataResponses > *)
 
static void squawk (const char *fmt,...)
 print an error message and increment nerr, but continue
 
static void warn (const char *fmt,...)
 print a warning
 
- Static Public Member Functions inherited from ProblemDescDB
static int min_procs_per_level (int min_procs_per_server, int pps_spec, int num_serv_spec)
 compute minimum partition size for a parallel level based on lower level overrides
 
static int max_procs_per_level (int max_procs_per_server, int pps_spec, int num_serv_spec, short sched_spec, int asynch_local_conc, bool peer_dynamic_avail, int max_concurrency)
 compute maximum partition size for a parallel level based on lower level overrides
 

Static Public Attributes

static NIDRProblemDescDBpDDBInstance
 Pointer to the active object instance used within the static kwhandler functions in order to avoid the need for static data. Only initialized when parsing an input file; will be NULL for cases of direct DB population only.
 
static int nerr = 0
 number of parse error encountered
 

Static Private Member Functions

static void check_variables_node (void *v)
 check a single variables node; input argument v is Var_Info*
 
static int check_driver (const String &an_driver, const StringArray &link_files, const StringArray &copy_files)
 tokenize and try to validate the presence of an analysis driver, potentially included in the linked or copied template files More...
 

Private Attributes

std::list< void * > VIL
 List of Var_Info pointers, one per Variables instance.
 

Additional Inherited Members

- Protected Member Functions inherited from ProblemDescDB
 ProblemDescDB (BaseConstructor, ParallelLibrary &parallel_lib)
 constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More...
 
- Protected Attributes inherited from ProblemDescDB
DataEnvironment environmentSpec
 the environment specification (only one allowed) resulting from a call to environment_kwhandler() or insert_node()
 
std::list< DataMethoddataMethodList
 list of method specifications, one for each call to method_kwhandler() or insert_node()
 
std::list< DataModeldataModelList
 list of model specifications, one for each call to model_kwhandler() or insert_node()
 
std::list< DataVariablesdataVariablesList
 list of variables specifications, one for each call to variables_kwhandler() or insert_node()
 
std::list< DataInterfacedataInterfaceList
 list of interface specifications, one for each call to interface_kwhandler() or insert_node()
 
std::list< DataResponsesdataResponsesList
 list of responses specifications, one for each call to responses_kwhandler() or insert_node()
 
size_t environmentCntr
 counter for environment specifications used in check_input
 

Detailed Description

The derived input file database utilizing the new IDR parser.

The NIDRProblemDescDB class is derived from ProblemDescDB for use by the NIDR parser in processing DAKOTA input file data. For information on modifying the NIDR input parsing procedures, refer to Dakota/docs/Dev_Spec_Change.dox. For more on the parsing technology, see "Specifying and Reading Program Input with NIDR" by David M. Gay (report SAND2008-2261P, which is available in PDF form as http://dakota.sandia.gov/papers/nidr08.pdf). Source for the routines declared herein is NIDRProblemDescDB.cpp, in which most routines are so short that a description seems unnecessary.

Member Function Documentation

void derived_parse_inputs ( const std::string &  dakota_input_file,
const std::string &  dakota_input_string,
const std::string &  parser_options 
)
virtual

parses the input file and populates the problem description database using NIDR.

Parse the input file using the Input Deck Reader (IDR) parsing system. IDR populates the IDRProblemDescDB object with the input file data.

Reimplemented from ProblemDescDB.

References Dakota::abort_handler(), NIDRProblemDescDB::botch(), ProblemDescDB::dataMethodList, DataMethodRep::dlDetails, DataMethodRep::dlLib, NIDRProblemDescDB::nerr, ProblemDescDB::parallel_library(), NIDRProblemDescDB::pDDBInstance, and NIDRProblemDescDB::squawk().

int check_driver ( const String &  an_driver,
const StringArray &  link_files,
const StringArray &  copy_files 
)
staticprivate

tokenize and try to validate the presence of an analysis driver, potentially included in the linked or copied template files

returns 1 if not found, 2 if found, but not executable, 0 if found (no error) in case we want to return to error on not found...

References WorkdirHelper::find_driver(), NIDRProblemDescDB::squawk(), WorkdirHelper::tokenize_driver(), NIDRProblemDescDB::warn(), and WorkdirHelper::which().

void make_variable_defaults ( std::list< DataVariables > *  dvl)
static

Bounds and initial point check and inferred bounds generation.

Size arrays for contiguous storage of aggregated uncertain types. For each variable type, call Vgen_* to generate inferred bounds and initial point, repairing initial if needed.

size the aggregate arrays for uncertain (design and state are stored separately

References Dakota::DesignAndStateLabelsCheck, NIDRProblemDescDB::squawk(), Dakota::var_mp_drange, Dakota::VLUncertainInt, Dakota::VLUncertainReal, and Dakota::VLUncertainStr.

Referenced by NIDRProblemDescDB::derived_post_process().


The documentation for this class was generated from the following files: