Class Cell3D

java.lang.Object
cnuphys.magfield.Cell3D

public class Cell3D extends Object
Cells are used by the probes. 3D cells for the torus, 2D cells for the solenoid.
Author:
heddle
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a 3D cell (for Torus and Transverse solenoid)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    calculate(double q1, double q2, double q3, float[] result)
    Calculate the field in kG
    boolean
    contained(double q1, double q2, double q3)
    Check whether the cell boundaries (not the map boundaries) include the point
    void
    trilinear(double q1, double q2, double q3, float[] result)
    Calculate the field in kG by trilinear interpolation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • q1Min

      public double q1Min
    • q1Max

      public double q1Max
    • q2Min

      public double q2Min
    • q2Max

      public double q2Max
    • q3Min

      public double q3Min
    • q3Max

      public double q3Max
  • Constructor Details

    • Cell3D

      public Cell3D(FieldProbe probe)
      Create a 3D cell (for Torus and Transverse solenoid)
      Parameters:
      probe - the magnetic probe
  • Method Details

    • contained

      public boolean contained(double q1, double q2, double q3)
      Check whether the cell boundaries (not the map boundaries) include the point
      Parameters:
      q1 - phi in deg for cylindrical, x (cm) for rectangular
      q2 - rho (cm) for cylindrical, y (cm) for rectangular
      q3 - z (cm) for cylindrical or rectangular
      Returns:
      true if the point is inside the boundary of the cell
    • trilinear

      public void trilinear(double q1, double q2, double q3, float[] result)
      Calculate the field in kG by trilinear interpolation
      Parameters:
      phi - the phi coordinate in degrees
      rho - the rho coordinate in cm
      z - the z component in cm
      result - the field in kG
    • calculate

      public void calculate(double q1, double q2, double q3, float[] result)
      Calculate the field in kG
      Parameters:
      phi - the phi coordinate in degrees
      rho - the rho coordinate in cm
      z - the z coordinate int cm
      result - the field in kG