Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ModelEvaluator_Factory_impl.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_MODEL_EVALUATOR_FACTORY_IMPL_HPP
12 #define PANZER_MODEL_EVALUATOR_FACTORY_IMPL_HPP
13 
14 #include "Thyra_ModelEvaluator.hpp"
15 #include "Thyra_EpetraModelEvaluator.hpp"
16 #include "Teuchos_StandardParameterEntryValidators.hpp"
18 
19 namespace panzer {
20 
21  template <typename ScalarT, typename LO, typename GO>
24  {
26 
27  std::string type = getMyParamList.get<std::string>("Model Evaluator Type");
28 
29  if (type == "Epetra") {
30 
32  Teuchos::rcp(new panzer::ModelEvaluator_Epetra(fmb, linObjFactory));
33 
35  epetraThyraModel = rcp(new ::Thyra::EpetraModelEvaluator());
36  epetraThyraModel->initialize(epetraModel,lowsFactory);
38  epetraThyraModel;
39 
40  }
41  else if (type == "Tpetra") {
42  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error,
43  "Tpetra version not supported yet, use Epetra!");
44  }
45 
46 
47 
48  }
49 
50 }
51 
52 #endif
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
T * get() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< Thyra::ModelEvaluator< ScalarT > > buildModelEvaluator(const RCP< panzer::FieldManagerBuilder &fmb, const RCP< panzer::BlockedEpetraLinearObjFactory< panzer::Traits, int > > &lof)