Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
ComponentBoundaryConditionInterface.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  {
34  };
35 
43  bool hasBoundaryCondition(const VariableName & variable) const;
51  bool hasBoundaryCondition(const VariableName & variable, const BoundaryName & boundary) const;
59  std::vector<BoundaryName> getBoundaryConditionBoundaries(const VariableName & variable) const;
70  MooseFunctorName getBoundaryCondition(const VariableName & variable,
71  const BoundaryName & boundary,
72  const std::string & requestor_name,
73  BoundaryConditionType & bc_type) const;
74 
75 protected:
76  virtual void checkIntegrity() override { checkBoundaryConditionsAllRequested(); }
77 
79  const std::vector<VariableName> _fixed_value_bc_variables;
81  const std::vector<VariableName> _flux_bc_variables;
82 
83  // TODO: make our custom string types hashable
84  // This would let us return the boundary condition functor name by reference too
85 
87  std::map<std::string, std::map<std::string, std::string>> _fixed_value_bcs;
89  std::map<std::string, std::map<std::string, std::string>> _flux_bcs;
90 
92  mutable std::set<std::pair<VariableName, BoundaryName>> _requested_bc_variables;
93 
94 private:
98 };
const std::vector< VariableName > _flux_bc_variables
Names of the variables to set a flux BC on.
MooseFunctorName getBoundaryCondition(const VariableName &variable, const BoundaryName &boundary, const std::string &requestor_name, BoundaryConditionType &bc_type) const
Get the name of the functor providing the boundary condition for the requested variable and boundary...
std::map< std::string, std::map< std::string, std::string > > _flux_bcs
Maps of the flux boundary conditions.
ComponentBoundaryConditionInterface(const InputParameters &params)
const std::vector< VariableName > _fixed_value_bc_variables
Names of the variables to set a fixed value BC on.
std::set< std::pair< VariableName, BoundaryName > > _requested_bc_variables
Requested variables. If the IC for a variable was never requested, error.
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::map< std::string, std::map< std::string, std::string > > _fixed_value_bcs
Maps of the fixed value boundary conditions.
virtual void checkIntegrity() override
Used for various checks notably:
bool hasBoundaryCondition(const VariableName &variable) const
Whether the component has a boundary condition parameter specified for the requested variable...
Helper class to help Components accept boundary condition parameters that the Physics may use to gene...
std::vector< BoundaryName > getBoundaryConditionBoundaries(const VariableName &variable) const
Get the name of the boundaries on which the variable should have a boundary condition.
void checkBoundaryConditionsAllRequested() const
Checks that all initial conditions were requested.