https://mooseframework.inl.gov
InternalSideIndicator.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 "InternalSideIndicator.h"
11 
12 // MOOSE includes
13 #include "Assembly.h"
14 #include "MooseTypes.h"
15 #include "MooseVariableFE.h"
16 #include "Problem.h"
17 #include "SubProblem.h"
18 #include "SystemBase.h"
19 
20 #include "libmesh/dof_map.h"
21 #include "libmesh/dense_vector.h"
22 #include "libmesh/numeric_vector.h"
23 #include "libmesh/dense_subvector.h"
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/quadrature.h"
26 
27 template <typename ComputeValueType>
30 {
32  params.addRequiredParam<VariableName>(
33  "variable", "The name of the variable that this side indicator applies to");
34 
35  return params;
36 }
37 
38 template <typename ComputeValueType>
40  const InputParameters & parameters)
41  : InternalSideIndicatorBase(parameters),
42  NeighborMooseVariableInterface<ComputeValueType>(this,
43  false,
45  std::is_same<Real, ComputeValueType>::value
48  _var(this->mooseVariableField()),
49  _u(_var.sln()),
50  _grad_u(_var.gradSln()),
51  _u_neighbor(_var.slnNeighbor()),
52  _grad_u_neighbor(_var.gradSlnNeighbor())
53 {
55 }
56 
57 // Explicitly instantiate three versions of the InternalSideIndicatorTempl class
VarFieldType
Definition: MooseTypes.h:721
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
static InputParameters validParams()
Factory constructor initializes all internal references needed for indicator computation.
Enhances MooseVariableInterface interface provide values from neighbor elements.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
The InternalSideIndicator class is responsible for calculating the residuals for various physics on i...
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
static InputParameters validParams()
InternalSideIndicatorTempl(const InputParameters &parameters)
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseVariableField< ComputeValueType > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...