https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
27template <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
38template <typename ComputeValueType>
40 const InputParameters & parameters)
41 : InternalSideIndicatorBase(parameters),
42 NeighborMooseVariableInterface<ComputeValueType>(this,
43 false,
44 Moose::VarKindType::VAR_ANY,
45 std::is_same<Real, ComputeValueType>::value
46 ? Moose::VarFieldType::VAR_FIELD_STANDARD
47 : Moose::VarFieldType::VAR_FIELD_VECTOR),
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
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()
The InternalSideIndicator class is responsible for calculating the residuals for various physics on i...
InternalSideIndicatorTempl(const InputParameters &parameters)
static InputParameters validParams()
Factory constructor initializes all internal references needed for indicator computation.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
MooseVariableField< T > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
Enhances MooseVariableInterface interface provide values from neighbor elements.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...