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
11 
13 #include "MultiAppTransfer.h"
14 
19 {
20 public:
22 
24  virtual void initialSetup() override;
25  virtual void execute() override;
26 
27 protected:
28  virtual void executeToMultiapp();
29  virtual void executeFromMultiapp();
30 
32  const std::vector<ReporterName> & _from_reporter_names;
33 
35  const std::vector<ReporterName> & _to_reporter_names;
36 
38  const unsigned int & _subapp_index;
39 
40 private:
41  virtual void checkSiblingsTransferSupported() const override;
44 
51  void setVectorReporterTransferModes(const std::shared_ptr<MultiApp> & main_app,
52  const std::vector<ReporterName> & main_app_rep_names,
53  const std::vector<ReporterName> & sub_app_rep_names);
54 };
virtual void checkSiblingsTransferSupported() const override
Whether the transfer supports siblings transfer.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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.