java.lang.Object
simpa.core.api.CurrentPointSource
- All Implemented Interfaces:
PointSource
A point source that is outside the volume used to reproduce the B field
inside the volume of interest.
-
Constructor Summary
ConstructorsConstructorDescriptionCurrentPointSource
(org.apache.commons.math3.geometry.euclidean.threed.Vector3D loc) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
getField
(org.apache.commons.math3.geometry.euclidean.threed.Vector3D evp) Calculates the B field at a given evaluation point.org.apache.commons.math3.geometry.euclidean.threed.Vector3D
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
For debugging purposesdouble
projectToLocalX
(org.apache.commons.math3.geometry.euclidean.threed.Vector3D b) Projects the given Vector point to the x-axis.double
projectToLocalY
(org.apache.commons.math3.geometry.euclidean.threed.Vector3D b) Projects the given Vector point to the y-axis.double
projectToLocalZ
(org.apache.commons.math3.geometry.euclidean.threed.Vector3D b) Projects the given Vector point to the z-axis.void
scale
(double scalingFactor) Scales the currents of the point source using a scaling factor.void
setBaseVectors
(org.apache.commons.math3.geometry.euclidean.threed.Vector3D localX, org.apache.commons.math3.geometry.euclidean.threed.Vector3D localY, org.apache.commons.math3.geometry.euclidean.threed.Vector3D localZ) Set all the base vectors for the CurrentPointSource.void
setLocalCurrentComponents
(double i1, double i2, double i3) Set the components of the currents in the local frame.void
setLocation
(org.apache.commons.math3.geometry.euclidean.threed.Vector3D loc) toString()
-
Constructor Details
-
CurrentPointSource
public CurrentPointSource(org.apache.commons.math3.geometry.euclidean.threed.Vector3D loc)
-
-
Method Details
-
copy
- Specified by:
copy
in interfacePointSource
- Returns:
- Shallow copy, except the currents which is native, so deep.
-
setBaseVectors
public void setBaseVectors(org.apache.commons.math3.geometry.euclidean.threed.Vector3D localX, org.apache.commons.math3.geometry.euclidean.threed.Vector3D localY, org.apache.commons.math3.geometry.euclidean.threed.Vector3D localZ) Set all the base vectors for the CurrentPointSource.- Parameters:
localX
- - the local x location.localY
- - the local y location.localZ
- - the local z location.
-
getLocalX
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getLocalX() -
getLocalY
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getLocalY() -
getLocalZ
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getLocalZ() -
projectToLocalX
public double projectToLocalX(org.apache.commons.math3.geometry.euclidean.threed.Vector3D b) Projects the given Vector point to the x-axis.- Parameters:
b
- vector to use in projection- Returns:
- the dot product of the x-axis and the input vector.
-
projectToLocalY
public double projectToLocalY(org.apache.commons.math3.geometry.euclidean.threed.Vector3D b) Projects the given Vector point to the y-axis.- Parameters:
b
- vector to use in projection- Returns:
- the dot product of the y-axis and the input vector.
-
projectToLocalZ
public double projectToLocalZ(org.apache.commons.math3.geometry.euclidean.threed.Vector3D b) Projects the given Vector point to the z-axis.- Parameters:
b
- vector to use in projection- Returns:
- the dot product of the z-axis and the input vector.
-
toString
-
getCurrent
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getCurrent()- Returns:
- The current in the global coordinate system.
-
getLocalCurrentComponents
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getLocalCurrentComponents() -
setLocalCurrentComponents
public void setLocalCurrentComponents(double i1, double i2, double i3) Set the components of the currents in the local frame.- Parameters:
i1
- Current in the direction of local X.i2
- Current in the direction of local Y.i3
- Current in the direction of local Z.
-
scale
public void scale(double scalingFactor) Scales the currents of the point source using a scaling factor.- Specified by:
scale
in interfacePointSource
- Parameters:
scalingFactor
- factor to scale with.
-
getLocation
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getLocation()Description copied from interface:PointSource
For debugging purposes- Specified by:
getLocation
in interfacePointSource
- Returns:
- the location of the source
-
setLocation
public void setLocation(org.apache.commons.math3.geometry.euclidean.threed.Vector3D loc) -
getField
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getField(org.apache.commons.math3.geometry.euclidean.threed.Vector3D evp) Calculates the B field at a given evaluation point.- Specified by:
getField
in interfacePointSource
- Parameters:
evp
- evaluation point- Returns:
- B field
-