java.lang.Object
simpa.core.api.Tiling
The tiling for a machine element.
-
Constructor Summary
ConstructorsConstructorDescriptionTiling
(TilingConfig pars) Constructs the tiling for a machine element with the given tiling config. -
Method Summary
Modifier and TypeMethodDescriptiondouble
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.
-
Constructor Details
-
Tiling
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
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-samplingextension
- 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.
-