Basics
Documentation
Examples
Basics
Documentation
Examples
This is an old revision of the document!
As mentioned in the computational domain section, everything is computed on rectangular domain consisting of rectangular voxels. Ways of loading medium data from different input file types are described there as well.
Here we describe more in detail how to prepare these input files. If VTK file input is used, the files are typically prepared using some script, directly writing the regular unstructured mesh VTK file (ASCII format). This is the simplest 3D input format possible. Every voxel is addressed by an integer, which should correspond to entries in the materials file. Material with index 0 is always vacuum, the others can be defined freely in the materials file. The total span of integer values in the VTK file should match (or be smaller) than the number material file entries.
In case of vector file input, the information is provided in a form of simple geometric entities (e.g. a sphere) that are placed to the computational domain and interpreted by the software. In general, object entries are composed from the object type (integer), positions and sizes (doubles). The last entry is always the material index, which again should match the materials file. Object type numbers and related syntax is the same like for the Gsvit software, so some of the conventions might look unusual from Xraytrace perspective and are used only for compatibility purposes. The following rules are used in the data interpretation:
The following examples of the vector file input lines show the objects that can be entered:
A sphere (object type==4) is set by its center coordinates followed by radius and material index as shown in the following example:
4 100 100 100 20 2
This puts a sphere to the voxel position of 100,100,100, with radius of 20 voxels and filled by material index equal to 2.
A rectangular box (object type==8) is set by its bottom-left-front and top-right-back voxel positions followed by the material index:
8 0 0 0 400 400 100 2
If our computational domain is a box of 400x400x200 voxels, this fills half of it (e.g. providing a substrate for further calculations), with material of index equal to 2.