Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ClosureModel_Factory.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef PANZER_CLOSURE_MODEL_FACTORY_HPP
12 #define PANZER_CLOSURE_MODEL_FACTORY_HPP
13 
14 #include "PanzerDiscFE_config.hpp"
15 
16 #include "Teuchos_RCP.hpp"
18 #include "Phalanx_Evaluator.hpp"
19 #include "Phalanx_FieldManager.hpp"
20 #include "Panzer_Traits.hpp"
22 
23 #include <string>
24 #include <vector>
25 
26 namespace panzer {
27 
28  class FieldLayoutLibrary;
29  class IntegrationRule;
30  struct GlobalData;
31 
32  template<typename EvalT>
34 
35  protected:
37  public:
38 
39  ClosureModelFactory(bool throw_if_model_not_found=true) : m_throw_if_model_not_found(throw_if_model_not_found) {}
40 
41  virtual ~ClosureModelFactory() {}
42 
44  virtual buildClosureModels(const std::string& model_id,
45  const Teuchos::ParameterList& models,
48  const Teuchos::ParameterList& equation_set_params,
49  const Teuchos::ParameterList& user_data,
50  const Teuchos::RCP<panzer::GlobalData>& global_data,
51  PHX::FieldManager<panzer::Traits>& fm) const = 0;
52 
60  virtual void registerEvaluators(const std::vector< Teuchos::RCP<PHX::Evaluator<panzer::Traits> > > & evaluators,
62  {
63  for (std::vector< Teuchos::RCP<PHX::Evaluator<panzer::Traits> > >::size_type i=0; i < evaluators.size(); ++i)
64  this->template registerEvaluator<EvalT>(fm, evaluators[i]);
65  }
66 
67  virtual void setThrowOnModelNotFound(bool do_throw) {
69  }
70 
71  };
72 
73 }
74 
75 #endif
virtual void setThrowOnModelNotFound(bool do_throw)
ClosureModelFactory(bool throw_if_model_not_found=true)
virtual 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 &equation_set_params, const Teuchos::ParameterList &user_data, const Teuchos::RCP< panzer::GlobalData > &global_data, PHX::FieldManager< panzer::Traits > &fm) const =0
virtual void registerEvaluators(const std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > &evaluators, PHX::FieldManager< panzer::Traits > &fm) const