https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AdvancedOutputUtils.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// MOOSE includes
11#include "AdvancedOutputUtils.h"
12#include "Output.h"
13#include "InputParameters.h"
14
15void
17{
18 available.clear();
19 show.clear();
20 hide.clear();
21 output.clear();
22}
23
24// Constructor of OutputOnWarehouse; initializes the MultiMooseEnums for all available output types
26 const InputParameters & parameters)
28{
29 // Initialize each of the 'execute_on' settings for the various types of outputs
30 if (parameters.have_parameter<ExecFlagEnum>("execute_nodal_on"))
31 _map.insert(std::make_pair("nodal", execute_on));
32
33 if (parameters.have_parameter<ExecFlagEnum>("execute_elemental_on"))
34 _map.insert(std::make_pair("elemental", execute_on));
35
36 if (parameters.have_parameter<ExecFlagEnum>("execute_scalars_on"))
37 _map.insert(std::make_pair("scalars", execute_on));
38
39 if (parameters.have_parameter<ExecFlagEnum>("execute_postprocessors_on"))
40 _map.insert(std::make_pair("postprocessors", execute_on));
41
42 if (parameters.have_parameter<ExecFlagEnum>("execute_vector_postprocessors_on"))
43 _map.insert(std::make_pair("vector_postprocessors", execute_on));
44
45 if (parameters.have_parameter<ExecFlagEnum>("execute_reporters_on"))
46 _map.insert(std::make_pair("reporters", execute_on));
47
48 if (parameters.have_parameter<ExecFlagEnum>("execute_input_on"))
49 _map.insert(std::make_pair("input", MooseUtils::getDefaultExecFlagEnum()));
50
51 if (parameters.have_parameter<ExecFlagEnum>("execute_system_information_on"))
52 {
54 flags = EXEC_INITIAL;
55 _map.insert(std::make_pair("system_information", flags));
56 }
57}
58
59// Constructor of OutputDataWarehouse; initializes the OutputData structures for 'variable' based
60// output types
62{
63 _map["nodal"] = OutputData();
64 _map["elemental"] = OutputData();
65 _map["scalars"] = OutputData();
66 _map["postprocessors"] = OutputData();
67 _map["vector_postprocessors"] = OutputData();
68 _map["reporters"] = OutputData();
69}
70
71void
73{
74 for (auto map_pair : _map)
75 map_pair.second.reset();
76}
const ExecFlagType EXEC_INITIAL
Definition Moose.C:30
A MultiMooseEnum object to hold "execute_on" flags.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
void reset()
Clear existing lists for re-initialization.
OutputDataWarehouse()
Populate the OutputData structures for all output types that are 'variable' based.
In newer versions of Clang calling operator[] on a map with a component that has a default constructo...
std::map< std::string, ExecFlagEnum > _map
Data storage.
OutputOnWarehouse(const ExecFlagEnum &execute_on, const InputParameters &parameters)
Constructor.
ExecFlagEnum getDefaultExecFlagEnum()
Definition MooseUtils.C:972
A structure for storing the various lists that contain the names of the items to be exported.
std::set< std::string > show
User-supplied list of outputs to display.
std::set< std::string > available
A list of all possible outputs.
std::set< std::string > output
A list of the outputs to write.
void reset()
Clear existing sets for re-initialization.
std::set< std::string > hide
User-supplied list of outputs to hide.