https://mooseframework.inl.gov
ParsedScalarReporter.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 "ParsedScalarReporter.h"
11 
13 
16 {
18  params.suppressParameter<std::vector<std::string>>("vector_reporter_symbols");
19  params.addClassDescription("Applies parsed functions to scalar entries held in reporters.");
20  return params;
21 }
22 
24  : ParsedReporterBase(parameters),
25  _output_reporter(declareValueByName<Real>(getParam<std::string>("name"), REPORTER_MODE_ROOT))
26 {
27  if (!parameters.isParamValid("scalar_reporter_names"))
28  paramError("scalar_reporter_names", "Required parameter when using ParsedScalarReporter.");
29 }
30 
31 void
33 {
34  for (const auto i : index_range(_scalar_reporter_data))
36 
37  if (_use_t)
39 
41 }
GenericReal< is_ad > evaluate(SymFunctionPtr &, const std::string &object_name="")
Evaluate FParser object and check EvalError.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:439
registerMooseObject("MooseApp", ParsedScalarReporter)
const ReporterMode REPORTER_MODE_ROOT
std::vector< const Real * > _scalar_reporter_data
input scalar reporter vectors
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
Reporter containing operation between scalars from another Reporter.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
SymFunctionPtr _func_F
function parser object
void suppressParameter(const std::string &name)
This method suppresses an inherited parameter so that it isn&#39;t required or valid in the derived class...
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< GenericReal< is_ad > > _func_params
Array to stage the parameters passed to the functions when calling Eval.
const bool _use_t
whether time is part of the parsed expression
ParsedScalarReporter(const InputParameters &parameters)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
Reporter containing operation between vectors from another Reporter.
virtual void finalize() override
Finalize.
auto index_range(const T &sizable)
Real & _output_reporter
output scalar
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.