Class PathIntegral

java.lang.Object
org.bzdev.geom.PathIntegral

public class PathIntegral extends Object
Class to compute a path integral of a vector or scalar field.

An instance of this class is created by providing the vector or scalar fields and can then be used to find the path integral for a given path.

The implementation uses Gauss-Legendre quadrature on each segment of a path.

  • Constructor Details

    • PathIntegral

      public PathIntegral(int n, RealValuedFunctTwoOps sf)
      Constructor for the line integral of a scalar field. The value of the integral for a path P is $\int f(x,y) ds = \int f(x,y) \frac{ds}{du} du$, where u is the path parameter for P, and where x and y are values on the path corresponding to each value of the path parameter u.

      If p(x,y) is a polynomial approximation to sf, then the corresponding value for n is the degree of the polynomial p(at+b,ct+d) where t is the independent variable.

      Parameters:
      n - the degree of a polynomial that is an adequate approximation to the function sf(x,y)
      sf - a function of x and y providing the value of the scalar field at coordinates (x, y).
    • PathIntegral

      public PathIntegral(int n, RealValuedFunctTwoOps xf, RealValuedFunctTwoOps yf)
      Constructor for the line integral of a vector field. The value of the integral for a path P is $\int (F_x(x,y) \frac{dx}{du} + F_y(x,y) \frac{dy}{du}) du$, where the limits of integration are those appropriate for covering a path whose path parameter is u, and where the values of x and y used in the integration are those corresponding to the path parameter.

      If p(x,y) is a polynomial approximation to xf or yf, then the corresponding value for n is the degree of the polynomial p(at+b,ct+d) where t is the independent variable. The polynomial approximation applies to each segment of the path, where a path segment is determined by the path's path iterator.

      Parameters:
      n - the degree of a polynomial that is an adequate approximation to the functions xf(x,y) and yf(x,y)
      xf - a function of x and y providing the value of the X component of a vector field at (x, y)
      yf - a function of x and y providing the value of the Y component of a vector field at (x, y)
    • PathIntegral

      public PathIntegral(int n, RealValuedFunctThreeOps sf)
      Constructor for the 3D line integral of a scalar field. The value of the integral for a path P is $\int f(x,y) ds = \int f(x,y) \frac{ds}{du} du = \int f(x,y) \sqrt{(\frac{dx}{du})^2 + (\frac{dy}{du})^2} du$, where u is the path parameter for P, and where x and y are values on the path corresponding to each value of the path parameter u.

      If p(x,y,z) is a polynomial approximation to sf, then the corresponding value for n is the degree of the polynomial p(at+b,ct+d,et+f) where t is the independent variable. The polynomial approximation applies to each segment of the path, where a path segment is determined by the path's path iterator.

      Parameters:
      n - the degree of a polynomial that is an adequate approximation to the function sf(x,y,z)
      sf - a function of x and y providing the value of the scalar field at coordinates (x, y, z).
    • PathIntegral

      public PathIntegral(int n, RealValuedFunctThreeOps xf, RealValuedFunctThreeOps yf, RealValuedFunctThreeOps zf)
      Constructor for the 3D line integral of a vector field. The value of the integral for a path P is $\int (F_x(x,y)\frac{dx}{du} + F_y(x,y)\frac{dy}{du}) du$, where the limits of integration are those appropriate for covering a path whose path parameter is u, and where the values of x and y used in the integration are those corresponding to the path parameter.

      If p(x,y,z) is a polynomial approximation to xf or yf, then the corresponding value for n is the degree of the polynomial p(at+b,ct+d,et+f) where t is the independent variable. The polynomial approximation applies to each segment of the path, where a path segment is determined by the path's path iterator.

      Parameters:
      n - the degree of a polynomial that is an adequate approximation to the functions xf(x,y,z), yf(x,y,z), and zf(x,y,z)
      xf - a function of x and y providing the value of the X component of a vector field at (x, y, z)
      yf - a function of x and y providing the value of the Y component of a vector field at (x, y, z)
      zf - a function of x and y providing the value of the Z component of a vector field at (x, y, z)
  • Method Details