#include <PODFullSolveMultiApp.h>
Public Types | |
| typedef DataFileName | DataFileParameterType |
Public Member Functions | |
| PODFullSolveMultiApp (const InputParameters ¶meters) | |
| virtual bool | solveStep (Real dt, Real target_time, bool auto_advance=true) override |
| virtual void | preTransfer (Real dt, Real target_time) override |
| Overriding preTransfer to reinit the subappliations if the object needs to be executed twice. | |
| bool | snapshotGeneration () |
| Returning the value of the snapshot generation flag. | |
| virtual void | backup () override |
| This method is overridden so that we only store the initial state and not on any other timestep when doing batch-restore. | |
| virtual void | initialSetup () override |
| virtual void | finalize () override |
| virtual void | postExecute () override |
| virtual void | restore (bool force=true) override |
| virtual void | preExecute () |
| void | setupPositions () |
| virtual void | createLocalApp (const unsigned int i) |
| virtual void | incrementTStep (Real) |
| virtual void | finishStep (bool=false) |
| bool | needsRestoration () |
| virtual Executioner * | getExecutioner (unsigned int app) |
| virtual libMesh::BoundingBox | getBoundingBox (unsigned int app, bool displaced_mesh, const MultiAppCoordTransform *coord_transform=nullptr) |
| FEProblemBase & | problemBase () |
| FEProblemBase & | appProblemBase (unsigned int app) |
| FEProblem & | appProblem (unsigned int app) |
| const UserObject & | appUserObjectBase (unsigned int app, const std::string &name) |
| Real | appPostprocessorValue (unsigned int app, const std::string &name) |
| virtual libMesh::NumericVector< libMesh::Number > & | appTransferVector (unsigned int app, std::string var_name) |
| unsigned int | numGlobalApps () const |
| unsigned int | numLocalApps () |
| unsigned int | firstLocalApp () |
| bool | isFirstLocalRank () const |
| bool | hasApp () |
| bool | hasLocalApp (unsigned int global_app) const |
| MooseApp * | localApp (unsigned int local_app) |
| const Point & | position (unsigned int app) const |
| virtual void | resetApp (unsigned int global_app, Real time=0.0) |
| virtual void | moveApp (unsigned int global_app, Point p) |
| virtual void | parentOutputPositionChanged () |
| MPI_Comm & | comm () |
| const Parallel::Communicator & | comm () const |
| bool | isRootProcessor () |
| bool | usingPositions () const |
| bool | runningInPosition () const |
| void | addAssociatedTransfer (MultiAppTransfer &transfer) |
| void | setAppOutputFileBase () |
| virtual bool | enabled () const |
| std::shared_ptr< MooseObject > | getSharedPtr () |
| std::shared_ptr< const MooseObject > | getSharedPtr () const |
| bool | isKokkosObject () const |
| MooseApp & | getMooseApp () const |
| const std::string & | type () const |
| const std::string & | name () const |
| std::string | typeAndName () const |
| MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
| MooseObjectName | uniqueName () const |
| const InputParameters & | parameters () const |
| const hit::Node * | getHitNode () const |
| bool | hasBase () const |
| const std::string & | getBase () const |
| const T & | getParam (const std::string &name) const |
| std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
| const T * | queryParam (const std::string &name) const |
| const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
| T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
| bool | isParamValid (const std::string &name) const |
| bool | isParamSetByUser (const std::string &name) const |
| void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
| void | paramError (const std::string ¶m, Args... args) const |
| void | paramWarning (const std::string ¶m, Args... args) const |
| void | paramWarning (const std::string ¶m, Args... args) const |
| void | paramInfo (const std::string ¶m, Args... args) const |
| std::string | messagePrefix (const bool hit_prefix=true) const |
| std::string | errorPrefix (const std::string &) const |
| void | mooseError (Args &&... args) const |
| void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
| void | mooseErrorNonPrefixed (Args &&... args) const |
| void | mooseWarning (Args &&... args) const |
| void | mooseWarning (Args &&... args) const |
| void | mooseWarningNonPrefixed (Args &&... args) const |
| void | mooseWarningNonPrefixed (Args &&... args) const |
| void | mooseDeprecated (Args &&... args) const |
| void | mooseDeprecated (Args &&... args) const |
| void | mooseDeprecatedNoTrace (Args &&... args) const |
| void | mooseInfo (Args &&... args) const |
| void | callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const |
| std::string | getDataFileName (const std::string ¶m) const |
| std::string | getDataFileNameByName (const std::string &relative_path) const |
| std::string | getDataFilePath (const std::string &relative_path) const |
| virtual void | timestepSetup () |
| virtual void | jacobianSetup () |
| virtual void | residualSetup () |
| virtual void | subdomainSetup () |
| virtual void | customSetup (const ExecFlagType &) |
| const ExecFlagEnum & | getExecuteOnEnum () const |
| PerfGraph & | perfGraph () |
| processor_id_type | n_processors () const |
| processor_id_type | processor_id () const |
| T & | getSampler (const std::string &name) |
| Sampler & | getSampler (const std::string &name) |
| T & | getSamplerByName (const SamplerName &name) |
| Sampler & | getSamplerByName (const SamplerName &name) |
Static Public Member Functions | |
| static InputParameters | validParams () |
| static std::vector< std::string > | sampledCommandLineArgs (const std::vector< Real > &row, const std::vector< std::string > &full_args_name) |
| Helper for inserting row data into commandline arguments Used here and in SamplerTransientMultiApp. | |
| static void | execBatchTransfers (const std::vector< std::shared_ptr< StochasticToolsTransfer > > &transfers, dof_id_type global_row_index, const std::vector< Real > &row_data, Transfer::DIRECTION direction, bool verbose, const ConsoleStream &console) |
| Helper for executing transfers when doing batch stochastic simulations. | |
| static void | callMooseError (MooseApp *const app, const InputParameters ¶ms, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true) |
| static void | transformBoundingBox (libMesh::BoundingBox &box, const MultiAppCoordTransform &transform) |
Public Attributes | |
| usingCombinedWarningSolutionWarnings | |
| const ConsoleStream | _console |
Static Public Attributes | |
| static const std::string | type_param |
| static const std::string | name_param |
| static const std::string | unique_name_param |
| static const std::string | app_param |
| static const std::string | moose_base_param |
| static const std::string | kokkos_object_param |
Protected Member Functions | |
| std::vector< std::shared_ptr< PODSamplerSolutionTransfer > > | getActiveSolutionTransfers (Transfer::DIRECTION direction) |
| Returning pointers to the solution transfers. Used in batch mode. | |
| std::vector< std::shared_ptr< PODResidualTransfer > > | getActiveResidualTransfers (Transfer::DIRECTION direction) |
| Returning pointers to the solution transfers. Used in batch mode. | |
| void | computeResidual () |
| Evaluating the residuals for every tag in the trainer. | |
| void | computeResidualBatch (Real target_time) |
| Evaluating the residuals for every tag in the trainer in batch mode. | |
| virtual void | showStatusMessage (unsigned int i) const override |
| Override to avoid 'solve converged' message and print when processors are finished. | |
| virtual std::vector< std::string > | getCommandLineArgs (const unsigned int local_app) override |
| Override to allow for batch mode to get correct cli_args. | |
| void | setAppOutputFileBase (unsigned int index) |
| bool | propagateRecoverToSubApps () const override |
| virtual std::vector< std::string > | cliArgs () const |
| virtual void | fillPositions () |
| void | readCommandLineArguments () |
| void | createApp (unsigned int i, Real start_time) |
| void | buildComm () |
| unsigned int | globalAppToLocal (unsigned int global_app) |
| virtual void | preRunInputFile () |
| void | init (unsigned int num_apps, bool batch_mode=false) |
| void | init (unsigned int num_apps, const LocalRankConfig &config) |
| void | createApps () |
| void | keepSolutionDuringRestore (bool keep_solution_during_restore) |
| void | flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const |
| InvalidSolutionID | registerInvalidSolutionInternal (const std::string &message, const bool warning) const |
| T & | declareRestartableData (const std::string &data_name, Args &&... args) |
| ManagedValue< T > | declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args) |
| const T & | getRestartableData (const std::string &data_name) const |
| T & | declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args) |
| T & | declareRecoverableData (const std::string &data_name, Args &&... args) |
| T & | declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args) |
| T & | declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args) |
| std::string | restartableName (const std::string &data_name) const |
| PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level) const |
| PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const |
| std::string | timedSectionName (const std::string §ion_name) const |
| const ReporterContextBase & | getReporterContextBaseByName (const ReporterName &reporter_name) const |
| const ReporterName & | getReporterName (const std::string ¶m_name) const |
| virtual void | addReporterDependencyHelper (const ReporterName &) |
| const T & | getReporterValue (const std::string ¶m_name, const std::size_t time_index=0) |
| const T & | getReporterValue (const std::string ¶m_name, ReporterMode mode, const std::size_t time_index=0) |
| const T & | getReporterValue (const std::string ¶m_name, const std::size_t time_index=0) |
| const T & | getReporterValue (const std::string ¶m_name, ReporterMode mode, const std::size_t time_index=0) |
| const T & | getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0) |
| const T & | getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0) |
| const T & | getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0) |
| const T & | getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0) |
| bool | hasReporterValue (const std::string ¶m_name) const |
| bool | hasReporterValue (const std::string ¶m_name) const |
| bool | hasReporterValue (const std::string ¶m_name) const |
| bool | hasReporterValue (const std::string ¶m_name) const |
| bool | hasReporterValueByName (const ReporterName &reporter_name) const |
| bool | hasReporterValueByName (const ReporterName &reporter_name) const |
| bool | hasReporterValueByName (const ReporterName &reporter_name) const |
| bool | hasReporterValueByName (const ReporterName &reporter_name) const |
Static Protected Member Functions | |
| static std::string | getMultiAppName (const std::string &base_name, dof_id_type index, dof_id_type total) |
Private Member Functions | |
| bool | solveStepBatch (Real dt, Real target_time, bool auto_advance=true) |
| Helper method for running in mode='batch'. | |
| void | updateRowData (dof_id_type local_index) |
| Helper function for updating _row_data and _local_row_index. | |
| std::vector< std::shared_ptr< StochasticToolsTransfer > > | getActiveStochasticToolsTransfers (Transfer::DIRECTION direction) |
| Helper for getting StochasticToolsTransfer objects. | |
| RestartableDataValue & | registerRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const |
| void | registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter) |
| RestartableData< T > & | declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const |
| bool | reportersAdded () const |
| void | possiblyCheckHasReporter (const ReporterName &reporter_name, const std::string ¶m_name="") const |
| template<> | |
| SurrogateModel & | getSurrogateModel (const std::string &name) const |
| template<> | |
| SurrogateTrainerBase & | getSurrogateTrainer (const std::string &name) const |
| template<> | |
| SurrogateModel & | getSurrogateModelByName (const UserObjectName &name) const |
| template<> | |
| SurrogateTrainerBase & | getSurrogateTrainerByName (const UserObjectName &name) const |
| template<typename T = SurrogateModel> | |
| T & | getSurrogateModel (const std::string &name) const |
| Get a SurrogateModel/Trainer with a given name. | |
| template<typename T = SurrogateTrainerBase> | |
| T & | getSurrogateTrainer (const std::string &name) const |
| template<typename T = SurrogateModel> | |
| T & | getSurrogateModelByName (const UserObjectName &name) const |
| Get a sampler with a given name. | |
| template<typename T = SurrogateTrainerBase> | |
| T & | getSurrogateTrainerByName (const UserObjectName &name) const |
Static Private Member Functions | |
| static const hit::Node * | getHitNode (const InputParameters ¶ms) |
| static std::string | messagePrefix (const InputParameters ¶ms, const bool hit_prefix) |
Private Attributes | |
| bool | _solved_once |
| dof_id_type | _number_of_sampler_rows |
| std::vector< Real > | _row_data |
| Current row of data updated by updateRowData. Used by transfers and setting command line args. | |
| dof_id_type | _local_row_index = std::numeric_limits<dof_id_type>::max() |
| Current local index representing _row_data. | |
| const std::vector< bool > * | _should_run = nullptr |
| Reporter value determining whether the sub-app should be run for a certain sample. | |
| const bool | _ignore_diverge |
| const bool | _update_old_state_when_keeping_solution_during_restore |
| std::vector< Executioner * > | _executioners |
| std::optional< std::string > | _cli_args_param |
| const ParallelParamObject & | _parent |
| const MooseBase & | _si_moose_base |
| const FEProblemBase * | _si_problem |
| ExecFlagEnum | _empty_execute_enum |
| const RestartableDataMapName | _metaname |
| std::string | _restartable_name |
| const InputParameters & | _si_params |
| FEProblemBase & | _si_feproblem |
| THREAD_ID | _si_tid |
| const InputParameters & | _ri_params |
| FEProblemBase & | _ri_fe_problem_base |
| const ReporterData & | _ri_reporter_data |
| const MooseObject & | _ri_moose_object |
| const InputParameters & | _smi_params |
| Parameters of the object with this interface. | |
| FEProblemBase & | _smi_feproblem |
| Reference to FEProblemBase instance. | |
| const THREAD_ID | _smi_tid |
| Thread ID. | |
Definition at line 23 of file PODFullSolveMultiApp.h.
| PODFullSolveMultiApp::PODFullSolveMultiApp | ( | const InputParameters & | parameters | ) |
Definition at line 34 of file PODFullSolveMultiApp.C.
|
overridevirtualinherited |
This method is overridden so that we only store the initial state and not on any other timestep when doing batch-restore.
Reimplemented from FullSolveMultiApp.
Definition at line 86 of file SamplerFullSolveMultiApp.C.
Referenced by computeResidualBatch().
|
protected |
Evaluating the residuals for every tag in the trainer.
Definition at line 101 of file PODFullSolveMultiApp.C.
Referenced by computeResidualBatch(), and solveStep().
|
protected |
Evaluating the residuals for every tag in the trainer in batch mode.
Definition at line 135 of file PODFullSolveMultiApp.C.
Referenced by solveStep().
|
staticinherited |
Helper for executing transfers when doing batch stochastic simulations.
| transfers | A vector of transfers to execute |
| global_row_index | The global row index of the run |
| row_data | The current sampler row of data for the transfer to utilize |
| type | The current execution flag, used for info printing |
| direction | The direction of the transfer, used for info printing |
| verbose | Whether or not print information about the transfer |
| console | The console stream to output to |
Definition at line 265 of file SamplerFullSolveMultiApp.C.
Referenced by SamplerFullSolveMultiApp::solveStepBatch(), and SamplerTransientMultiApp::solveStepBatch().
|
protected |
Returning pointers to the solution transfers. Used in batch mode.
Definition at line 218 of file PODFullSolveMultiApp.C.
Referenced by computeResidualBatch().
|
protected |
Returning pointers to the solution transfers. Used in batch mode.
Definition at line 203 of file PODFullSolveMultiApp.C.
Referenced by computeResidualBatch().
|
privateinherited |
Helper for getting StochasticToolsTransfer objects.
Definition at line 345 of file SamplerFullSolveMultiApp.C.
Referenced by SamplerFullSolveMultiApp::solveStepBatch().
|
overrideprotectedvirtualinherited |
Override to allow for batch mode to get correct cli_args.
Reimplemented from FullSolveMultiApp.
Definition at line 360 of file SamplerFullSolveMultiApp.C.
|
inherited |
Get a SurrogateModel/Trainer with a given name.
| name | The name of the parameter key of the sampler to retrieve |
Definition at line 81 of file SurrogateModelInterface.h.
Referenced by SurrogateTrainer::initialize().
|
inherited |
Definition at line 46 of file SurrogateModelInterface.C.
|
inherited |
Get a sampler with a given name.
| name | The name of the sampler to retrieve |
Definition at line 88 of file SurrogateModelInterface.h.
Referenced by CrossValidationScores::CrossValidationScores(), EvaluateSurrogate::EvaluateSurrogate(), and InverseMapping::initialSetup().
|
inherited |
Definition at line 31 of file SurrogateModelInterface.C.
|
inherited |
Definition at line 104 of file SurrogateModelInterface.h.
|
inherited |
Definition at line 60 of file SurrogateModelInterface.C.
|
inherited |
Definition at line 111 of file SurrogateModelInterface.h.
Referenced by SurrogateTrainerOutput::output().
|
inherited |
Definition at line 53 of file SurrogateModelInterface.C.
|
overridevirtual |
Overriding preTransfer to reinit the subappliations if the object needs to be executed twice.
Reimplemented from SamplerFullSolveMultiApp.
Definition at line 53 of file PODFullSolveMultiApp.C.
|
staticinherited |
Helper for inserting row data into commandline arguments Used here and in SamplerTransientMultiApp.
How it works:
Definition at line 410 of file SamplerFullSolveMultiApp.C.
Referenced by SamplerParameterTransfer::execute(), SamplerParameterTransfer::executeToMultiapp(), SamplerFullSolveMultiApp::getCommandLineArgs(), and SamplerTransientMultiApp::getCommandLineArgs().
|
overrideprotectedvirtualinherited |
Override to avoid 'solve converged' message and print when processors are finished.
Reimplemented from FullSolveMultiApp.
Definition at line 310 of file SamplerFullSolveMultiApp.C.
|
inline |
Returning the value of the snapshot generation flag.
Definition at line 37 of file PODFullSolveMultiApp.h.
|
overridevirtual |
Reimplemented from SamplerFullSolveMultiApp.
Definition at line 76 of file PODFullSolveMultiApp.C.
|
privateinherited |
Helper method for running in mode='batch'.
Definition at line 150 of file SamplerFullSolveMultiApp.C.
Referenced by SamplerFullSolveMultiApp::solveStep().
|
privateinherited |
Helper function for updating _row_data and _local_row_index.
This allows multiple calls to the same row index
Definition at line 383 of file SamplerFullSolveMultiApp.C.
Referenced by SamplerFullSolveMultiApp::getCommandLineArgs(), and SamplerFullSolveMultiApp::solveStepBatch().
|
static |
Definition at line 21 of file PODFullSolveMultiApp.C.
|
protectedinherited |
Counter for extracting command line arguments in batch mode.
Definition at line 83 of file SamplerFullSolveMultiApp.h.
Referenced by computeResidualBatch(), SamplerFullSolveMultiApp::getCommandLineArgs(), SamplerFullSolveMultiApp::showStatusMessage(), and SamplerFullSolveMultiApp::solveStepBatch().
|
privateinherited |
Current local index representing _row_data.
Definition at line 115 of file SamplerFullSolveMultiApp.h.
Referenced by SamplerFullSolveMultiApp::updateRowData().
|
protectedinherited |
The Sup-application solve mode.
Definition at line 80 of file SamplerFullSolveMultiApp.h.
Referenced by SamplerFullSolveMultiApp::backup(), computeResidualBatch(), SamplerFullSolveMultiApp::getCommandLineArgs(), preTransfer(), SamplerFullSolveMultiApp::preTransfer(), SamplerFullSolveMultiApp::SamplerFullSolveMultiApp(), SamplerFullSolveMultiApp::showStatusMessage(), solveStep(), SamplerFullSolveMultiApp::solveStep(), and SamplerFullSolveMultiApp::solveStepBatch().
|
privateinherited |
Definition at line 110 of file SamplerFullSolveMultiApp.h.
Referenced by SamplerFullSolveMultiApp::preTransfer(), SamplerFullSolveMultiApp::SamplerFullSolveMultiApp(), SamplerFullSolveMultiApp::showStatusMessage(), and SamplerFullSolveMultiApp::solveStepBatch().
|
privateinherited |
Current row of data updated by updateRowData. Used by transfers and setting command line args.
Definition at line 113 of file SamplerFullSolveMultiApp.h.
Referenced by SamplerFullSolveMultiApp::getCommandLineArgs(), SamplerFullSolveMultiApp::preTransfer(), SamplerFullSolveMultiApp::solveStepBatch(), and SamplerFullSolveMultiApp::updateRowData().
|
protectedinherited |
Sampler to utilize for creating MultiApps.
Definition at line 77 of file SamplerFullSolveMultiApp.h.
Referenced by computeResidualBatch(), PODFullSolveMultiApp(), preTransfer(), SamplerFullSolveMultiApp::preTransfer(), SamplerFullSolveMultiApp::SamplerFullSolveMultiApp(), SamplerFullSolveMultiApp::solveStep(), SamplerFullSolveMultiApp::solveStepBatch(), and SamplerFullSolveMultiApp::updateRowData().
|
privateinherited |
Reporter value determining whether the sub-app should be run for a certain sample.
Definition at line 118 of file SamplerFullSolveMultiApp.h.
Referenced by SamplerFullSolveMultiApp::preTransfer(), and SamplerFullSolveMultiApp::solveStepBatch().
|
privateinherited |
Reference to FEProblemBase instance.
Definition at line 73 of file SurrogateModelInterface.h.
Referenced by SurrogateModelInterface::getSurrogateModelByName(), and SurrogateModelInterface::getSurrogateTrainerByName().
|
privateinherited |
Parameters of the object with this interface.
Definition at line 70 of file SurrogateModelInterface.h.
Referenced by SurrogateModelInterface::getSurrogateModel(), and SurrogateModelInterface::getSurrogateTrainer().
|
privateinherited |
Thread ID.
Definition at line 76 of file SurrogateModelInterface.h.
Referenced by SurrogateModelInterface::getSurrogateTrainerByName().
|
protected |
Switch used to differentiate between snapshot generation and residual computation.
Residual generation is only possible after the snapshot generation part is complete.
Definition at line 60 of file PODFullSolveMultiApp.h.
Referenced by preTransfer(), snapshotGeneration(), and solveStep().
|
privateinherited |
Definition at line 107 of file SamplerFullSolveMultiApp.h.
Referenced by SamplerFullSolveMultiApp::preTransfer(), SamplerFullSolveMultiApp::solveStep(), and SamplerFullSolveMultiApp::solveStepBatch().
|
protected |
Pointer to the trainer object itself.
Definition at line 55 of file PODFullSolveMultiApp.h.
Referenced by computeResidual(), computeResidualBatch(), and preTransfer().