https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NodalNormalBC.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
10#include "NodalNormalBC.h"
11
14{
16 params.addCoupledVar("nx", "x-component of the normal");
17 params.addCoupledVar("ny", "y-component of the normal");
18 params.addCoupledVar("nz", "z-component of the normal");
19
20 params.set<std::vector<VariableName>>("nx") = {"nodal_normal_x"};
21 params.set<std::vector<VariableName>>("ny") = {"nodal_normal_y"};
22 params.set<std::vector<VariableName>>("nz") = {"nodal_normal_z"};
23
24 return params;
25}
26
28 : NodalBC(parameters), _nx(coupledValue("nx")), _ny(coupledValue("ny")), _nz(coupledValue("nz"))
29{
30}
31
32void
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
Base class for deriving any boundary condition that works at nodes.
Definition NodalBC.h:21
static InputParameters validParams()
Definition NodalBC.C:19
const unsigned int _qp
Pseudo-"quadrature point" index (Always zero for the current node)
Definition NodalBC.h:44
virtual Real computeQpResidual()=0
const VariableValue & _nz
const VariableValue & _ny
static InputParameters validParams()
const VariableValue & _nx
Point _normal
Normal at the node (it is pre-computed by user object subsystem)
virtual void computeResidual() override
Compute this object's contribution to the residual.
NodalNormalBC(const InputParameters &parameters)