| 709 | } |
| 710 | |
| 711 | void |
| 712 | FABio_ascii::read (std::istream& is, |
| 713 | FArrayBox& f) const |
| 714 | { |
| 715 | const Box& bx = f.box(); |
| 716 | |
| 717 | IntVect sm = bx.smallEnd(); |
| 718 | IntVect bg = bx.bigEnd(); |
| 719 | IntVect p, q; |
| 720 | for(p = sm; p <= bg; bx.next(p)) { |
| 721 | is >> q; |
| 722 | if(p != q) { |
| 723 | amrex::ErrorStream() << "Error: read IntVect " |
| 724 | << q |
| 725 | << " should be " |
| 726 | << p |
| 727 | << '\n'; |
| 728 | amrex::Error("FABio_ascii::read() bad IntVect"); |
| 729 | } |
| 730 | for(int k(0); k < f.nComp(); ++k) { |
| 731 | is >> f(p, k); |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | if(is.fail()) { |
| 736 | amrex::Error("FABio_ascii::read() failed"); |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | void |
| 741 | FABio_ascii::skip (std::istream& is, |