#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. More... | |
bool | snapshotGeneration () |
Returning the value of the snapshot generation flag. More... | |
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) |
virtual void | backup () |
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 |
MooseApp & | getMooseApp () const |
const std::string & | type () const |
virtual const std::string & | name () const |
std::string | typeAndName () const |
std::string | errorPrefix (const std::string &error_type) const |
void | callMooseError (std::string msg, const bool with_prefix) const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
const InputParameters & | parameters () const |
MooseObjectName | uniqueName () 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 &nm) const |
void | paramError (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 |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | mooseError (Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) 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. More... | |
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. More... | |
static void | transformBoundingBox (libMesh::BoundingBox &box, const MultiAppCoordTransform &transform) |
Public Attributes | |
const ConsoleStream | _console |
Protected Member Functions | |
std::vector< std::shared_ptr< PODSamplerSolutionTransfer > > | getActiveSolutionTransfers (Transfer::DIRECTION direction) |
Returning pointers to the solution transfers. Used in batch mode. More... | |
std::vector< std::shared_ptr< PODResidualTransfer > > | getActiveResidualTransfers (Transfer::DIRECTION direction) |
Returning pointers to the solution transfers. Used in batch mode. More... | |
void | computeResidual () |
Evaluating the residuals for every tag in the trainer. More... | |
void | computeResidualBatch (Real target_time) |
Evaluating the residuals for every tag in the trainer in batch mode. More... | |
virtual void | showStatusMessage (unsigned int i) const override |
Override to avoid 'solve converged' message and print when processors are finished. More... | |
virtual std::vector< std::string > | getCommandLineArgs (const unsigned int local_app) override |
Override to allow for batch mode to get correct cli_args. More... | |
void | setAppOutputFileBase (unsigned int index) |
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) |
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 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 | |
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. More... | |
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. More... | |
template<typename T = SurrogateTrainerBase> | |
T & | getSurrogateTrainerByName (const UserObjectName &name) const |
Definition at line 23 of file PODFullSolveMultiApp.h.
PODFullSolveMultiApp::PODFullSolveMultiApp | ( | const InputParameters & | parameters | ) |
Definition at line 34 of file PODFullSolveMultiApp.C.
|
protected |
Evaluating the residuals for every tag in the trainer.
Definition at line 101 of file PODFullSolveMultiApp.C.
Referenced by computeResidualBatch(), and solveStep().
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 245 of file SamplerFullSolveMultiApp.C.
Referenced by SamplerTransientMultiApp::solveStepBatch(), and SamplerFullSolveMultiApp::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().
|
overrideprotectedvirtualinherited |
Override to allow for batch mode to get correct cli_args.
Reimplemented from FullSolveMultiApp.
Definition at line 340 of file SamplerFullSolveMultiApp.C.
|
inherited |
Definition at line 46 of file SurrogateModelInterface.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 31 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 104 of file SurrogateModelInterface.h.
|
inherited |
Definition at line 60 of file SurrogateModelInterface.C.
|
inherited |
Definition at line 53 of file SurrogateModelInterface.C.
|
inherited |
Definition at line 111 of file SurrogateModelInterface.h.
Referenced by SurrogateTrainerOutput::output().
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 387 of file SamplerFullSolveMultiApp.C.
Referenced by SamplerParameterTransfer::execute(), SamplerParameterTransfer::executeToMultiapp(), SamplerTransientMultiApp::getCommandLineArgs(), and SamplerFullSolveMultiApp::getCommandLineArgs().
|
overrideprotectedvirtualinherited |
Override to avoid 'solve converged' message and print when processors are finished.
Reimplemented from FullSolveMultiApp.
Definition at line 290 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.
|
static |
Definition at line 21 of file PODFullSolveMultiApp.C.
|
protectedinherited |
Counter for extracting command line arguments in batch mode.
Definition at line 77 of file SamplerFullSolveMultiApp.h.
Referenced by computeResidualBatch(), SamplerFullSolveMultiApp::getCommandLineArgs(), SamplerFullSolveMultiApp::showStatusMessage(), and SamplerFullSolveMultiApp::solveStepBatch().
|
protectedinherited |
The Sup-application solve mode.
Definition at line 74 of file SamplerFullSolveMultiApp.h.
Referenced by computeResidualBatch(), SamplerFullSolveMultiApp::getCommandLineArgs(), SamplerFullSolveMultiApp::preTransfer(), preTransfer(), SamplerFullSolveMultiApp::SamplerFullSolveMultiApp(), SamplerFullSolveMultiApp::showStatusMessage(), SamplerFullSolveMultiApp::solveStep(), solveStep(), and SamplerFullSolveMultiApp::solveStepBatch().
|
protectedinherited |
Sampler to utilize for creating MultiApps.
Definition at line 71 of file SamplerFullSolveMultiApp.h.
Referenced by computeResidualBatch(), PODFullSolveMultiApp(), SamplerFullSolveMultiApp::preTransfer(), preTransfer(), SamplerFullSolveMultiApp::SamplerFullSolveMultiApp(), SamplerFullSolveMultiApp::solveStep(), SamplerFullSolveMultiApp::solveStepBatch(), and SamplerFullSolveMultiApp::updateRowData().
|
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().
|
protected |
Pointer to the trainer object itself.
Definition at line 55 of file PODFullSolveMultiApp.h.
Referenced by computeResidual(), computeResidualBatch(), and preTransfer().