https://mooseframework.inl.gov
CommonOutputAction.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
13 #include "Action.h"
14 #include "ReporterName.h"
15 
16 #include <optional>
17 
25 class CommonOutputAction : public Action
26 {
27 public:
29 
30  CommonOutputAction(const InputParameters & params);
31 
32  virtual void act() override;
33 
42  const std::vector<ReporterName> & getCommonReporterNames() const
43  {
45  }
46 
48 
49 private:
58  void create(const std::string & object_type,
59  const std::optional<std::string> & param_name,
60  const InputParameters * const from_params = nullptr,
61  const InputParameters * const apply_params = nullptr,
62  const std::optional<std::string> & object_name = {});
63 
68  bool hasConsole();
69 
72 
74  std::vector<ReporterName> _common_reporter_names;
75 };
InputParameters _action_params
Parameters from the action being created (AddOutputAction)
void create(const std::string &object_type, const std::optional< std::string > &param_name, const InputParameters *const from_params=nullptr, const InputParameters *const apply_params=nullptr, const std::optional< std::string > &object_name={})
Helper method for creating the short-cut actions.
bool hasConsole()
Check if a Console object that outputs to the screen has been defined.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
CommonOutputAction(const InputParameters &params)
Base class for actions.
Definition: Action.h:33
static InputParameters validParams()
std::vector< ReporterName > _common_reporter_names
The reporter names that we do not want to include in general JSON output.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
static const ReporterName perf_graph_json_reporter
const std::vector< ReporterName > & getCommonReporterNames() const
Get the specific reporter names that we do not want to include in general JSON output.
The Reporter system is comprised of objects that can contain any number of data values.
Definition: ReporterName.h:30
Meta-action for creating common output object parameters This action serves two purpose, first it adds common output object parameters.