/* From: "A SURVEY OF COMPUTATIONAL PHYSICS" by RH Landau, MJ Paez, and CC BORDEIANU Copyright Princeton University Press, Princeton, 2008. Electronic Materials copyright: R Landau, Oregon State Univ, 2008; MJ Paez, Univ Antioquia, 2008; and CC BORDEIANU, Univ Bucharest, 2008. Support by National Science Foundation */ /* LaplaceLine.java: Laplace eqn via finite difference mthd wire in a grounded box, Output for 3D gnuplot */ import java.io.*; public class LaplaceLine { static int Nmax = 100; // Size of box public static void main(String[] argv) throws IOException, FileNotFoundException { double V[][] = new double[Nmax][Nmax]; int i, j, iter; PrintWriter w = new PrintWriter(new FileOutputStream("LaplaceLine.dat"), true); for (i=0; i