Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_STK_IOClosureModel_Factory_TemplateBuilder.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_STK_IOCLOSURE_MODEL_FACTORY_TEMPLATE_BUILDER_HPP
12#define PANZER_STK_IOCLOSURE_MODEL_FACTORY_TEMPLATE_BUILDER_HPP
13
14#include <string>
15#include "Sacado_mpl_apply.hpp"
16#include "Teuchos_RCP.hpp"
17#include "Panzer_Base.hpp"
18#include "Panzer_STK_IOClosureModel_Factory.hpp"
20
21namespace panzer_stk {
22
23 template <typename TraitsT>
25
26 public:
28 const Teuchos::RCP<STK_Interface> & mesh,
29 const Teuchos::ParameterList & outputList)
30 : cmf_tm_(cmf_tm), mesh_(mesh), outputList_(outputList), plConstr_(true) {}
31
33 const Teuchos::RCP<STK_Interface> & mesh,
34 const std::map<std::string,std::vector<std::string> > & nodalFields,
35 const std::map<std::string,std::vector<std::string> > & cellFields)
36
37 : cmf_tm_(cmf_tm), mesh_(mesh), nodalFields_(nodalFields), cellFields_(cellFields), plConstr_(false) {}
38
39 template <typename EvalT>
40 Teuchos::RCP<panzer::ClosureModelFactoryBase> build() const {
41 if(plConstr_)
42 return Teuchos::rcp( static_cast<panzer::ClosureModelFactoryBase*>
43 (new panzer_stk::IOClosureModelFactory<EvalT>(cmf_tm_.template getAsObject<EvalT>(),mesh_,outputList_)) );
44 else
45 return Teuchos::rcp( static_cast<panzer::ClosureModelFactoryBase*>
47 }
48
49 private:
51 Teuchos::RCP<STK_Interface> mesh_;
52 Teuchos::ParameterList outputList_;
53 std::map<std::string,std::vector<std::string> > nodalFields_;
54 std::map<std::string,std::vector<std::string> > cellFields_;
56 };
57
58}
59
60#endif
const panzer::ClosureModelFactory_TemplateManager< TraitsT > & cmf_tm_
IOClosureModelFactory_TemplateBuilder(const panzer::ClosureModelFactory_TemplateManager< TraitsT > &cmf_tm, const Teuchos::RCP< STK_Interface > &mesh, const Teuchos::ParameterList &outputList)
IOClosureModelFactory_TemplateBuilder(const panzer::ClosureModelFactory_TemplateManager< TraitsT > &cmf_tm, const Teuchos::RCP< STK_Interface > &mesh, const std::map< std::string, std::vector< std::string > > &nodalFields, const std::map< std::string, std::vector< std::string > > &cellFields)