25 std::ostream_iterator<Region>(os,
" "));
31 std::istringstream iss(line);
32 std::istream_iterator<std::string> it(iss);
34 if (*it != std::string(
"MODEL_LAYER"))
36 ERR(
"Expected MODEL_LAYER keyword but '{:s}' found.\n", it->c_str());
37 throw std::runtime_error(
38 "In parseRegion() expected MODEL_LAYER keyword not found.\n");
43 while (it != std::istream_iterator<std::string>() && *it !=
"END")
45 auto const& region_it =
46 std::find_if(regions.begin(), regions.end(),
47 [&](
Region const&
r) { return r.name == *it; });
48 if (region_it != regions.end())
50 l.
regions.push_back(*region_it);
void ERR(char const *fmt, Args const &... args)
std::ostream & operator<<(std::ostream &os, CoordinateSystem const &c)
Layer parseLayer(std::string const &line, std::vector< Region > const ®ions)
void copy(PETScVector const &x, PETScVector &y)
std::vector< Region > regions