https://mooseframework.inl.gov
ParsedChainControl.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 #include "ChainControl.h"
14 
16 
21 {
22 public:
24 
26 
27  virtual void init() override;
28  virtual void execute() override;
29 
30 protected:
34  void buildFunction();
35 
37  const std::string _function_expression;
41  std::unique_ptr<ChainControlParsedFunctionWrapper> _function_ptr;
43  const Point _point;
44 };
ParsedChainControl(const InputParameters &parameters)
const std::string _function_expression
Function expression to parse and evaluate.
static InputParameters validParams()
Adds user facing parameters for parsed function.
virtual void init() override
Initialization that occurs in ChainControlSetupAction, right before the dependencies are added...
std::unique_ptr< ChainControlParsedFunctionWrapper > _function_ptr
Pointer to the Parsed chain control function.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const Point _point
Spatial point at which to evaluate the function.
Parses and evaluates a function expression to populate a control value.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void execute() override
Execute the control.
const InputParameters & parameters() const
Get the parameters of the object.
void buildFunction()
Builds the function that will be evaluated by this control.
Real & _value
Control value to populate.
Wraps libMesh::ParsedFunction for use in ChainControls.
Control that additionally provides the capability to produce/consume data values, to allow control op...
Definition: ChainControl.h:21