44 if (
const auto comp_ic = dynamic_cast<const ComponentInitialConditionInterface *>(&comp))
47 if (comp_ic->hasInitialCondition(var_name))
50 if (comp_ic->hasInitialCondition(var_name))
55 if (
const auto comp_bc = dynamic_cast<const ComponentBoundaryConditionInterface *>(&comp))
58 if (comp_bc->hasBoundaryCondition(var_name))
59 for (
const auto & boundary : comp_bc->getBoundaryConditionBoundaries(var_name))
62 const auto boundary_functor =
63 comp_bc->getBoundaryCondition(var_name, boundary,
name(), bc_type);
67 if (comp_bc->hasBoundaryCondition(var_name))
68 for (
const auto & boundary : comp_bc->getBoundaryConditionBoundaries(var_name))
71 const auto boundary_functor =
72 comp_bc->getBoundaryCondition(var_name, boundary,
name(), bc_type);
80 const VariableName & var_name,
81 const MooseFunctorName & ic_value)
88 const ComponentName & component_name,
89 const VariableName & var_name,
90 const BoundaryName & boundary_name,
91 const MooseFunctorName & bc_value,
95 std::make_pair(bc_value, bc_type);
105 all_components.push_back(comp.first);
108 "' requested to add the following initial conditions for this Physics. This Physics " 109 "however does not implement the 'addInitialConditionsFromComponents' " 110 "routine, so it cannot create these initial conditions");
121 all_components.push_back(comp.first);
124 "' requested to add boundary conditions for the variable of this Physics. This " 125 "Physics however does not implement the 'addBoundaryConditionsFromComponents' " 126 "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.
void addRequiredPhysicsTask(const std::string &task)
Add a new required task for all physics deriving from this class NOTE: This does not register the tas...
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.
virtual const std::string & name() const
Get the name of the class.
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.
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.