MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / readBoxArray

Function readBoxArray

Src/Base/AMReX_BoxArray.cpp:1899–1928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1897
1898
1899void
1900readBoxArray (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
1930bool match (const BoxArray& x, const BoxArray& y)
1931{

Callers 1

restartMethod · 0.85

Calls 4

readFromMethod · 0.45
emptyMethod · 0.45
resizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected