43 #ifndef PANZER_CLOSURE_MODEL_FACTORY_COMPOSITE_IMPL_HPP
44 #define PANZER_CLOSURE_MODEL_FACTORY_COMPOSITE_IMPL_HPP
54 #include "Teuchos_StandardParameterEntryValidators.hpp"
59 template<
typename EvalT>
62 m_factories(factories)
66 template<
typename EvalT>
87 rcp(
new vector<
RCP<Evaluator<panzer::Traits> > > );
90 std::stringstream msg;
91 msg <<
"Falied to find requested model, \"" << model_id
92 <<
"\" for equation set:\n" << std::endl;
96 const ParameterList& my_model = models.
sublist(model_id);
101 for (ParameterList::ConstIterator model_it = models.
begin();
102 model_it != models.
end(); ++model_it) {
104 std::string key = model_it->first;
105 if(!model_it->second.isList())
106 nonlist_params.
setEntry(key,model_it->second);
111 ParameterList copy_of_my_model = nonlist_params;
112 copy_of_my_model.
sublist(model_id) = my_model;
117 (*factory)->getAsObject<EvalT>()->setThrowOnModelNotFound(
false);
119 (*factory)->getAsObject<EvalT>()->buildClosureModels(model_id,copy_of_my_model,fl,ir,default_params,user_data,global_data,fm);
121 if (tmp_evaluators->size() > 0) {
122 for (vector<
RCP<Evaluator<panzer::Traits> > >::const_iterator eval = tmp_evaluators->begin(); eval != tmp_evaluators->end(); ++eval)
123 evaluators->push_back(*eval);
const std::string & name() const
ConstIterator end() const
Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > buildClosureModels(const std::string &model_id, const Teuchos::ParameterList &models, const panzer::FieldLayoutLibrary &fl, const Teuchos::RCP< panzer::IntegrationRule > &ir, const Teuchos::ParameterList &default_params, const Teuchos::ParameterList &user_data, const Teuchos::RCP< panzer::GlobalData > &global_data, PHX::FieldManager< panzer::Traits > &fm) const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
ParameterList & setEntry(const std::string &name, const ParameterEntry &entry)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
bool isSublist(const std::string &name) const
ConstIterator begin() const
ParameterList & sublist(const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
ClosureModelFactoryComposite(const std::vector< Teuchos::RCP< panzer::ClosureModelFactory_TemplateManager< panzer::Traits > > > &factories)