org.opensourcephysics.display2d
Class TestData

java.lang.Object
  extended by org.opensourcephysics.display2d.TestData

public class TestData
extends java.lang.Object

Title: TestData Description: Static methods to generate test data for various programs. Copyright: Copyright (c) 2005 Gould, Christian, and Tobochnik

Version:
1.0
Author:
Wolfgang Christian

Constructor Summary
TestData()
           
 
Method Summary
static double[][][] circulatingVectorField(int nx, int ny)
           
static double dipole(double x, double y)
          Dipole distribution with poles at +1 and -1 on the x axis.
static double[][][] dipoleScalarField(GridPointData pointdata)
          Generate a dipole scalar field.
static double[] dipoleVector(double x, double y)
          Dipole field with poles at +1 and -1 on the x axis.
static double[][][] dipoleVectorField(int nx, int ny, double xmin, double xmax, double ymin, double ymax)
           
static double gaussian(double x, double y, double sigma)
          A 2D Gaussian distribution function centered at x=0 and y=0 and standard deviation of 1.
static double[][][] gaussianScalarField(GridPointData pointdata)
          Generate a gaussian scalar field.
static void randomScalarField(GridPointData pointdata)
          Generate a random scalar field.
static double saddle(double x, double y)
          Saddle function centered at x=0 and y=0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestData

public TestData()
Method Detail

dipole

public static double dipole(double x,
                            double y)
Dipole distribution with poles at +1 and -1 on the x axis.


gaussian

public static double gaussian(double x,
                              double y,
                              double sigma)
A 2D Gaussian distribution function centered at x=0 and y=0 and standard deviation of 1.


saddle

public static double saddle(double x,
                            double y)
Saddle function centered at x=0 and y=0.


dipoleScalarField

public static double[][][] dipoleScalarField(GridPointData pointdata)
Generate a dipole scalar field.


gaussianScalarField

public static double[][][] gaussianScalarField(GridPointData pointdata)
Generate a gaussian scalar field.


randomScalarField

public static void randomScalarField(GridPointData pointdata)
Generate a random scalar field.


dipoleVector

public static double[] dipoleVector(double x,
                                    double y)
Dipole field with poles at +1 and -1 on the x axis. Field strength is proportional to 1/r.


circulatingVectorField

public static double[][][] circulatingVectorField(int nx,
                                                  int ny)

dipoleVectorField

public static double[][][] dipoleVectorField(int nx,
                                             int ny,
                                             double xmin,
                                             double xmax,
                                             double ymin,
                                             double ymax)