void avtVariableByNodeQuery::SetInputParams(const MapNode ¶ms) { if (params.HasEntry("vars")) { stringVector v = params.GetEntry("vars")->AsStringVector(); if (v.empty()) EXCEPTION2(QueryArgumentException, "vars", 1); timeCurveSpecs["nResultsToStore"] = (int) v.size(); pickAtts.SetVariables(v); } else EXCEPTION1(QueryArgumentException, "vars"); if (params.HasNumericEntry("domain")) domain = params.GetEntry("domain")->ToInt(); if (params.HasNumericEntry("element")) node = params.GetEntry("element")->ToInt(); else EXCEPTION1(QueryArgumentException, "element"); if (params.HasNumericEntry("use_global_id")) useGlobalId = params.GetEntry("use_global_id")->ToBool(); }
void avtZoneCenterQuery::SetInputParams(const MapNode ¶ms) { if(params.HasNumericEntry("use_global_id")) useGlobalId = params.GetEntry("use_global_id")->ToBool(); if(params.HasNumericEntry("domain")) domain = params.GetEntry("domain")->ToInt(); if(params.HasNumericEntry("element")) element = params.GetEntry("element")->ToInt(); else EXCEPTION1(QueryArgumentException, "element"); }
void avtLocateAndPickNodeQuery::SetInputParams(const MapNode ¶ms) { if (params.HasEntry("vars")) { const stringVector &v = params.GetEntry("vars")->AsStringVector(); if (v.empty()) EXCEPTION2(QueryArgumentException, "vars", 1); timeCurveSpecs["nResultsToStore"] = (int)v.size(); pickAtts.SetVariables(v); } else EXCEPTION1(QueryArgumentException, "vars"); if (params.HasNumericVectorEntry("ray_start_point")) { doubleVector v; params.GetEntry("ray_start_point")->ToDoubleVector(v); if (v.size() != 3) EXCEPTION2(QueryArgumentException, "ray_start_point", 3); pickAtts.SetRayPoint1(v); } else EXCEPTION1(QueryArgumentException, "ray_start_point"); if (params.HasNumericVectorEntry("ray_end_point")) { doubleVector v; params.GetEntry("ray_end_point")->ToDoubleVector(v); if (v.size() != 3) EXCEPTION2(QueryArgumentException, "ray_end_point", 3); pickAtts.SetRayPoint2(v); } else EXCEPTION1(QueryArgumentException, "ray_end_point"); if (params.HasNumericEntry("domain")) domain = params.GetEntry("domain")->ToInt(); else EXCEPTION1(QueryArgumentException, "domain"); if (params.HasNumericEntry("element")) node = params.GetEntry("element")->ToInt(); else EXCEPTION1(QueryArgumentException, "element"); }
void avtShapeletDecompositionQuery::SetInputParams(const MapNode & params) { if (params.HasNumericEntry("beta")) { double b = params.GetEntry("beta")->ToDouble(); if (b < 1.0) { EXCEPTION1(VisItException, "Shapelet Decomposition requires " "beta and nmax >= 1."); } SetBeta(b); } else { SetBeta(1.0); } if (params.HasNumericEntry("nmax")) { int m = params.GetEntry("nmax")->ToInt(); SetNMax(m < 1 ? 1 : m); } SetDecompOutputFileName(""); if (params.HasEntry("recomp_file")) { std::string rf(params.GetEntry("recomp_file")->AsString()); if (rf.empty()) { EXCEPTION1(QueryArgumentException, "recomp_file"); } SetRecompOutputFileName(rf); } else { SetRecompOutputFileName(""); } }
void avtLineScanQuery::SetInputParams(const MapNode ¶ms) { if (params.HasNumericEntry("num_lines")) SetNumberOfLines(params.GetEntry("num_lines")->ToInt()); if (params.HasNumericEntry("num_bins")) SetNumberOfBins(params.GetEntry("num_bins")->ToInt()); double min = 0., max = 1.0; if (params.HasNumericEntry("min")) { min = params.GetEntry("min")->ToDouble(); } if (params.HasNumericEntry("max")) { max = params.GetEntry("max")->ToDouble(); } SetRange(min, max); }
void avtStreamlineInfoQuery::SetInputParams(const MapNode ¶ms) { if (params.HasNumericEntry("dump_steps")) SetDumpSteps(params.GetEntry("dump_steps")->ToBool()); }