https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
26{
27public:
29
30 CommonOutputAction(const InputParameters & params);
31
32 virtual void act() override;
33
42 const std::vector<ReporterName> & getCommonReporterNames() const
43 {
45 }
46
47private:
56 void create(const std::string & object_type,
57 const std::optional<std::string> & param_name,
58 const InputParameters * const from_params = nullptr,
59 const InputParameters * const apply_params = nullptr,
60 const std::optional<std::string> & object_name = {});
61
66 bool hasConsole();
67
70
72 std::vector<ReporterName> _common_reporter_names;
73};
Base class for actions.
Definition Action.h:38
Meta-action for creating common output object parameters This action serves two purpose,...
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
InputParameters _action_params
Parameters from the action being created (AddOutputAction)
bool hasConsole()
Check if a Console object that outputs to the screen has been defined.
static InputParameters validParams()
std::vector< ReporterName > _common_reporter_names
The reporter names that we do not want to include in general JSON output.
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.
const std::vector< ReporterName > & getCommonReporterNames() const
Get the specific reporter names that we do not want to include in general JSON output.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.