Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
BoundsBase.h
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 #pragma once
11 
12 #include "AuxKernel.h"
17 class BoundsBase : public AuxKernel
18 {
19 public:
21 
22  enum BoundType
23  {
26  };
27 
29 
30 protected:
31  virtual void initialSetup() override final;
32  virtual Real computeValue() override final;
33 
37  virtual Real getBound() = 0;
38 
41 
43  NumericVector<Number> & _bounded_vector;
44 
47 
49  NonlinearVariableName _bounded_var_name;
50 
53 
54 private:
56  dof_id_type getDoFIndex() const;
57 };
Class for stuff related to variables.
Definition: Adaptivity.h:31
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class provides an interface for common operations on field variables of both FE and FV types wit...
NonlinearVariableName _bounded_var_name
Name of MOOSE variable we set the bound for.
Definition: BoundsBase.h:49
dof_id_type getDoFIndex() const
Return the current DOF index to apply the bound on.
Definition: BoundsBase.C:76
MooseVariableFE< Real > * _fe_var
Pointer to the finite element variable we set the bound for. Will be null for finite volume...
Definition: BoundsBase.h:52
NumericVector< Number > & _bounded_vector
Reference to the bounded vector of nonlinear system.
Definition: BoundsBase.h:43
MooseVariableFieldBase & _bounded_var
MOOSE variable (base class) we set the bound for.
Definition: BoundsBase.h:46
static InputParameters validParams()
Definition: BoundsBase.C:16
virtual Real computeValue() override final
Compute and return the value of the aux variable.
Definition: BoundsBase.C:62
BoundsBase(const InputParameters &parameters)
Definition: BoundsBase.C:29
virtual Real getBound()=0
Method to get bound value for a variable.
BoundType _type
The bound type ("upper" or "lower")
Definition: BoundsBase.h:40
const InputParameters & parameters() const
Get the parameters of the object.
This is a base class used to set an upper and/or lower bound of a variable for the PETSc&#39;s variationa...
Definition: BoundsBase.h:17
Real Number
virtual void initialSetup() override final
Gets called at the beginning of the simulation before this object is asked to do its job...
Definition: BoundsBase.C:54
uint8_t dof_id_type