https://mooseframework.inl.gov
Loading...
Searching...
No Matches
THMProblem.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
10#include "THMProblem.h"
13
14registerMooseObject("ThermalHydraulicsApp", THMProblem);
15
18{
20
21 params.addParam<bool>("2nd_order_mesh", false, "Use 2nd order elements in the mesh");
22
23 params.addParam<FileName>("initial_from_file",
24 "The name of an exodus file with initial conditions");
25 params.addParam<std::string>(
26 "initial_from_file_timestep",
27 "LATEST",
28 "Gives the timestep (or \"LATEST\") for which to read a solution from a file "
29 "for a given variable. (Default: LATEST)");
30 params.addParam<MooseEnum>(
31 "initial_from_file_weighting_type",
33 "The policy used to select a unique initial value when data imported from a file is "
34 "multivalued.");
35
36 params.set<bool>("boundary_restricted_elem_integrity_check") = false;
37
38 params.addClassDescription("Specialization of FEProblem to run with component subsystem");
39
40 return params;
41}
42
44 : FEProblem(parameters), Simulation(*this, parameters)
45{
46}
47
48void
54
55void
61
62bool
63THMProblem::hasPostprocessor(const std::string & name) const
64{
66 return true;
67
68 // Sometimes we want to know if a Postprocessor exists well before Postprocessor objects
69 // are actually constructed (within check() in Components) in order to provide a better
70 // error than MOOSE (which checks for Postprocessor existence well after objects are added).
71 // Therefore, if we can't find that we have a Reporter value that represents the PP,
72 // this method might have been called before the add_postprocessor task that sets up the
73 // Reporter values for the postprocessors. Therefore, let's also see which Postprocessors
74 // are slated to be constructed in the future (via the AddPostprocessorAction actions,
75 // in which the names are the PP names themselves)
76 for (const auto & action : getMooseApp().actionWarehouse().getActions<AddPostprocessorAction>())
77 if (action->name() == name)
78 return true;
79
80 return false;
81}
const std::string name
Definition Setup.h:21
registerMooseObject("ThermalHydraulicsApp", THMProblem)
std::vector< const T * > getActions()
ReporterData _reporter_data
virtual void advanceState()
virtual void copySolutionsBackwards()
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
ActionWarehouse & actionWarehouse()
const std::string & name() const
MooseApp & getMooseApp() const
bool hasReporterValue(const ReporterName &reporter_name) const
Main class for simulation (the driver of the simulation)
Definition Simulation.h:30
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep.
static MooseEnum weightingType()
Specialization of FEProblem to run with component subsystem.
Definition THMProblem.h:19
virtual void copySolutionsBackwards() override
Definition THMProblem.C:56
virtual void advanceState() override
Definition THMProblem.C:49
static InputParameters validParams()
Definition THMProblem.C:17
virtual bool hasPostprocessor(const std::string &name) const
Check if a postprocessor with a given name exists in the simulation.
Definition THMProblem.C:63
THMProblem(const InputParameters &parameters)
Definition THMProblem.C:43