10 std::stringstream ostr;
12 <<
"LocalCells attempted to access local cell "
14 <<
" but there are no local cells. This normally indicates"
15 <<
" a partitioning problem.";
16 throw std::invalid_argument(ostr.str());
21 std::stringstream ostr;
23 <<
"LocalCells attempted to access local cell "
25 <<
" but index out of range [0, "
27 throw std::invalid_argument(ostr.str());
38 if (native_cells.empty())
40 std::stringstream ostr;
42 <<
"LocalCells attempted to access local cell "
44 <<
" but there are no local cells. This normally indicates"
45 <<
" a partitioning problem.";
46 throw std::invalid_argument(ostr.str());
49 if (cell_local_index >= native_cells.size())
51 std::stringstream ostr;
53 <<
"LocalCells attempted to access local cell "
55 <<
" but index out of range [0, "
56 << native_cells.size() - 1 <<
"].";
57 throw std::invalid_argument(ostr.str());
60 return *native_cells[cell_local_index];
chi_mesh::Cell & operator[](uint64_t cell_local_index)
std::vector< std::unique_ptr< chi_mesh::Cell > > & native_cells