www.mooseframework.org
SamplerTransfer.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef SAMPLERTRANSFER_H
9 #define SAMPLERTRANSFER_H
10 
11 // MOOSE includes
12 #include "MultiAppTransfer.h"
13 #include "Sampler.h"
14 
15 // Forward declarations
16 class SamplerTransfer;
17 class SamplerReceiver;
18 
19 template <>
20 InputParameters validParams<SamplerTransfer>();
21 
25 class SamplerTransfer : public MultiAppTransfer
26 {
27 public:
28  SamplerTransfer(const InputParameters & parameters);
29  virtual void execute() override;
30 
31 protected:
36  SamplerReceiver * getReceiver(unsigned int app_index,
37  const std::vector<DenseMatrix<Real>> & samples);
38 
40  const std::vector<std::string> & _parameter_names;
41 
43  Sampler * _sampler_ptr;
44 
46  const std::string & _receiver_name;
47 
49  std::vector<std::pair<unsigned int, unsigned int>> _multi_app_matrix_row;
50 };
51 
52 #endif
std::vector< std::pair< unsigned int, unsigned int > > _multi_app_matrix_row
The matrix and row for each MultiApp.
InputParameters validParams< SamplerTransfer >()
virtual void execute() override
const std::vector< std::string > & _parameter_names
Storage for the list of parameters to control.
Copy each row from each DenseMatrix to the sub-applications SamplerReceiver object.
SamplerReceiver * getReceiver(unsigned int app_index, const std::vector< DenseMatrix< Real >> &samples)
Return the SamplerReceiver object and perform error checking.
Sampler * _sampler_ptr
Pointer to the Sampler object used by the SamplerMultiApp.
A Control object for receiving data from a master application Sampler object.
SamplerTransfer(const InputParameters &parameters)
const std::string & _receiver_name
The name of the SamplerReceiver Control object on the sub-application.