forked from idaholab/moose
/
OptimizationMultiAppCommandLineControl.h
45 lines (37 loc) · 1.37 KB
/
OptimizationMultiAppCommandLineControl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
// MOOSE includes
#include "Control.h"
#include "ReporterInterface.h"
// Forward declarations
class MultiApp;
/**
* A Control object for receiving data from a master application Sampler object.
*/
class OptimizationMultiAppCommandLineControl : public Control, public ReporterInterface
{
public:
static InputParameters validParams();
OptimizationMultiAppCommandLineControl(const InputParameters & parameters);
/**
* Do not allow the use of initialSetup, because this class is designed to operate
* on PRE_MULTIAPP_SETUP, which occurs before this callback. This will prevent a child class
* adding something to this function without it doing anything.
*/
virtual void initialSetup() override final;
virtual void execute() override;
protected:
/// The MultiApp this Transfer is transferring data to or from
std::shared_ptr<MultiApp> _multi_app;
/// Value names from OptimizationReporter
const std::vector<ReporterValueName> & _value_names;
/// Parameter names in sub-application
const std::vector<std::string> & _parameters;
};