WSF
WsfMultiresolutionMultirunTable Class Reference

#include <WsfMultiresolutionMultirunTable.hpp>

Inheritance diagram for WsfMultiresolutionMultirunTable:
Collaboration diagram for WsfMultiresolutionMultirunTable:

Public Member Functions

 WsfMultiresolutionMultirunTable ()=default
 WsfMultiresolutionMultirunTable (UtInput &aInput, int aRunNumber)
Public Member Functions inherited from WsfScenarioExtension
 WsfScenarioExtension ()
 ~WsfScenarioExtension () override
WsfScenarioGetScenario () const
WsfApplicationGetApplication () const
virtual void AddedToScenario ()
virtual void FileLoaded (const std::string &aFileName)
virtual bool Complete ()
virtual bool Complete2 ()
virtual bool AlwaysCreate ()
Public Member Functions inherited from WsfExtension
virtual ~WsfExtension ()=default
const std::string & GetExtensionName () const

Framework methods.

bool ProcessInput (UtInput &aInput) override
void SimulationCreated (WsfSimulation &aSimulation) override
ut::optional< double > GetFidelity (const wsf::multiresolution::PlatformComponentName &aPlatformComponentName) const
static WsfMultiresolutionMultirunTableFind (const WsfScenario &aScenario)

Additional Inherited Members

Protected Member Functions inherited from WsfExtension
void InitializeExtensionName (const std::string &aName)

Detailed Description

Contains a table of fidelity values which can be mapped onto multiresolution models based on the run number used with Monte Carlo iterations. Usage is that when SimulationCreated is called, any subsequent calls to GetFidelity will return values for the run number (Monte Carlo iteration) associated with the WsfSimulation passed on the call to SimulationCreated.

Constructor & Destructor Documentation

◆ WsfMultiresolutionMultirunTable() [1/2]

WsfMultiresolutionMultirunTable::WsfMultiresolutionMultirunTable ( )
default

◆ WsfMultiresolutionMultirunTable() [2/2]

WsfMultiresolutionMultirunTable::WsfMultiresolutionMultirunTable ( UtInput & aInput,
int aRunNumber )
Note
This ctor is for testing. Typical use of this class would be to default construct and use ProcessInput. Then, for each new simulation, SimulationCreated will be called to set up the map of fidelity values corresponding to the current run number.

References ProcessInput().

Member Function Documentation

◆ Find()

◆ GetFidelity()

ut::optional< double > WsfMultiresolutionMultirunTable::GetFidelity ( const wsf::multiresolution::PlatformComponentName & aPlatformComponentName) const
Returns
The assigned fidelity value for this particular simulation (with a given run number set on a call to SimulationCreated) for the specified platform and component given by aPlatform and aComponent.

Referenced by WsfMultiresolutionPlatformComponent< DerivedComponent >::GetFidelity(), and WsfMultiresolutionMultirunTable().

◆ ProcessInput()

bool WsfMultiresolutionMultirunTable::ProcessInput ( UtInput & aInput)
overridevirtual

Process potential input for the extension. This method examines the current input command to determine if it is one that is recognized by the extension. If it is one recognized by the extension then it processes the command and returns 'true', otherwise it returns 'false'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the extension or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.

Reimplemented from WsfScenarioExtension.

References wsf::multiresolution::ComponentTypeRequiresNameMap().

Referenced by WsfMultiresolutionMultirunTable().

◆ SimulationCreated()

void WsfMultiresolutionMultirunTable::SimulationCreated ( WsfSimulation & aSimulation)
overridevirtual

Called when a simulation has been created. (Technically this is called upon entry to WsfSimulation::Initialize()). This is typically used when a scenario extension also requires a simulation extension. The method would typically register the simulation extension as follows:

aSimulation.RegisterExtension("my_ext", new MySimulationExtension());
Parameters
aSimulationThe simulation that is being created. See note below!
Note
This is called upon entry to WsfSimulation::Initialize() and nothing can be assumed about the state of the simulation.
See also
WsfSimulationExtension, WsfApplicationExtension::SimulationCreated

Reimplemented from WsfScenarioExtension.

References WsfSimulation::GetRunNumber().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved