Panzer Version of the Day
Loading...
Searching...
No Matches
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
19namespace panzer {
20
21 template <typename ScalarT, typename LO, typename GO>
22 Teuchos::RCP<Thyra::ModelEvaluator<ScalarT> >
24 {
25 Teuchos::RCP<Thyra::ModelEvaluator<ScalarT> > me;
26
27 std::string type = getMyParamList.get<std::string>("Model Evaluator Type");
28
29 if (type == "Epetra") {
30
31 Teuchos::RCP<EpetraExt::ModelEvaluator> epetraModel =
32 Teuchos::rcp(new panzer::ModelEvaluator_Epetra(fmb, linObjFactory));
33
34 Teuchos::RCP<Thyra::EpetraModelEvaluator>
35 epetraThyraModel = rcp(new ::Thyra::EpetraModelEvaluator());
36 epetraThyraModel->initialize(epetraModel,lowsFactory);
37 Teuchos::RCP< ::Thyra::ModelEvaluator<double> > thyraModel =
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
Teuchos::RCP< Thyra::ModelEvaluator< ScalarT > > buildModelEvaluator(const RCP< panzer::FieldManagerBuilder &fmb, const RCP< panzer::BlockedEpetraLinearObjFactory< panzer::Traits, int > > &lof)