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 const auto & fe_type = mooseVariableBase()->feType();
25 if (fe_type.order != CONSTANT || fe_type.family != MONOMIAL)
26 paramError("variable", "Must be of type CONSTANT MONOMIAL");
27 if (fe_type.p_refinement && _subproblem.doingPRefinement())
28 paramError("variable",
29 "p_refinement can push the MONOMIAL order above CONSTANT, which is not supported");
30}
31
32Real
37
38void
registerMooseObject("MooseApp", VolumeAux)
SubProblem & _subproblem
Subproblem this kernel is part of.
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
const libMesh::FEType & feType() const
Get the type of finite element object.
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.
bool doingPRefinement() const
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:33
void compute() override final
Computes the value and stores it in the solution vector.
Definition VolumeAux.C:39
VolumeAux(const InputParameters &parameters)
Definition VolumeAux.C:22