https://mooseframework.inl.gov
PhysicsComponentInterface.h
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 #pragma once
11 
12 #include "PhysicsBase.h"
13 #include "MooseTypes.h"
15 
19 class PhysicsComponentInterface : virtual public PhysicsBase
20 {
21 public:
23 
25 
29  virtual void addComponent(const ActionComponent & component) override;
30 
37  void addInitialCondition(const ComponentName & component_name,
38  const VariableName & var_name,
39  const MooseFunctorName & ic_value);
40 
50  void
51  addBoundaryCondition(const ComponentName & component_name,
52  const VariableName & var_name,
53  const BoundaryName & boundary_name,
54  const MooseFunctorName & bc_value,
56 
57 protected:
58  // TODO: add hash constructor to ComponentName to be able to use it as a key
60  std::map<std::string, std::map<VariableName, MooseFunctorName>> _components_initial_conditions;
62  std::map<std::string,
63  std::map<std::pair<VariableName, BoundaryName>,
64  std::pair<MooseFunctorName,
67 
68 private:
69  virtual void actOnAdditionalTasks() override;
70 
71  // The default implementation of these routines will error if the Components have passed
72  // information to the Physics, and the Physics has not implemented the expected behavior
75 };
virtual void addComponent(const ActionComponent &component) override
Adds various info from the component.
static InputParameters validParams()
PhysicsComponentInterface(const InputParameters &parameters)
Base class to help creating an entire physics.
Definition: PhysicsBase.h:30
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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.
void addInitialCondition(const ComponentName &component_name, const VariableName &var_name, const MooseFunctorName &ic_value)
Add an initial condition from a component.
Interface class to help components interact with Physics.
virtual void actOnAdditionalTasks() override
Routine to add additional setup work on additional registered tasks to a Physics. ...
virtual void addInitialConditionsFromComponents()
const InputParameters & parameters() const
Get the parameters of the object.