43 #include "PanzerAdaptersSTK_config.hpp"
45 #include "Panzer_STK_IOClosureModel_Factory.hpp"
46 #include "Panzer_STK_ScatterCellAvgQuantity.hpp"
47 #include "Panzer_STK_ScatterCellAvgVector.hpp"
48 #include "Panzer_STK_ScatterCellQuantity.hpp"
49 #include "Panzer_STK_ScatterFields.hpp"
70 userCMF_->buildClosureModels(model_id,models,fl,ir,default_params,user_data,global_data,fm);
74 rcp(
new std::vector<
RCP<Evaluator<panzer::Traits> > > );
77 std::string block_id = default_params.
get<std::string>(
"Block ID");
79 if(!blockIdEvaluated_[block_id]) {
80 typedef std::map<std::string,std::vector<std::string> > BlockIdToFields;
82 int worksetsize = ir->
dl_scalar->extent(0);
85 BlockIdToFields::const_iterator cellAvgItr = blockIdToCellAvgFields_.find(block_id);
86 if(cellAvgItr!=blockIdToCellAvgFields_.end() ) {
93 pl.
set(
"Field Names",fieldNames);
94 pl.
set(
"Scatter Name", block_id+
"_Cell_Avg_Fields");
100 evaluators->push_back(eval);
102 blockIdEvaluated_[block_id] =
true;
106 BlockIdToFields::const_iterator cellAvgVecItr = blockIdToCellAvgVectors_.find(block_id);
107 if(cellAvgVecItr != blockIdToCellAvgVectors_.end() ) {
112 pl.
set(
"Mesh",mesh_);
114 pl.
set(
"Field Names",fieldNames);
115 pl.
set(
"Scatter Name", block_id+
"_Cell_Avg_Vectors");
121 evaluators->push_back(eval);
123 blockIdEvaluated_[block_id] =
true;
127 BlockIdToFields::const_iterator cellItr = blockIdToCellFields_.find(block_id);
128 if(cellItr!=blockIdToCellFields_.end() ) {
133 pl.
set(
"Mesh",mesh_);
134 pl.
set(
"Workset Size",worksetsize);
135 pl.
set(
"Field Names",fieldNames);
136 pl.
set(
"Scatter Name", block_id+
"_Cell_Fields");
142 evaluators->push_back(eval);
144 blockIdEvaluated_[block_id] =
true;
148 BlockIdToFields::const_iterator nodalItr = blockIdToNodalFields_.find(block_id);
149 if(nodalItr!=blockIdToNodalFields_.end() ) {
160 evaluators->push_back(eval);
162 blockIdEvaluated_[block_id] =
true;
166 evaluators->insert(evaluators->end(),user_evals->begin(),user_evals->end());
171 #ifdef HAVE_PANZER_EXPLICIT_INSTANTIATION
T & get(const std::string &name, T def_value)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
#define PANZER_INSTANTIATE_TEMPLATE_CLASS_ONE_T(name)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< PHX::DataLayout > dl_scalar
Data layout for scalar fields.
Teuchos::RCP< const shards::CellTopology > topology
Description and data layouts associated with a particular basis.
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