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"
12
13registerMooseObject("ThermalHydraulicsApp", THMProblem);
14
17{
19
20 params.addParam<bool>("2nd_order_mesh", false, "Use 2nd order elements in the mesh");
21
22 params.addParam<FileName>("initial_from_file",
23 "The name of an exodus file with initial conditions");
24 params.addParam<std::string>(
25 "initial_from_file_timestep",
26 "LATEST",
27 "Gives the timestep (or \"LATEST\") for which to read a solution from a file "
28 "for a given variable. (Default: LATEST)");
29
30 params.set<bool>("boundary_restricted_elem_integrity_check") = false;
31
32 params.addClassDescription("Specialization of FEProblem to run with component subsystem");
33
34 return params;
35}
36
38 : FEProblem(parameters), Simulation(*this, parameters)
39{
40}
41
42void
48
49void
55
56bool
57THMProblem::hasPostprocessor(const std::string & name) const
58{
60 return true;
61
62 // Sometimes we want to know if a Postprocessor exists well before Postprocessor objects
63 // are actually constructed (within check() in Components) in order to provide a better
64 // error than MOOSE (which checks for Postprocessor existence well after objects are added).
65 // Therefore, if we can't find that we have a Reporter value that represents the PP,
66 // this method might have been called before the add_postprocessor task that sets up the
67 // Reporter values for the postprocessors. Therefore, let's also see which Postprocessors
68 // are slated to be constructed in the future (via the AddPostprocessorAction actions,
69 // in which the names are the PP names themselves)
70 for (const auto & action : getMooseApp().actionWarehouse().getActions<AddPostprocessorAction>())
71 if (action->name() == name)
72 return true;
73
74 return false;
75}
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.
Specialization of FEProblem to run with component subsystem.
Definition THMProblem.h:19
virtual void copySolutionsBackwards() override
Definition THMProblem.C:50
virtual void advanceState() override
Definition THMProblem.C:43
static InputParameters validParams()
Definition THMProblem.C:16
virtual bool hasPostprocessor(const std::string &name) const
Check if a postprocessor with a given name exists in the simulation.
Definition THMProblem.C:57
THMProblem(const InputParameters &parameters)
Definition THMProblem.C:37