www.mooseframework.org
QuotientAux.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 "QuotientAux.h"
16 
17 template <>
20 {
22  params.addClassDescription("Divides two coupled variables.");
23  params.addCoupledVar("numerator", "The upstairs of the quotient variable");
24  params.addCoupledVar("denominator", "The downstairs of the quotient variable");
25  return params;
26 }
27 
29  : AuxKernel(parameters),
30  _numerator(coupledValue("numerator")),
31  _denominator(coupledValue("denominator"))
32 {
33 }
34 
35 Real
37 {
38  return _numerator[_qp] / _denominator[_qp];
39 }
const VariableValue & _numerator
Definition: QuotientAux.h:40
QuotientAux(const InputParameters &parameters)
Definition: QuotientAux.C:28
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const VariableValue & _denominator
Definition: QuotientAux.h:41
InputParameters validParams< AuxKernel >()
Definition: AuxKernel.C:30
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:192
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:51
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
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...
virtual Real computeValue() override
Definition: QuotientAux.C:36
InputParameters validParams< QuotientAux >()
Definition: QuotientAux.C:19