49 if (comp_ic->hasInitialCondition(var_name))
52 if (comp_ic->hasInitialCondition(var_name))
60 if (comp_bc->hasBoundaryCondition(var_name))
61 for (
const auto & boundary : comp_bc->getBoundaryConditionBoundaries(var_name))
64 const auto boundary_functor =
65 comp_bc->getBoundaryCondition(var_name, boundary,
name(), bc_type);
69 if (comp_bc->hasBoundaryCondition(var_name))
70 for (
const auto & boundary : comp_bc->getBoundaryConditionBoundaries(var_name))
73 const auto boundary_functor =
74 comp_bc->getBoundaryCondition(var_name, boundary,
name(), bc_type);
82 const VariableName & var_name,
83 const MooseFunctorName & ic_value)
90 const ComponentName & component_name,
91 const VariableName & var_name,
92 const BoundaryName & boundary_name,
93 const MooseFunctorName & bc_value,
97 std::make_pair(bc_value, bc_type);
107 all_components.push_back(comp.first);
110 "' requested to add the following initial conditions for this Physics. This Physics "
111 "however does not implement the 'addInitialConditionsFromComponents' "
112 "routine, so it cannot create these initial conditions");
123 all_components.push_back(comp.first);
126 "' requested to add boundary conditions for the variable of this Physics. This "
127 "Physics however does not implement the 'addBoundaryConditionsFromComponents' "
128 "routine, so it cannot create these boundary conditions");
Base class for components that are defined using an action.
const std::string & _current_task
The current action (even though we have separate instances for each action)
Helper class to help Components accept boundary condition parameters that the Physics may use to gene...
Helper class to help Components define the initial conditions the Physics may need from the parameter...
const std::string & name() const
Get the name of the class.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Base class to help creating an entire physics.
const std::vector< VariableName > & auxVariableNames() const
Return the list of aux variables in this physics.
static InputParameters validParams()
const std::vector< VariableName > & solverVariableNames() const
Return the list of solver (nonlinear + linear) variables in this physics.
virtual void addComponent(const ActionComponent &component)
Most basic way of adding a component: simply adding the blocks to the block restriction of the Physic...
std::map< std::string, std::map< VariableName, MooseFunctorName > > _components_initial_conditions
Map of components to variables and initial conditions.
std::map< std::string, std::map< std::pair< VariableName, BoundaryName >, std::pair< MooseFunctorName, ComponentBoundaryConditionInterface::BoundaryConditionType > > > _components_boundary_conditions
Map of components to variables and boundary conditions.
virtual void addComponent(const ActionComponent &component) override
Adds various info from the component.
static InputParameters validParams()
virtual void addInitialConditionsFromComponents()
void addInitialCondition(const ComponentName &component_name, const VariableName &var_name, const MooseFunctorName &ic_value)
Add an initial condition from a component.
virtual void addBoundaryConditionsFromComponents()
void addBoundaryCondition(const ComponentName &component_name, const VariableName &var_name, const BoundaryName &boundary_name, const MooseFunctorName &bc_value, const ComponentBoundaryConditionInterface::BoundaryConditionType &bc_type)
Add a boundary condition from a component.
virtual void actOnAdditionalTasks() override
Routine to add additional setup work on additional registered tasks to a Physics.
PhysicsComponentInterface(const InputParameters ¶meters)
std::string stringify(const T &t)
conversion to string