19#define stringifyName(name) #name
20#define registerMoosePressureAction(appname, bc_class, action_class) \
21 action_class::action_class(const InputParameters & params) \
22 : PressureActionBase(params, stringifyName(bc_class), "AD" stringifyName(bc_class)) \
25 InputParameters action_class::validParams() \
27 auto params = PressureActionBase::validParams<bc_class>(); \
28 params.addClassDescription( \
29 "Set up pressure boundary condition using the " stringifyName(bc_class) " object."); \
32 registerMooseAction(appname, action_class, "add_bc")
34#define declareMoosePressureAction(bc_class, action_class) \
35 class action_class : public PressureActionBase \
38 action_class(const InputParameters & params); \
39 static InputParameters validParams(); \
54 const std::string & non_ad_pressure_bc_type,
55 const std::string & ad_pressure_bc_type);
57 virtual void act()
override;
75 params += T::actionParams();
77 params.
addParam<std::vector<BoundaryName>>(
78 "boundary",
"The list of boundaries (ids or names) from the mesh where this object applies");
81 params.
addParam<
bool>(
"use_automatic_differentiation",
83 "Flag to use automatic differentiation (AD) objects when possible");
89 "Set the enabled status of the BCs created by the Pressure action (defaults to true).");
93 params.
addParam<std::vector<AuxVariableName>>(
94 "save_in_disp_x", {},
"The save_in variables for x displacement");
95 params.
addParam<std::vector<AuxVariableName>>(
96 "save_in_disp_y", {},
"The save_in variables for y displacement");
97 params.
addParam<std::vector<AuxVariableName>>(
98 "save_in_disp_z", {},
"The save_in variables for z displacement");
99 params.
addParam<std::vector<TagName>>(
"extra_vector_tags",
100 "The extra tags for the vectors this Kernel should fill");
101 params.
addParam<std::vector<TagName>>(
102 "absolute_value_vector_tags",
103 "The tags for the vectors this residual object should fill with the "
104 "absolute value of the residual contribution");
107 "use_displaced_mesh",
108 "Whether or not this object should use the displaced mesh for computation. Note that in "
109 "the case this is true but no displacements are provided in the Mesh block the undisplaced "
110 "mesh will still be used. For small strain formulations pressure should be applied to the "
111 "undisplaced mesh to obtain agreement with analytical benchmark solutions.");
114 "save_in_disp_x save_in_disp_y save_in_disp_z extra_vector_tags absolute_value_vector_tags",
static InputParameters validParams()
Pressure boundary condition action template.
const bool _use_ad
Flag to use automatic differentiation.
const std::vector< std::vector< AuxVariableName > > _save_in_vars
static InputParameters validParams()
virtual void act() override
const std::string _non_ad_pressure_bc_type
const std::string _ad_pressure_bc_type
const std::vector< bool > _has_save_in_vars