| 1897 | |
| 1898 | |
| 1899 | void |
| 1900 | readBoxArray (BoxArray& ba, |
| 1901 | std::istream& is, |
| 1902 | bool bReadSpecial) |
| 1903 | { |
| 1904 | if (bReadSpecial == false) |
| 1905 | { |
| 1906 | ba.readFrom(is); |
| 1907 | } |
| 1908 | else |
| 1909 | { |
| 1910 | BL_ASSERT(ba.empty()); |
| 1911 | int maxbox; |
| 1912 | ULong in_hash; // will be ignored |
| 1913 | is.ignore(bl_ignore_max, '(') >> maxbox >> in_hash; |
| 1914 | AMREX_ASSERT(maxbox >= 0 && maxbox < std::numeric_limits<int>::max()); |
| 1915 | ba.resize(maxbox); |
| 1916 | for (int i = 0; i < maxbox; i++) |
| 1917 | { |
| 1918 | Box b; |
| 1919 | is >> b; |
| 1920 | ba.set(i, b); |
| 1921 | } |
| 1922 | is.ignore(bl_ignore_max, ')'); |
| 1923 | |
| 1924 | if (is.fail()) { |
| 1925 | amrex::Error("readBoxArray(BoxArray&,istream&,int) failed"); |
| 1926 | } |
| 1927 | } |
| 1928 | } |
| 1929 | |
| 1930 | bool match (const BoxArray& x, const BoxArray& y) |
| 1931 | { |