https://mooseframework.inl.gov
ComponentInitialConditionInterface.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 "ActionComponent.h"
13 #include "InputParameters.h"
14 #include "MooseTypes.h"
15 
24 {
25 public:
27 
29 
31  bool hasInitialCondition(const VariableName & variable) const;
33  const MooseFunctorName & getInitialCondition(const VariableName & variable,
34  const std::string & requestor_name) const;
35 
36 protected:
37  virtual void checkIntegrity() override { checkInitialConditionsAllRequested(); }
38 
40  const std::vector<VariableName> _initial_condition_variables;
42  const std::vector<MooseFunctorName> _variable_ic_functors;
44  mutable std::set<VariableName> _requested_ic_variables;
45 
46 private:
50 };
ComponentInitialConditionInterface(const InputParameters &params)
const std::vector< MooseFunctorName > _variable_ic_functors
Functor values for the initial conditions of the variables.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Base class for components that are defined using an action.
std::set< VariableName > _requested_ic_variables
Requested variables. If the IC for a variable was never requested, error.
bool hasInitialCondition(const VariableName &variable) const
Whether the component has an initial condition parameter set for the requested variable.
virtual void checkIntegrity() override
Used for various checks notably:
const std::vector< VariableName > _initial_condition_variables
Names of the variables to set an initial condition on.
const MooseFunctorName & getInitialCondition(const VariableName &variable, const std::string &requestor_name) const
Get the name of the functor providing the initial condition for the requested variable.
Helper class to help Components define the initial conditions the Physics may need from the parameter...
void checkInitialConditionsAllRequested() const
Checks that all initial conditions were requested.