bool ParameterListCallback<LocalOrdinalT,GlobalOrdinalT,Node>::handlesRequest(const Teko::RequestMesg & rm) { // check if is a parameter list message, and that the parameter // list contains the right fields if(rm.getName()=="Parameter List") return true; else return false; }
bool ParameterListCallbackBlocked<LocalOrdinalT,GlobalOrdinalT,Node>::handlesRequest(const Teko::RequestMesg & rm) { // check if is a parameter list message, and that the parameter // list contains the right fields if(rm.getName()=="Parameter List") { bool isHandled = true; Teuchos::RCP<const Teuchos::ParameterList> pl = rm.getParameterList(); std::string field; if(pl->isType<std::string>("x-coordinates")) { field = pl->get<std::string>("x-coordinates"); if(!isField(field)) { return false; } } if(pl->isType<std::string>("y-coordinates")) { // we assume that the fields must be the same if(field != pl->get<std::string>("y-coordinates")) { return false; } } if(pl->isType<std::string>("z-coordinates")) { // we assume that the fields must be the same if(field != pl->get<std::string>("z-coordinates")) { return false; } } return isHandled; } else return false; }