www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SamplerReceiver Class Reference

A Control object for receiving data from a master application Sampler object. More...

#include <SamplerReceiver.h>

Inheritance diagram for SamplerReceiver:
[legend]

Public Member Functions

 SamplerReceiver (const InputParameters &parameters)
 
virtual void execute () override
 

Protected Member Functions

void reset ()
 Clears the list of parameters to modify. More...
 
void addControlParameter (const std::string &name, const Real &value)
 Appends the list of parameters to modify. More...
 

Protected Attributes

std::map< std::string, Real > _parameters
 Storage for the parameters to control. More...
 

Friends

class SamplerTransfer
 Allows the SamplerTransfer to call the reset and addControlParameter methods, which should only be called by that object so making the public is dangerous. More...
 

Detailed Description

A Control object for receiving data from a master application Sampler object.

Definition at line 31 of file SamplerReceiver.h.

Constructor & Destructor Documentation

SamplerReceiver::SamplerReceiver ( const InputParameters &  parameters)

Definition at line 29 of file SamplerReceiver.C.

29 : Control(parameters) {}

Member Function Documentation

void SamplerReceiver::addControlParameter ( const std::string &  name,
const Real &  value 
)
protected

Appends the list of parameters to modify.

Definition at line 45 of file SamplerReceiver.C.

Referenced by SamplerTransfer::execute().

46 {
47  _parameters[name] = value;
48 }
std::map< std::string, Real > _parameters
Storage for the parameters to control.
void SamplerReceiver::execute ( )
overridevirtual

Definition at line 32 of file SamplerReceiver.C.

33 {
34  for (auto & param_pair : _parameters)
35  setControllableValueByName<Real>(param_pair.first, param_pair.second);
36 }
std::map< std::string, Real > _parameters
Storage for the parameters to control.
void SamplerReceiver::reset ( )
protected

Clears the list of parameters to modify.

Definition at line 39 of file SamplerReceiver.C.

Referenced by SamplerTransfer::execute().

40 {
41  _parameters.clear();
42 }
std::map< std::string, Real > _parameters
Storage for the parameters to control.

Friends And Related Function Documentation

friend class SamplerTransfer
friend

Allows the SamplerTransfer to call the reset and addControlParameter methods, which should only be called by that object so making the public is dangerous.

Definition at line 53 of file SamplerReceiver.h.

Member Data Documentation

std::map<std::string, Real> SamplerReceiver::_parameters
protected

Storage for the parameters to control.

Definition at line 49 of file SamplerReceiver.h.

Referenced by addControlParameter(), execute(), and reset().


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