46 if (
const auto comp_ic = dynamic_cast<const ComponentInitialConditionInterface *>(&comp))
49 if (comp_ic->hasInitialCondition(var_name))
52 if (comp_ic->hasInitialCondition(var_name))
57 if (
const auto comp_bc = dynamic_cast<const ComponentBoundaryConditionInterface *>(&comp))
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");
const std::vector< VariableName > & auxVariableNames() const
Return the list of aux variables in this physics.
virtual void addComponent(const ActionComponent &component) override
Adds various info from the component.
static InputParameters validParams()
PhysicsComponentInterface(const InputParameters ¶meters)
Base class to help creating an entire physics.
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 addBoundaryConditionsFromComponents()
Base class for components that are defined using an action.
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.
const std::string & name() const
Get the name of the class.
void addInitialCondition(const ComponentName &component_name, const VariableName &var_name, const MooseFunctorName &ic_value)
Add an initial condition from a component.
const std::string & _current_task
The current action (even though we have separate instances for each action)
std::string stringify(const T &t)
conversion to string
virtual void actOnAdditionalTasks() override
Routine to add additional setup work on additional registered tasks to a Physics. ...
const std::vector< VariableName > & solverVariableNames() const
Return the list of solver (nonlinear + linear) variables in this physics.
static InputParameters validParams()
virtual void addInitialConditionsFromComponents()
virtual void addComponent(const ActionComponent &component)
Most basic way of adding a component: simply adding the blocks to the block restriction of the Physic...
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...