https://mooseframework.inl.gov
PODFullSolveMultiApp.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 
12 // MOOSE includes
14 #include "PODReducedBasisTrainer.h"
15 #include "SamplerInterface.h"
17 
18 #include "StochasticToolsTypes.h"
19 
22 
24 {
25 public:
27 
29 
30  virtual bool solveStep(Real dt, Real target_time, bool auto_advance = true) override;
31 
34  virtual void preTransfer(Real dt, Real target_time) override;
35 
38 
39 protected:
41  std::vector<std::shared_ptr<PODSamplerSolutionTransfer>>
43 
45  std::vector<std::shared_ptr<PODResidualTransfer>>
47 
49  void computeResidual();
50 
52  void computeResidualBatch(Real target_time);
53 
56 
61 
62 private:
63 };
bool snapshotGeneration()
Returning the value of the snapshot generation flag.
std::vector< std::shared_ptr< PODResidualTransfer > > getActiveResidualTransfers(Transfer::DIRECTION direction)
Returning pointers to the solution transfers. Used in batch mode.
Transfer solutions from sub-applications to a container in a Trainer.
std::vector< std::shared_ptr< PODSamplerSolutionTransfer > > getActiveSolutionTransfers(Transfer::DIRECTION direction)
Returning pointers to the solution transfers. Used in batch mode.
virtual void preTransfer(Real dt, Real target_time) override
Overriding preTransfer to reinit the subappliations if the object needs to be executed twice...
Transfers residuals for given variables and vector tags from a sub-subapplication to a PODReducedBasi...
bool _snapshot_generation
Switch used to differentiate between snapshot generation and residual computation.
PODFullSolveMultiApp(const InputParameters &parameters)
static InputParameters validParams()
virtual bool solveStep(Real dt, Real target_time, bool auto_advance=true) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Interface for objects that need to use samplers.
PODReducedBasisTrainer & _trainer
Pointer to the trainer object itself.
const InputParameters & parameters() const
void computeResidualBatch(Real target_time)
Evaluating the residuals for every tag in the trainer in batch mode.
void computeResidual()
Evaluating the residuals for every tag in the trainer.