https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
47void
49{
50 for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
52}
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition Coupleable.h:84
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const QBase *const & _qrule
void computeProperties() override
Performs the quadrature point loop, calling computeQpProperties.
static InputParameters validParams()
InterfaceMaterial(const InputParameters &parameters)
MaterialBases compute MaterialProperties.
virtual void computeQpProperties()
Users must override this method.
unsigned int _qp
static InputParameters validParams()
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
Enhances Coupleable interface to also couple the values from neighbor elements.
This interface is designed for DGKernel, InternalSideUserObject, InterfaceUserObject,...
MaterialDataType
MaterialData types.
Definition MooseTypes.h:746
@ INTERFACE_MATERIAL_DATA
Definition MooseTypes.h:751