//creates new file "efield.dat" in working directory and writes
//field data to it
WriteFile fieldFile = new WriteFile("efeld", "");
for (int i = 0; i < g.getNumCellsX(); i++) {
for(int j = 0; j < g.getNumCellsY(); j++) {
fieldFile.writeLine(i*g.getCellWidth() + "\t" + j*g.getCellHeight() +
"\t" + g.getEx(i, j) + "\t" + g.getEy(i, j));
}
}
fieldFile.closeFstream();