https://mooseframework.inl.gov
InterfaceDiffusionFluxMatch.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 
13 
16 {
18  params.addClassDescription(
19  "Enforce flux continuity between two different variables across a subdomain boundary");
20  return params;
21 }
22 
24  : InterfaceDiffusionBase(parameters)
25 {
26 }
27 
28 Real
30 {
31  // equal gradients means difference is zero
32  Real res =
34 
35  switch (type)
36  {
37  case Moose::Element:
38  return res * _test[_i][_qp];
39 
40  case Moose::Neighbor:
41  return res * _test_neighbor[_i][_qp];
42  }
43 
44  mooseError("Internal error.");
45 }
46 
47 Real
49 {
50  switch (type)
51  {
53  return _D * _grad_phi[_j][_qp] * _normals[_qp] * _test[_i][_qp];
54 
57 
60 
62  return _D * _grad_phi[_j][_qp] * _normals[_qp] * _test_neighbor[_i][_qp];
63  }
64  mooseError("Internal error.");
65 }
NeighborElement
static InputParameters validParams()
const MooseArray< Point > & _normals
DGResidualType
const Real _D_neighbor
neighbor diffusion coefficient
ElementElement
Base class for Diffusion equation terms coupling two different variables across a subdomain boundary...
ElementNeighbor
const std::string & type() const
Enforce gradient continuity between two different variables across a subdomain boundary.
const TemplateVariableTestValue & _test
const TemplateVariablePhiGradient & _grad_phi_neighbor
DGJacobianType
const TemplateVariableGradient & _grad_u
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
const TemplateVariablePhiGradient & _grad_phi
registerMooseObject("PhaseFieldApp", InterfaceDiffusionFluxMatch)
const TemplateVariableTestValue & _test_neighbor
virtual Real computeQpResidual(Moose::DGResidualType type) override
NeighborNeighbor
const Real _D
diffusion coefficient
InterfaceDiffusionFluxMatch(const InputParameters &parameters)
const TemplateVariableGradient & _grad_neighbor_value