Class MagFieldMap

All Implemented Interfaces:
Comparable, IFileBasedFieldMap, ElementType, MagnetType, ISplittable, DataListener

public class MagFieldMap extends Electromagnet implements ISplittable, IFileBasedFieldMap
General magnetic Field Map element. It can be used with any type of FieldMap objects.

This element has to buckets:

  • MagBucket: contains magnetic field parameters.
  • FieldMapBucket: includes the filename of the field map file and information about its type.
Author:
Juan F. Esteban Müller <JuanF.EstebanMuller@esss.se>
  • Field Details

  • Constructor Details

  • Method Details

    • getType

      public String getType()
      Description copied from class: AcceleratorNode
      Derived class must furnish a unique type id
      Specified by:
      getType in class AcceleratorNode
    • getFieldMapBucket

      public FieldMapBucket getFieldMapBucket()
    • setFieldMapBucket

      public final void setFieldMapBucket(FieldMapBucket buc)
    • addBucket

      public void addBucket(AttributeBucket buc)
      Override AcceleratorNode implementation to check for a FieldMapBucket
      Overrides:
      addBucket in class Magnet
      Parameters:
      buc -
    • getFieldMapFile

      public String getFieldMapFile()
      Returns:
      FieldMap file
    • setFieldMapFile

      public void setFieldMapFile(String strVal)
      Parameters:
      strVal - FieldMap file
    • getFieldMap

      public FieldMap getFieldMap()
      Returns:
      Field profile
    • setFieldMap

      public void setFieldMap(FieldMap fieldMap)
      Parameters:
      fieldMap -
    • update

      public void update(DataAdaptor adaptor)
      Description copied from class: Electromagnet
      Update the node with data from the provided adaptor.
      Specified by:
      update in interface DataListener
      Overrides:
      update in class Electromagnet
      Parameters:
      adaptor - The data provider
    • getLongitudinalPositions

      public double[] getLongitudinalPositions()
      Specified by:
      getLongitudinalPositions in interface ISplittable
      Returns:
      Longitudinal positions at which the element must be split.
    • getSliceLength

      public double getSliceLength()
      Specified by:
      getSliceLength in interface ISplittable
      Returns:
      Length of each slice of the element.
    • setDimensions

      public void setDimensions(int i)
    • setDynamic

      public void setDynamic(boolean b)
    • writeFieldMap

      public void writeFieldMap(String fieldMapPath)
      Description copied from interface: IFileBasedFieldMap
      Write the field map to a file.
      Specified by:
      writeFieldMap in interface IFileBasedFieldMap
      Parameters:
      fieldMapPath - The path to the directory where field map should be saved.