Line data Source code
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 : 12 : // MOOSE includes 13 : #include "PODSamplerSolutionTransfer.h" 14 : 15 : /** 16 : * Transfers residuals for given variables and vector tags from a sub-subapplication 17 : * to a PODReducedBasisTrainer object. 18 : */ 19 : class PODResidualTransfer : public PODSamplerSolutionTransfer 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : PODResidualTransfer(const InputParameters & parameters); 24 : 25 : ///@{ 26 : /** 27 : * Methods used when running in batch mode (see SamplerFullSolveMultiApp) 28 : */ 29 0 : virtual void initializeFromMultiapp() override{}; 30 : virtual void executeFromMultiapp() override; 31 0 : virtual void finalizeFromMultiapp() override{}; 32 : ///@} 33 : 34 : protected: 35 : /** 36 : * Transfer callback that will transfer residuals with given tags from the 37 : * subapplication. 38 : */ 39 : virtual void execute() override; 40 : 41 : private: 42 : /** 43 : * Adds the variable-residuals to the trainer. 44 : */ 45 : void transferResidual(dof_id_type base_i, dof_id_type multi_app_i); 46 : };