https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
20{
21public:
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
57protected:
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
68private:
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};
Base class for components that are defined using an action.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Base class to help creating an entire physics.
Definition PhysicsBase.h:31
Interface class to help components interact with Physics.
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()
void addInitialCondition(const ComponentName &component_name, const VariableName &var_name, const MooseFunctorName &ic_value)
Add an initial condition from a component.
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.