https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CoupledPressureBC.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 "CoupledPressureBC.h"
11#include "PressureAction.h"
12
14
15registerMoosePressureAction("SolidMechanicsApp", CoupledPressureBC, CoupledPressureAction);
16
17template <bool is_ad>
20{
23 "Applies a pressure from a variable on a given boundary in a given direction");
24 params += actionParams();
25 return params;
26}
27
28template <bool is_ad>
31{
33 params.addRequiredCoupledVar("pressure", "Coupled variable containing the pressure");
34 return params;
35}
36
37template <bool is_ad>
39 : PressureParent<is_ad>(parameters),
40 _pressure(this->template coupledGenericValue<is_ad>("pressure"))
41{
42}
43
44template <bool is_ad>
47{
48 return _pressure[_qp];
49}
50
51template class CoupledPressureBCTempl<true>;
registerMoosePressureAction("SolidMechanicsApp", CoupledPressureBC, CoupledPressureAction)
registerMooseObject("SolidMechanicsApp", CoupledPressureBC)
Moose::GenericType< Real, is_ad > GenericReal
typename std::conditional< is_ad, ADPressureBase, PressureBase >::type PressureParent
Pressure boundary condition using coupled variable to apply pressure in a given direction.
static InputParameters validParams()
virtual GenericReal< is_ad > computePressure() const override
CoupledPressureBCTempl(const InputParameters &parameters)
static InputParameters actionParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)