www.mooseframework.org
QuotientScalarAux.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "QuotientScalarAux.h"
16 
17 template <>
20 {
22  params.addCoupledVar("numerator", "The upstairs of the quotient variable");
23  params.addCoupledVar("denominator", "The downstairs of the quotient variable");
24 
25  return params;
26 }
27 
29  : AuxScalarKernel(parameters),
30  _a(coupledScalarValue("numerator")),
31  _b(coupledScalarValue("denominator"))
32 {
33 }
34 
35 Real
37 {
38  return _a[0] / _b[0];
39 }
VariableValue & _b
InputParameters validParams< QuotientScalarAux >()
virtual Real computeValue() override
Compute the value of this kernel.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Base class for making kernels that work on auxiliary scalar variables.
QuotientScalarAux(const InputParameters &parameters)
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
VariableValue & _a
InputParameters validParams< AuxScalarKernel >()