Module simpa.core

Class Tiling

java.lang.Object
simpa.core.api.Tiling

public class Tiling extends Object
The tiling for a machine element.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs the tiling for a machine element with the given tiling config.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    solve(double relativeError, SolverOptions opt)
    Solves the boundary problem with the allowed relative error.
    void
    writeCheckPoints(org.apache.commons.math3.geometry.euclidean.threed.Vector3D translation, double stepSize, double extension)
    Writes checkpoints to a file.
    void
    Writes a file with the coordinates of the surface points on the boundary of the accelerator element.

    Methods inherited from class java.lang.Object

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

    • Tiling

      public Tiling(TilingConfig pars) throws NotSetException
      Constructs the tiling for a machine element with the given tiling config.
      Parameters:
      pars - Tiling config.
      Throws:
      NotSetException - When a required parameter of the tiling config is not set.
  • Method Details

    • writeSurfacePoints

      public void writeSurfacePoints() throws NotSetException
      Writes a file with the coordinates of the surface points on the boundary of the accelerator element.
      Throws:
      NotSetException - When some necessary parameter is not set.
    • writeCheckPoints

      public void writeCheckPoints(org.apache.commons.math3.geometry.euclidean.threed.Vector3D translation, double stepSize, double extension) throws FileNotFoundException, NotSetException
      Writes checkpoints to a file. The points are derived from the path which was used to create the element by up-sampling it.
      Parameters:
      translation - A translation vector to be added to each point of the path file to create the output check file.
      stepSize - Step size for the up-sampling
      extension - If it is non zero, the path will be extended at both ends with the given value.
      Throws:
      FileNotFoundException
      NotSetException
    • solve

      public double solve(double relativeError, SolverOptions opt) throws NotSetException, PositionMismatchException
      Solves the boundary problem with the allowed relative error. It calculates the strengths of the sources such that they reproduce the given field on the boundary surface with the surface points of the tiles with the error margin.
      Parameters:
      relativeError - The allowed relative error.
      Returns:
      The relative residual.
      Throws:
      NotSetException - When a required parameter of the tiling config is not set.
      PositionMismatchException - when a point is not at the expected place.