https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VolumeAux.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 "VolumeAux.h"
11
13
16{
18 params.addClassDescription("Auxiliary Kernel that samples volumes.");
19 return params;
20}
21
22VolumeAux::VolumeAux(const InputParameters & parameters) : AuxKernel(parameters)
23{
24 if (mooseVariableBase()->feType() != libMesh::FEType(CONSTANT, MONOMIAL))
25 paramError("variable", "Must be of type CONSTANT MONOMIAL");
26}
27
28Real
33
34void
registerMooseObject("MooseApp", VolumeAux)
const bool _bnd
true if the kernel is boundary kernel, false if it is interior kernels
const Real & _current_elem_volume
Volume of the current element.
Definition AuxKernel.h:138
const Real & _current_side_volume
Volume of the current side.
Definition AuxKernel.h:140
MooseVariableField< Real > & _var
This is a regular kernel so we cast to a regular MooseVariable, hides base _var.
Definition AuxKernel.h:113
static InputParameters validParams()
Definition AuxKernel.C:27
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
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:457
virtual void setDofValue(const DofValue &value, unsigned int index)=0
Degree of freedom value setters.
MooseVariableBase * mooseVariableBase() const
Get the variable that this object is using.
AuxKernel that samples element volumes.
Definition VolumeAux.h:18
static InputParameters validParams()
Definition VolumeAux.C:15
Real computeValue() override final
Compute and return the value of the aux variable.
Definition VolumeAux.C:29
void compute() override final
Computes the value and stores it in the solution vector.
Definition VolumeAux.C:35
VolumeAux(const InputParameters &parameters)
Definition VolumeAux.C:22