PHX::any PHX::EvaluationContainer<EvalT, Traits>::getFieldData(const PHX::FieldTag& f) { //return fields_[f.identifier()]; std::unordered_map<std::string,PHX::any>::iterator a= fields_.find(f.identifier()); if (a==fields_.end()){ std::cout << " PHX::EvaluationContainer<EvalT, Traits>::getFieldData can't find an f.identifier() "<< f.identifier() << std::endl; } return a->second; }
PHX::any PHX::EvaluationContainer<EvalT, Traits>::getFieldData(const PHX::FieldTag& f) { //return fields_[f.identifier()]; auto a = fields_.find(f.identifier()); if (a==fields_.end()){ std::cout << " PHX::EvaluationContainer<EvalT, Traits>::getFieldData can't find an f.identifier() "<< f.identifier() << std::endl; } return a->second; }
void PHX::EvaluationContainer<EvalT, Traits>:: bindField(const PHX::FieldTag& f, const PHX::any& a) { auto s = fields_.find(f.identifier()); if (s == fields_.end()) { std::stringstream st; st << "\n ERROR in PHX::EvaluationContainer<EvalT, Traits>::bindField():\n" << " Failed to bind field: \"" << f.identifier() << "\"\n" << " for evaluation type \"" << PHX::typeAsString<EvalT>() << "\".\n" << " This field is not used in the Evaluation DAG.\n"; throw std::runtime_error(st.str()); } // Set the new memory fields_[f.identifier()] = a; // Loop through evalautors and rebind the field auto& evaluators = this->dag_manager_.getEvaluatorsBindingField(f); for (auto& e : evaluators) e->bindField(f,a); }