https://mooseframework.inl.gov
InterfaceDiffusionBoundaryTerm.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("Add weak form surface terms of the Diffusion equation for two "
19  "different variables across a subdomain boundary");
20  return params;
21 }
22 
24  : InterfaceDiffusionBase(parameters)
25 {
26 }
27 
28 Real
30 {
31  // add weak form surface terms for the diffusion equation
32  switch (type)
33  {
34  case Moose::Element:
35  return -_D * _grad_u[_qp] * _normals[_qp] * _test[_i][_qp];
36 
37  case Moose::Neighbor:
39  }
40 
41  mooseError("Internal error.");
42 }
43 
44 Real
46 {
47  switch (type)
48  {
50  return -_D * _grad_phi[_j][_qp] * _normals[_qp] * _test[_i][_qp];
51 
54 
56  return 0.0;
57 
59  return 0.0;
60  }
61 
62  mooseError("Internal error.");
63 }
NeighborElement
static InputParameters validParams()
registerMooseObject("PhaseFieldApp", InterfaceDiffusionBoundaryTerm)
virtual Real computeQpResidual(Moose::DGResidualType type) override
const MooseArray< Point > & _normals
DGResidualType
const Real _D_neighbor
neighbor diffusion coefficient
Add weak form surface terms of the Diffusion equation for two different variables across a subdomain ...
ElementElement
Base class for Diffusion equation terms coupling two different variables across a subdomain boundary...
InterfaceDiffusionBoundaryTerm(const InputParameters &parameters)
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
ElementNeighbor
const std::string & type() const
const TemplateVariableTestValue & _test
const TemplateVariablePhiGradient & _grad_phi_neighbor
DGJacobianType
const TemplateVariableGradient & _grad_u
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
const TemplateVariablePhiGradient & _grad_phi
const TemplateVariableTestValue & _test_neighbor
NeighborNeighbor
const Real _D
diffusion coefficient
const TemplateVariableGradient & _grad_neighbor_value