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 : #include "MultiApp.h" 13 : 14 : class Executioner; 15 : 16 : /** 17 : * This type of MultiApp will do a full solve when it is asked to take a step. 18 : */ 19 : class FullSolveMultiApp : public MultiApp 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : 24 : FullSolveMultiApp(const InputParameters & parameters); 25 : 26 : virtual void initialSetup() override; 27 : 28 : virtual bool solveStep(Real dt, Real target_time, bool auto_advance = true) override; 29 : 30 1580 : virtual void finalize() override 31 : { 32 : // executioner output on final has been called and we do not need to call it again 33 1580 : } 34 1599 : virtual void postExecute() override 35 : { 36 : // executioner postExecute has been called and we do not need to call it again 37 1599 : } 38 : 39 : virtual void restore(bool force = true) override; 40 : 41 : protected: 42 : /** 43 : * This function is called after each sub-application solve and is meant to display 44 : * information about the solve. It can be overridden. In this class, it simply 45 : * displays whether or not the sub-application solve was successful. 46 : * 47 : * @param i Sub-application index 48 : */ 49 : virtual void showStatusMessage(unsigned int i) const; 50 : 51 : private: 52 : /// Switch to tell executioner to keep going despite app solve not converging 53 : const bool _ignore_diverge; 54 : 55 : std::vector<Executioner *> _executioners; 56 : };