Loading [MathJax]/extensions/tex2jax.js
Cardinal
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
NekScalarValue.h
Go to the documentation of this file.
1/********************************************************************/
2/* SOFTWARE COPYRIGHT NOTIFICATION */
3/* Cardinal */
4/* */
5/* (c) 2021 UChicago Argonne, LLC */
6/* ALL RIGHTS RESERVED */
7/* */
8/* Prepared by UChicago Argonne, LLC */
9/* Under Contract No. DE-AC02-06CH11357 */
10/* With the U. S. Department of Energy */
11/* */
12/* Prepared by Battelle Energy Alliance, LLC */
13/* Under Contract No. DE-AC07-05ID14517 */
14/* With the U. S. Department of Energy */
15/* */
16/* See LICENSE for full restrictions */
17/********************************************************************/
18
19#pragma once
20
21#include "GeneralUserObject.h"
22
28class NekScalarValue : public GeneralUserObject
29{
30public:
31 static InputParameters validParams();
32
33 NekScalarValue(const InputParameters & parameters);
34
36 virtual void execute() override {}
37
38 virtual void initialize() override {}
39 virtual void finalize() override {}
40
42 virtual void setValue();
43
48 Real getValue() const;
49
50 virtual unsigned int usrwrkSlot() const { return _usrwrk_slot; }
51
52 virtual void setCounter(const unsigned int & counter) { _counter = counter; }
53
58 virtual const unsigned int & counter() const { return _counter; }
59
60protected:
62 const Real & _value;
63
65 const Real & _scaling;
66
68 unsigned int _usrwrk_slot;
69
71 unsigned int _counter;
72};
Definition NekScalarValue.h:29
unsigned int _usrwrk_slot
Slot in usrwrk to write the scalar value.
Definition NekScalarValue.h:68
unsigned int _counter
Counter of this object, to be set by NekRSProblem.
Definition NekScalarValue.h:71
virtual void setCounter(const unsigned int &counter)
Definition NekScalarValue.h:52
virtual void setValue()
Instead, we want to have a separate method that we can call from NekRSProblemBase.
virtual void execute() override
We don't want this user object to execute in MOOSE's control.
Definition NekScalarValue.h:36
Real getValue() const
virtual void finalize() override
Definition NekScalarValue.h:39
virtual void initialize() override
Definition NekScalarValue.h:38
const Real & _scaling
A multiplier to apply to 'value'.
Definition NekScalarValue.h:65
virtual unsigned int usrwrkSlot() const
Definition NekScalarValue.h:50
static InputParameters validParams()
NekScalarValue(const InputParameters &parameters)
const Real & _value
The value to send into NekRS.
Definition NekScalarValue.h:62
virtual const unsigned int & counter() const
Definition NekScalarValue.h:58