Module simpa.core

Class DiagnosticUtils

java.lang.Object
simpa.core.api.utils.DiagnosticUtils

public class DiagnosticUtils extends Object
Utility methods for diagnosing configurations.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    getFieldsOnCurve(List<PointSource> sources, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, String outfile, LengthUnit lUnit, List<LocalFrame> lfl)
    Write the field components into a file along a curve.
    static void
    getFieldsOnCurve(PotentialProvider pp, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, String outfile, List<LocalFrame> lfl, boolean localFrame)
    Write the field components into a file along a curve.
    static org.apache.commons.math3.geometry.euclidean.threed.Vector3D
    integrateBFieldOnCurve(List<PointSource> sources, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, List<LocalFrame> lfl)
    Integrates the B field on the curve and returns the integral.
    static org.apache.commons.math3.geometry.euclidean.threed.Vector3D
    integrateEFieldOnCurve(List<PointSource> sources, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, List<LocalFrame> lfl)
    Integrates the E field on the curve and returns the integral.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DiagnosticUtils

      public DiagnosticUtils()
  • Method Details

    • getFieldsOnCurve

      public static void getFieldsOnCurve(PotentialProvider pp, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, String outfile, List<LocalFrame> lfl, boolean localFrame) throws OutOfApertureException, KnownFatalException
      Write the field components into a file along a curve. A shift can be given as a local addition to the curve. In the output file the components of the fields are expresse in the global coordinate system
      Parameters:
      pp - A Potential provider instance.
      curve - Curve on which the field is calculated.
      shift - Shift applied to the curve locally in the same unit as the curve. The shift coordinates are taken in the local frame to calculate the shift vector which is added to the point on the curve in the global frame.
      outfile - The X,Y,Z, coordinates and field values are written into this file.
      lfl - List of local frames for each point on the curve.
      localFrame - If true, the fields are written in the local frame, otherwise in the global frame.
      Throws:
      OutOfApertureException - when a point is out of aperture.
      KnownFatalException - when an internal error happens.
    • getFieldsOnCurve

      public static void getFieldsOnCurve(List<PointSource> sources, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, String outfile, LengthUnit lUnit, List<LocalFrame> lfl) throws OutOfApertureException, KnownFatalException
      Write the field components into a file along a curve. A shift can be given as a local addition to the curve. In the output file the components of the fields are in curve-linear coordinates. The +Z direction coincides with the given curve such that it points from Pn to Pn+1, where Pn is a point on the curve.
      Parameters:
      sources - List of sources.
      curve - Curve on which the field is calculated.
      shift - Shift applied to the curve locally in the same unit as the curve. The x direction points outward of the machine, the Y direction is up, and the Z direction is the same as the difference between consecutive points in the curve.
      outfile - The X,Y,Z, coordinates and field values are written into this file.
      lUnit - Length unit in the output file
      Throws:
      OutOfApertureException - when a point is out of aperture.
      KnownFatalException - when an internal error happens.
    • integrateBFieldOnCurve

      public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D integrateBFieldOnCurve(List<PointSource> sources, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, List<LocalFrame> lfl) throws OutOfApertureException, KnownFatalException
      Integrates the B field on the curve and returns the integral.
      Parameters:
      sources - List of point sources.
      curve - the curve to integrate with.
      shift - the shift to the points in the curve.
      Returns:
      integral
      Throws:
      OutOfApertureException - when a point is out of aperture.
      KnownFatalException - when an internal error happens.
    • integrateEFieldOnCurve

      public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D integrateEFieldOnCurve(List<PointSource> sources, List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> curve, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift, List<LocalFrame> lfl) throws OutOfApertureException, KnownFatalException
      Integrates the E field on the curve and returns the integral.
      Parameters:
      sources - List of point sources.
      curve - The curve to integrate with.
      shift - the shift to the points in the curve.
      Returns:
      integral
      Throws:
      OutOfApertureException - when a point is out of aperture.
      KnownFatalException - when an internal error happens.