| 682 | } |
| 683 | |
| 684 | void |
| 685 | FABio_ascii::write (std::ostream& os, |
| 686 | const FArrayBox& f, |
| 687 | int comp, |
| 688 | int num_comp) const |
| 689 | { |
| 690 | BL_ASSERT(comp >= 0 && num_comp >= 1 && (comp+num_comp) <= f.nComp()); |
| 691 | |
| 692 | const Box& bx = f.box(); |
| 693 | |
| 694 | IntVect sm = bx.smallEnd(); |
| 695 | IntVect bg = bx.bigEnd(); |
| 696 | |
| 697 | for(IntVect p(sm); p <= bg; bx.next(p)) { |
| 698 | os << p; |
| 699 | for(int k(0); k < num_comp; ++k) { |
| 700 | os << " " << f(p,k+comp); |
| 701 | } |
| 702 | os << '\n'; |
| 703 | } |
| 704 | os << '\n'; |
| 705 | |
| 706 | if(os.fail()) { |
| 707 | amrex::Error("FABio_ascii::write() failed"); |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | void |
| 712 | FABio_ascii::read (std::istream& is, |
no test coverage detected