Contents
Class Cell3D
java.lang.Object
cnuphys.magfield.Cell3D
Cells are used by the probes. 3D cells for the torus, 2D cells for the
solenoid.
- Author:
- heddle
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCell3D
(FieldProbe probe) Create a 3D cell (for Torus and Transverse solenoid) -
Method Summary
Modifier and TypeMethodDescriptionvoid
calculate
(double q1, double q2, double q3, float[] result) Calculate the field in kGboolean
contained
(double q1, double q2, double q3) Check whether the cell boundaries (not the map boundaries) include the pointvoid
trilinear
(double q1, double q2, double q3, float[] result) Calculate the field in kG by trilinear interpolation
-
Field Details
-
Constructor Details
-
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 rectangularq2
- rho (cm) for cylindrical, y (cm) for rectangularq3
- 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:
result
- the field in kGphi
- the phi coordinate in degreesrho
- the rho coordinate in cmz
- the z component in cm
-
calculate
public void calculate(double q1, double q2, double q3, float[] result) Calculate the field in kG- Parameters:
result
- the field in kGphi
- the phi coordinate in degreesrho
- the rho coordinate in cmz
- the z coordinate int cm
-