![]() |
Dakota
Version 7.0
Explore and Predict with Confidence
|
The database containing information parsed from the DAKOTA input file. More...
Public Member Functions | |
| ProblemDescDB ()=default | |
| default constructor | |
| ProblemDescDB (int world_size, int world_rank) | |
| standard constructor More... | |
| ProblemDescDB (const ProblemDescDB &db) | |
| copy constructor More... | |
| virtual | ~ProblemDescDB () |
| destructor More... | |
| ProblemDescDB | operator= (const ProblemDescDB &db) |
| assignment operator More... | |
| void | enable_json_input (const String &) |
| Enables JSON input. | |
| void | enable_json_input (const nlohmann::json &) |
| Enables validated JSON input from an in-memory study object. | |
| void | check_input (const UserModes &user_modes) |
| verifies that there is at least one of each of the required keywords in the dakota input file | |
| 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 | lock_method_db () |
| void | unlock_method_db () |
| void | lock_model_db () |
| void | unlock_model_db () |
| void | lock_variables_db () |
| void | unlock_variables_db () |
| void | lock_interface_db () |
| void | unlock_interface_db () |
| void | lock_responses_db () |
| void | unlock_responses_db () |
| void | set_db_list_nodes (const String &method_tag) |
| set method selection based on a method identifier string to activate a particular method specification in method blocks and use pointers from this method specification to set all other subordinate block selections. | |
| void | set_db_list_nodes (size_t method_index) |
| set method selection based on an index within method blocks to activate a particular method specification and use pointers from this method specification to set all other subordinate block selections. | |
| 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 method selection based on a method identifier string to activate a particular method specification (only). | |
| void | set_db_method_node (size_t method_index) |
| set method selection based on an index within method blocks to activate a particular method specification (only). | |
| size_t | get_db_method_node () |
| return the index of the active node in method blocks | |
| void | set_db_model_nodes (const String &model_tag) |
| set the model subordinate block selections (model selection, variables selection, interface selection, and responses selection) based on the model identifier string | |
| void | set_db_model_nodes (size_t model_index) |
| set the model subordinate block selections (model selection, variables selection, interface selection, and responses selection) based on an index within model blocks | |
| size_t | get_db_model_node () |
| return the index of the active node in model blocks | |
| size_t | get_db_responses_node (const String &responses_tag) const |
| size_t | get_db_interface_node (const String &interface_tag) const |
| size_t | get_db_variables_node (const String &variables_tag) const |
| int | get_active_method_index () const |
| Return the active indices of each top-level specification block. These are primarily used to synchronize state with the IR runtime. | |
| int | get_active_model_index () const |
| int | get_active_variables_index () const |
| int | get_active_interface_index () const |
| int | get_active_responses_index () const |
| void | set_db_variables_node (const String &variables_tag) |
| set variables selection based on the variables identifier string | |
| void | set_db_interface_node (const String &interface_tag) |
| set interface selection based on the interface identifier string | |
| void | set_db_responses_node (const String &responses_tag) |
| set responses selection based on the responses identifier string | |
| std::string_view | method_id () const |
| return the name of the currently selected method | |
| std::string_view | model_id () const |
| return the name of the currently selected model | |
| std::string_view | interface_id () const |
| return the name of the currently selected interface | |
| std::shared_ptr< ProblemDescDB > | get_rep () const |
| return the dbRep | |
| template<typename T > | |
| decltype(auto) | get (const std::string &entry_name) const |
| void | write_json_dump (const String &output_path) const |
| write the full stored ProblemDescDB contents to a JSON file for debugging | |
| 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) | |
| bool | is_json_null () const |
| function to check if IR-backed JSON input is inactive | |
| bool | has_ir_state () const |
| function to check if validated JSON has been materialized into IR state | |
| bool | has_validated_json () const |
| function to check if validated JSON study is available | |
| const nlohmann::json & | validated_json () const |
| access the validated JSON study | |
Static Public Member Functions | |
| 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 | |
Protected Member Functions | |
| ProblemDescDB (BaseConstructor, int world_size, int world_rank) | |
| constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More... | |
Private Member Functions | |
| std::shared_ptr< ProblemDescDB > | get_db (int world_size, int world_rank) |
| Used by the envelope constructor to instantiate the correct letter class. More... | |
| bool | model_has_interface (const IRStore &model_store) const |
| helper function for determining whether an interface specification should be active, based on model type | |
| void | enforce_unique_ids () |
| require user-specified block identifiers to be unique | |
Private Attributes | |
| bool | methodDBLocked |
| prevents use of get_<type> retrieval and set_<type> update functions prior to setting the list node for the active method specification | |
| bool | modelDBLocked |
| prevents use of get_<type> retrieval and set_<type> update functions prior to setting the list node for the active model specification | |
| bool | variablesDBLocked |
| prevents use of get_<type> retrieval and set_<type> update functions prior to setting the list node for the active variables specification | |
| bool | interfaceDBLocked |
| prevents use of get_<type> retrieval and set_<type> update functions prior to setting the list node for the active interface specification | |
| bool | responsesDBLocked |
| prevents use of get_<type> retrieval and set_<type> update functions prior to setting the list node for the active responses specification | |
| std::shared_ptr< ProblemDescDB > | dbRep |
| pointer to the letter (initialized only for the envelope) | |
| std::shared_ptr< IRState > | irState |
| materialized IR for validated JSON input | |
| nlohmann::json | validatedStudyJson |
| validated JSON study for broadcast/re-materialization | |
| int | worldRank |
| MPI world rank. | |
| int | worldSize |
| MPI world size. | |
Friends | |
| void | ProblemDescDBUtils::check_and_broadcast_pdb (ProblemDescDB &problem_db, const String &dump_ir_path, const UserModes &user_modes, ParallelLibrary ¶llel_lib) |
| nlohmann::json | dump_problem_desc_db_json (const ProblemDescDB &db) |
The database containing information parsed from the DAKOTA input file.
Database facade over the materialized intermediate representation of a Dakota study.
| ProblemDescDB | ( | int | world_size, |
| int | world_rank | ||
| ) |
standard constructor
This is the envelope constructor which uses problem_db to build a fully populated db object. It only needs to extract enough data to properly execute get_db(problem_db), since the constructor overloaded with BaseConstructor builds the actual base class data inherited by the derived classes.
References Dakota::abort_handler(), and ProblemDescDB::dbRep.
| ProblemDescDB | ( | const ProblemDescDB & | db | ) |
copy constructor
Copy constructor manages sharing of dbRep
|
virtual |
destructor
dbRep only deleted when its reference count reaches zero.
References Dakota::Dak_pddb, and ProblemDescDB::dbRep.
|
protected |
constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139)
This constructor is the one which must build the base class data for all derived classes. get_db() instantiates a derived class letter and the derived constructor selects this base class constructor in its initialization list (to avoid the recursion of the base class constructor calling get_db() again). Since the letter IS the representation, its representation pointer is set to NULL.
| ProblemDescDB operator= | ( | const ProblemDescDB & | db | ) |
|
private |
Used by the envelope constructor to instantiate the correct letter class.
Initializes dbRep to the appropriate derived type. The standard derived class constructors are invoked.
References Dakota::Dak_pddb.