Line data Source code
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 : #include "PostprocessorNeumannBC.h" 11 : 12 : registerMooseObject("MooseApp", PostprocessorNeumannBC); 13 : 14 : InputParameters 15 14365 : PostprocessorNeumannBC::validParams() 16 : { 17 14365 : InputParameters params = IntegratedBC::validParams(); 18 14365 : params.addClassDescription( 19 : "Neumann boundary condition with value prescribed by a Postprocessor value."); 20 43095 : params.addParam<PostprocessorName>( 21 28730 : "postprocessor", 0.0, "The postprocessor to use for value of the gradient on the boundary."); 22 14365 : return params; 23 0 : } 24 : 25 52 : PostprocessorNeumannBC::PostprocessorNeumannBC(const InputParameters & parameters) 26 52 : : IntegratedBC(parameters), _value(getPostprocessorValue("postprocessor")) 27 : { 28 52 : } 29 : 30 : Real 31 19840 : PostprocessorNeumannBC::computeQpResidual() 32 : { 33 19840 : return -_test[_i][_qp] * _value; 34 : }