https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
27
28Real
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
44Real
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}
registerMooseObject("PhaseFieldApp", InterfaceDiffusionBoundaryTerm)
void addClassDescription(const std::string &doc_string)
Base class for Diffusion equation terms coupling two different variables across a subdomain boundary.
static InputParameters validParams()
const Real _D_neighbor
neighbor diffusion coefficient
const Real _D
diffusion coefficient
Add weak form surface terms of the Diffusion equation for two different variables across a subdomain ...
InterfaceDiffusionBoundaryTerm(const InputParameters &parameters)
virtual Real computeQpResidual(Moose::DGResidualType type) override
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
const TemplateVariablePhiGradient & _grad_phi_neighbor
const TemplateVariableGradient & _grad_u
const TemplateVariablePhiGradient & _grad_phi
const TemplateVariableGradient & _grad_neighbor_value
const TemplateVariableTestValue & _test_neighbor
const MooseArray< Point > & _normals
const TemplateVariableTestValue & _test
const std::string & type() const
void mooseError(Args &&... args) const
DGResidualType
DGJacobianType
NeighborNeighbor
ElementElement
NeighborElement
ElementNeighbor