https://mooseframework.inl.gov
MultiAppReporterTransfer.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
12 #include "MultiAppTransfer.h"
13 
18 {
19 public:
21 
23  virtual void initialSetup() override;
24  virtual void execute() override;
25 
26 protected:
27  virtual void executeToMultiapp();
28  virtual void executeFromMultiapp();
29 
31  const std::vector<ReporterName> & _from_reporter_names;
32 
34  const std::vector<ReporterName> & _to_reporter_names;
35 
37  const unsigned int & _subapp_index;
38 
39 private:
40  virtual void checkSiblingsTransferSupported() const override;
43 
50  void setVectorReporterTransferModes(const std::shared_ptr<MultiApp> & main_app,
51  const std::vector<ReporterName> & main_app_rep_names,
52  const std::vector<ReporterName> & sub_app_rep_names);
53 };
virtual void checkSiblingsTransferSupported() const override
Whether the transfer supports siblings transfer.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const unsigned int & _subapp_index
If set, indicates a particular subapp to transfer the reporter to/from.
const std::vector< ReporterName > & _from_reporter_names
Vector of reporters to transfer data from.
virtual void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup...
static InputParameters validParams()
MultiAppReporterTransfer(const InputParameters &parameters)
const std::vector< ReporterName > & _to_reporter_names
Vector of reporters to transfer data to.
bool _distribute_reporter_vector
determines transfer type
Transfer for migrating reporter values between the main and sub-application(s).
virtual void execute() override
Execute the transfer.
void setVectorReporterTransferModes(const std::shared_ptr< MultiApp > &main_app, const std::vector< ReporterName > &main_app_rep_names, const std::vector< ReporterName > &sub_app_rep_names)
Sets transfer modes for reporters when distributing.
Base class for all MultiAppTransfer objects.
const InputParameters & parameters() const
Get the parameters of the object.