https://mooseframework.inl.gov
THMSolvePostprocessorControl.C
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 
11 
12 registerMooseObject("ThermalHydraulicsApp", THMSolvePostprocessorControl);
13 
16 {
18  params.addRequiredParam<PostprocessorName>(
19  "postprocessor", "The name of the postprocessot that indicates is a solve should be done.");
20  params.addClassDescription("Control the solve based on a postprocessor value");
21  return params;
22 }
23 
25  : THMControl(parameters), _solve_pps(getPostprocessorValue("postprocessor"))
26 {
27 }
28 
29 void
31 {
32  setControllableValueByName<bool>("Problem::" + _fe_problem.name(), "solve", _solve_pps != 0.);
33 }
Control the solve based on a postprocessor value.
THMSolvePostprocessorControl(const InputParameters &parameters)
registerMooseObject("ThermalHydraulicsApp", THMSolvePostprocessorControl)
virtual const std::string & name() const
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition: THMControl.C:13
FEProblemBase & _fe_problem
const PostprocessorValue & _solve_pps
The postprocessor that determines if the solve should be done or not.
void addClassDescription(const std::string &doc_string)