https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FunctionGradientNeumannBC.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#include "Function.h"
12
14
17{
19 params.addRequiredParam<FunctionName>("exact_solution", "The exact solution.");
20 params.addParam<Real>("coeff", 1, "The diffusion, thermal conductivity, etc. coefficient");
21 params.addClassDescription("Imposes the integrated boundary condition "
22 "arising from integration by parts of a diffusion/heat conduction "
23 "operator, and where the exact solution can be specified.");
24 return params;
25}
26
28 : IntegratedBC(parameters),
29 _exact_solution(getFunction("exact_solution")),
30 _coeff(getParam<Real>("coeff"))
31{
32}
33
34Real
registerMooseObject("MooseApp", FunctionGradientNeumannBC)
Boundary condition of a Neumann style whose value is computed by a user-defined function.
FunctionGradientNeumannBC(const InputParameters &parameters)
virtual Real computeQpResidual() override
Method for computing the residual at quadrature points.
const Function & _exact_solution
The function being used for setting the value.
static InputParameters validParams()
virtual RealGradient gradient(Real t, const Point &p) const
Function objects can optionally provide a gradient at a point.
Definition Function.C:62
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
unsigned int _qp
quadrature point index
unsigned int _i
i-th, j-th index for enumerating test and shape functions
const MooseArray< Point > & _q_point
active quadrature points
Base class for deriving any boundary condition of a integrated type.
static InputParameters validParams()
const MooseArray< Point > & _normals
normals at quadrature points
const VariableTestValue & _test
test function values (in QPs)