Module simpa.core

Class FieldMap

java.lang.Object
simpa.core.api.FieldMap

public class FieldMap extends Object
This class represents an electro-magnetic field. It provides methods to read from and write to a file. Also provides method to get evaluators for it.
  • Method Details

    • createFromFile

      public static FieldMap createFromFile(String fileName, double scaling) throws IOException
      Throws:
      IOException
    • writeToFile

      public void writeToFile(String fileName) throws IOException
      Serialize this fieldmap to a binary file.
      Parameters:
      fileName -
      Throws:
      IOException
    • createEvaluator

      public static PotentialProvider createEvaluator(FieldMap fm)
      Create a new PotentialProvider from the given FieldMap. This is typically used when tracking particles in many threads, but we still want to use a single FieldMap object, since it can be very big in memory. Each thread must have a separate PotentialProvider, but the underlying FieldMap can be common.
      Parameters:
      fm - A FieldMap object
      Returns:
      A PotentialProvider.