44#include "Teuchos_Assert.hpp"
45#include "Teuchos_ParameterList.hpp"
52panzer::buildBCs(std::vector<panzer::BC>& bcs,
const Teuchos::ParameterList& p,
const Teuchos::RCP<panzer::GlobalData> global_data)
54 using Teuchos::ParameterList;
59 TEUCHOS_TEST_FOR_EXCEPTION(p.isParameter(
"Number of Boundary Conditions"),
61 "Error - the parameter \"Number of Boundary Conditions\" is no longer valid for the boundary condition sublist. Please remove this from your input file!");
63 std::size_t bc_index = 0;
64 for (ParameterList::ConstIterator bc_pl=p.begin(); bc_pl != p.end(); ++bc_pl,++bc_index) {
65 TEUCHOS_TEST_FOR_EXCEPTION( !(bc_pl->second.isList()), std::logic_error,
66 "Error - All objects in the boundary condition sublist must be BC sublists!" );
67 ParameterList& sublist = Teuchos::getValue<Teuchos::ParameterList>(bc_pl->second);
79 std::string sideset_id,
80 std::string element_block_id,
81 std::string eq_set_name,
96 std::string sideset_id,
97 std::string element_block_id,
98 std::string eq_set_name,
100 const Teuchos::ParameterList& p) :
108 m_params = Teuchos::rcp(
new Teuchos::ParameterList(
""));
116 Teuchos::RCP<Teuchos::ParameterList>
params = Teuchos::parameterList();
122 std::string type =
params->get<std::string>(
"Type");
123 if (type ==
"Dirichlet")
125 else if (type ==
"Neumann")
127 else if (type ==
"Interface")
135 if (type ==
"Interface") {
143panzer::BC::BC(std::size_t bc_id,
const Teuchos::ParameterList& p,
const Teuchos::RCP<panzer::GlobalData> gd)
145 Teuchos::RCP<Teuchos::ParameterList>
params = Teuchos::parameterList();
153 std::string type =
params->get<std::string>(
"Type");
154 if (type ==
"Dirichlet")
156 else if (type ==
"Neumann")
158 else if (type ==
"Interface")
166 if (type ==
"Interface") {
249Teuchos::RCP<Teuchos::ParameterList>
259 std::ostringstream os;
260 os <<
"BC(" <<
bcID() <<
")";
270 os <<
"panzer::BC" << endl;
272 os <<
" BC ID = " <<
m_bc_id << endl;
284 os <<
" Type = " << type << endl;
285 os <<
" Identifier = " <<
identifier() << endl;
305 Teuchos::ParameterList valid_params;
307 valid_params.set<std::string>(
"Type",
"Dirichlet");
308 valid_params.set<std::string>(
"Sideset ID",
"???");
309 valid_params.set<std::string>(
"Element Block ID",
"???");
310 valid_params.set<std::string>(
"Element Block ID2",
"???");
311 valid_params.set<std::string>(
"Equation Set Name",
"???");
312 valid_params.set<std::string>(
"Equation Set Name2",
"???");
313 valid_params.set<std::string>(
"Strategy",
"???");
314 valid_params.sublist(
"Data").disableRecursiveValidation();
316 p.validateParametersAndSetDefaults(valid_params);
Stores input information for a boundary condition.
Teuchos::RCP< panzer::GlobalData > m_gd
void buildBCs(std::vector< panzer::BC > &bcs, const Teuchos::ParameterList &p, const Teuchos::RCP< panzer::GlobalData > global_data)
Nonmember constructor to build BC objects from a ParameterList.
Teuchos::RCP< Teuchos::ParameterList > nonconstParams() const
Returns a nonconst parameter list with user defined parameters for bc. Nonconst is meant to be used f...
std::string m_equation_set_name
std::string sidesetID() const
Returns the set id.
std::string m_element_block_id2
std::size_t bcID() const
Returns a unique identifier for this bc - needed for unique parameter setting in LOCA and for map key...
Teuchos::RCP< const Teuchos::ParameterList > params() const
Returns a parameter list with user defined parameters for bc.
void print(std::ostream &os) const
Print object using an ostream.
BCType bcType() const
Returns the boundary condition type (Dirichlet or Neumann or Interface).
std::string m_element_block_id
std::string elementBlockID() const
Returns the element block id associated with this sideset.
std::string m_equation_set_name2
Teuchos::RCP< panzer::GlobalData > global_data() const
Returns the RCP to the global data.
std::string elementBlockID2() const
Returns the second element block id associated with this sideset.
std::string equationSetName2() const
Returns the second unknown name/keyword.
std::string identifier() const
A unique string identifier for this boundary condition.
void validateParameters(Teuchos::ParameterList &p) const
Teuchos::RCP< Teuchos::ParameterList > m_params
std::string strategy() const
Returns the keyword used to construct a bc strategy.
std::string equationSetName() const
Returns the unknown name/keyword.
BC(std::size_t bc_id, BCType bc_type, std::string sideset_id, std::string element_block_id, std::string equation_set_name, std::string strategy)
Ctor.
std::ostream & operator<<(std::ostream &os, const AssemblyEngineInArgs &in)
WorksetDescriptor bcDescriptor(const panzer::BC &bc)
BCType
Type of boundary condition.