Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
InterfaceMaterial.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 // MOOSE includes
11 #include "InterfaceMaterial.h"
12 
15 {
16 
19  params.set<bool>("_interface") = true;
20  params.set<Moose::MaterialDataType>("_material_data_type") = Moose::INTERFACE_MATERIAL_DATA;
21 
22  // Interface materials always need one layer of ghosting to be safe
23  params.addRelationshipManager("ElementSideNeighborLayers",
26  return params;
27 }
28 
30  : MaterialBase(parameters),
31  NeighborCoupleable(this, false, false),
32  TwoMaterialPropertyInterface(this, blockIDs(), boundaryIDs()),
33  _q_point(_assembly.qPointsFace()),
34  _qrule(_assembly.qRuleFace()),
35  _JxW(_assembly.JxWFace()),
36  _current_elem(_assembly.elem()),
37  _neighbor_elem(_assembly.neighbor()),
38  _current_side(_assembly.side()),
39  _neighbor_side(_assembly.neighborSide())
40 {
41  // Fill in the MooseVariable dependencies
42  const std::vector<MooseVariableFEBase *> & coupled_vars = getCoupledMooseVars();
43  for (const auto & var : coupled_vars)
45 }
46 
47 void
49 {
50  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
52 }
void computeProperties() override
Performs the quadrature point loop, calling computeQpProperties.
virtual void computeQpProperties()
Users must override this method.
Definition: MaterialBase.C:213
static InputParameters validParams()
static InputParameters validParams()
Definition: MaterialBase.C:21
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:685
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
unsigned int _qp
Definition: MaterialBase.h:320
InterfaceMaterial(const InputParameters &parameters)
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition: Coupleable.h:70
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
const QBase *const & _qrule
This interface is designed for DGKernel, InternalSideUserObject, InterfaceUserObject, where material properties on a side of both its primary side (face) and its secondary side (neighbor) all required.
MaterialBases compute MaterialProperties.
Definition: MaterialBase.h:62
Enhances Coupleable interface to also couple the values from neighbor elements.