www.mooseframework.org
InternalSideUserObject.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "InternalSideUserObject.h"
11 #include "Assembly.h"
12 
13 template <>
16 {
21 
22  // Need one layer of ghosting
23  params.addRelationshipManager("ElementSideNeighborLayers",
26 
27  return params;
28 }
29 
31  : UserObject(parameters),
32  BlockRestrictable(this),
34  NeighborCoupleable(this, false, false),
36  UserObjectInterface(this),
37  TransientInterface(this),
39  _mesh(_subproblem.mesh()),
40  _q_point(_assembly.qPointsFace()),
41  _qrule(_assembly.qRuleFace()),
42  _JxW(_assembly.JxWFace()),
43  _coord(_assembly.coordTransformation()),
44  _normals(_assembly.normals()),
45  _current_elem(_assembly.elem()),
46  _current_side(_assembly.side()),
47  _current_side_elem(_assembly.sideElem()),
48  _current_side_volume(_assembly.sideElemVolume()),
49  _neighbor_elem(_assembly.neighbor())
50 {
51  // Keep track of which variables are coupled so we know what we depend on
52  const std::vector<MooseVariableFEBase *> & coupled_vars = getCoupledMooseVars();
53  for (const auto & var : coupled_vars)
55 }
56 
57 const Real &
59 {
60  return _assembly.neighborVolume();
61 }
const Real & getNeighborElemVolume()
The volume (or length) of the current neighbor.
Assembly & _assembly
Definition: UserObject.h:145
InputParameters validParams< BlockRestrictable >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRelationshipManager(const std::string &name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback input_parameter_callback=nullptr)
Tells MOOSE about a RelationshipManager that this object needs.
void addMooseVariableDependency(MooseVariableFEBase *var)
Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on...
Interface for objects that needs transient capabilities.
InputParameters validParams< InternalSideUserObject >()
InputParameters validParams< UserObject >()
Definition: UserObject.C:18
Interface for objects that need to use UserObjects.
InternalSideUserObject(const InputParameters &parameters)
const std::vector< MooseVariableFEBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition: Coupleable.h:90
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
Definition: MooseTypes.h:452
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
InputParameters validParams< TwoMaterialPropertyInterface >()
const Real & neighborVolume() const
Returns the reference to the current neighbor volume.
Definition: Assembly.C:480
Definition: Moose.h:112
InputParameters validParams< TransientInterface >()
Base class for user-specific data.
Definition: UserObject.h:37
Enhances Coupleable interface to also couple the values from neighbor elements.
Interface class for classes which interact with Postprocessors.