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

Method write

Src/Base/AMReX_FArrayBox.cpp:684–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682}
683
684void
685FABio_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
711void
712FABio_ascii::read (std::istream& is,

Callers 14

WriteFunction · 0.45
writeIntDataFunction · 0.45
writeIntDataMethod · 0.45
writeLongDataMethod · 0.45
WriteBaseProfileMethod · 0.45
WriteCallTraceMethod · 0.45
WriteCommStatsMethod · 0.45
writeOnMethod · 0.45
WriteMethod · 0.45
AsyncWriteDoitMethod · 0.45

Calls 6

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

Tested by

no test coverage detected