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

Method read

Src/Base/AMReX_FArrayBox.cpp:711–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709}
710
711void
712FABio_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
740void
741FABio_ascii::skip (std::istream& is,

Callers 2

readFromMethod · 0.45

Calls 7

fFunction · 0.50
boxMethod · 0.45
nextMethod · 0.45
nCompMethod · 0.45
numPtsMethod · 0.45
getMethod · 0.45
dataPtrMethod · 0.45

Tested by

no test coverage detected