Module simpa.core

Class CurrentPointSource

java.lang.Object
simpa.core.api.CurrentPointSource
All Implemented Interfaces:
PointSource

public class CurrentPointSource extends Object implements PointSource
A point source that is outside the volume used to reproduce the B field inside the volume of interest.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CurrentPointSource(org.apache.commons.math3.geometry.euclidean.threed.Vector3D loc)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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 purposes
    double
    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)
     
     

    Methods inherited from class java.lang.Object

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

    • CurrentPointSource

      public CurrentPointSource(org.apache.commons.math3.geometry.euclidean.threed.Vector3D loc)
  • Method Details

    • copy

      public PointSource copy()
      Specified by:
      copy in interface PointSource
      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

      public String toString()
      Overrides:
      toString in class Object
    • 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 interface PointSource
      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 interface PointSource
      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 interface PointSource
      Parameters:
      evp - evaluation point
      Returns:
      B field