11 #ifndef PANZER_CLOSURE_MODEL_FACTORY_COMPOSITE_IMPL_HPP
12 #define PANZER_CLOSURE_MODEL_FACTORY_COMPOSITE_IMPL_HPP
22 #include "Teuchos_StandardParameterEntryValidators.hpp"
27 template<
typename EvalT>
30 m_factories(factories)
34 template<
typename EvalT>
55 rcp(
new vector<
RCP<Evaluator<panzer::Traits> > > );
58 std::stringstream msg;
59 msg <<
"Falied to find requested model, \"" << model_id
60 <<
"\" for equation set:\n" << std::endl;
64 const ParameterList& my_model = models.
sublist(model_id);
69 for (ParameterList::ConstIterator model_it = models.
begin();
70 model_it != models.
end(); ++model_it) {
72 std::string key = model_it->first;
73 if(!model_it->second.isList())
74 nonlist_params.
setEntry(key,model_it->second);
79 ParameterList copy_of_my_model = nonlist_params;
80 copy_of_my_model.
sublist(model_id) = my_model;
85 (*factory)->getAsObject<EvalT>()->setThrowOnModelNotFound(
false);
87 (*factory)->getAsObject<EvalT>()->buildClosureModels(model_id,copy_of_my_model,fl,ir,default_params,user_data,global_data,fm);
89 if (tmp_evaluators->size() > 0) {
90 for (vector<
RCP<Evaluator<panzer::Traits> > >::const_iterator eval = tmp_evaluators->begin(); eval != tmp_evaluators->end(); ++eval)
91 evaluators->push_back(*eval);
const std::string & name() const
ParameterList & setEntry(const std::string &name, U &&entry)
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)
PHX::TemplateManager< TypeSeq, BaseT, ObjectT >::iterator begin()
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
bool isSublist(const std::string &name) const
ConstIterator begin() const
PHX::TemplateManager< TypeSeq, BaseT, ObjectT >::iterator end()
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)