8 #ifndef TRACKGENERATOR3D_H_ 9 #define TRACKGENERATOR3D_H_ 97 Track**** _tracks_2D_chains;
100 int*** _tracks_per_stack;
104 long*** _cum_tracks_per_stack;
108 long** _cum_tracks_per_xy;
111 int*** _first_lz_of_stack;
129 std::vector<double> _segmentation_heights;
132 std::vector<double> _global_z_mesh;
135 int _num_seg_matrix_rows;
136 int _num_seg_matrix_columns;
140 std::vector<segment*> _temporary_segments;
141 bool _contains_temporary_segments;
145 std::vector<Track3D*> _temporary_3D_tracks;
146 std::vector<Track**> _temporary_tracks_array;
147 bool _contains_temporary_tracks;
151 int _max_num_tracks_per_stack;
155 bool _contains_3D_tracks;
156 bool _contains_3D_segments;
157 bool _contains_global_z_mesh;
158 bool _contains_segmentation_heights;
161 void initializeTracks();
162 void initialize2DTrackChains();
163 void recalibrateTracksToOrigin();
165 void setContainsSegments(
bool contains_segments);
166 void allocateTemporarySegments();
167 void allocateTemporaryTracks();
169 void initializeDefaultQuadrature();
170 std::string getTestFilename(std::string directory);
174 void segmentizeExtruded();
176 bool create_arrays,
bool save_tracks);
180 void writeExtrudedFSRInfo(FILE* out);
181 void readExtrudedFSRInfo(FILE* in);
186 double azim_spacing,
double z_spacing);
203 int getNumZ(
int azim,
int polar);
204 int getNumL(
int azim,
int polar);
225 bool outgoing,
Track3D* track);
void retrieveSingle3DTrackCoords(double coords[6], long track_id)
Fills an array with the x,y,z coordinates for a given track.
Definition: TrackGenerator3D.cpp:1363
void retrieveGlobalZMesh(double *&z_mesh, int &num_fsrs)
Provides the global z-mesh and size if available.
Definition: TrackGenerator3D.cpp:479
int getNumPolar()
Return the number of polar angles in .
Definition: TrackGenerator3D.cpp:121
void retrieve3DTrackCoords(double *coords, long num_tracks)
Fills an array with the x,y,z coordinates for each Track.
Definition: TrackGenerator3D.cpp:528
void getTSIByIndex(long id, TrackStackIndexes *tsi)
Updates stack indexes to reflect those from the given Track ID.
Definition: TrackGenerator3D.cpp:2382
bool containsTracks()
Returns whether or not the TrackGenerator contains Tracks for its current number of azimuthal angles...
Definition: TrackGenerator3D.cpp:1672
virtual ~TrackGenerator3D()
Destructor frees memory for all Tracks.
Definition: TrackGenerator3D.cpp:42
Track3D * getTemporary3DTracks(int thread_id)
Returns an array of temporary 3D Tracks for use in on-the-fly computations.
Definition: TrackGenerator3D.cpp:278
void checkBoundaryConditions()
Checks the boundary conditions for all 3D surfaces for inconsistent periodic boundary conditions...
Definition: TrackGenerator3D.cpp:1551
int _azim
Definition: TrackGenerator3D.h:57
int _z
Definition: TrackGenerator3D.h:66
A Track chain represents a list of Tracks connected via periodic BCs that extend in the l-z plane and...
Definition: TrackGenerator3D.h:21
void setDesiredZSpacing(double spacing)
Set the suggested track polar spacing (cm).
Definition: TrackGenerator3D.cpp:367
double getZSpacing(int azim, int polar)
Returns the spacing between tracks in the axial direction for the requested azimuthal angle index and...
Definition: TrackGenerator3D.cpp:210
void retrieveTrackCoords(double *coords, long num_tracks)
Fills an array with the x,y,z coordinates for each Track.
Definition: TrackGenerator3D.cpp:507
int _x
Definition: TrackGenerator3D.h:27
int getNum3DTrackChainLinks(TrackChainIndexes *tci)
Calculates the number of Tracks in the l-z traversal.
Definition: TrackGenerator3D.cpp:1821
The TrackGenerator is dedicated to generating and storing Tracks which cyclically wrap across the Geo...
Definition: TrackGenerator.h:36
bool containsSegments()
Returns whether or not the TrackGenerator contains 3D segments for its current number of azimuthal an...
Definition: TrackGenerator3D.cpp:1683
int getNumColumns()
Returns the number of columns in the temporary segment storage matrix.
Definition: TrackGenerator3D.cpp:248
segmentationType
The types of Track segmentation supported by OpenMOC.
Definition: segmentation_type.h:15
A stack track represents a track in a z-stack of tracks and this struct contains the azim...
Definition: TrackGenerator3D.h:54
void setSegmentationZones(std::vector< double > z_mesh)
Sets the z-planes over which 2D segmentation is performed for on-the-fly calculations.
Definition: TrackGenerator3D.cpp:396
void convertTCItoTSI(TrackChainIndexes *tci, TrackStackIndexes *tsi)
Converts TrackChainIndexes to TrackStackIndexes.
Definition: TrackGenerator3D.cpp:1779
Track3D **** get3DTracks()
Get the array of 3D Tracks, only used in EXPLICT-3D ray tracing.
Definition: TrackGenerator3D.cpp:1752
TrackChainIndexes()
Definition: TrackGenerator3D.h:39
A 3D Track represents a characteristic line across the geometry.
Definition: Track3D.h:35
int _polar
Definition: TrackGenerator3D.h:30
The master class containing references to all geometry-related objects - Surfaces, Cells, Universes and Lattices - and Materials.
Definition: Geometry.h:122
int *** getTracksPerStack()
Returns a 3D array of the number of 3D Tracks in each z-stack.
Definition: TrackGenerator3D.cpp:315
void setSegmentFormation(segmentationType segmentation_type)
Set the type of segmentation used for segment formation.
Definition: TrackGenerator3D.cpp:385
A segment represents a line segment within a single flat source region along a track.
Definition: Track.h:27
void convertTSItoTCI(TrackStackIndexes *tsi, TrackChainIndexes *tci)
Converts TrackStackIndexes to TrackChainIndexes.
Definition: TrackGenerator3D.cpp:1762
void create3DTracksArrays()
Allocates memory for 3D Tracks.
Definition: TrackGenerator3D.cpp:1404
segment * getTemporarySegments(int thread_id)
Returns an array of temporary segments for use in on-the-fly computations.
Definition: TrackGenerator3D.cpp:265
The TrackGenerator class.
long get3DTrackID(TrackStackIndexes *tsi)
Returns the 3D Track ID based on its indexes.
Definition: TrackGenerator3D.cpp:1456
double getDesiredZSpacing()
Return the track polar spacing (cm).
Definition: TrackGenerator3D.cpp:133
void setLinkingTracks(TrackStackIndexes *tsi, TrackChainIndexes *tci, bool outgoing, Track3D *track)
Fills the provided 3D Track with its linking information.
Definition: TrackGenerator3D.cpp:1864
long getNum3DSegments()
Return the total number of 3D Track segments across the Geometry.
Definition: TrackGenerator3D.cpp:173
long getNum3DTracks()
Return the total number of 3D Tracks across the Geometry.
Definition: TrackGenerator3D.cpp:151
void setNumPolar(int num_polar)
Set the number of polar angles in .
Definition: TrackGenerator3D.cpp:348
int getNumRows()
Returns the number of rows in the temporary segment storage matrix.
Definition: TrackGenerator3D.cpp:233
int _azim
Definition: TrackGenerator3D.h:24
bool containsTemporaryTracks()
Returns whether or not the TrackGenerator contains an allocation for temporary Tracks to be filled on...
Definition: TrackGenerator3D.cpp:303
void useGlobalZMesh()
Sets a global z-mesh to use during axial on-the-fly ray tracing.
Definition: TrackGenerator3D.cpp:463
int getLinkIndex(TrackChainIndexes *tci)
Returns the index into the chain based on chain indexes.
Definition: TrackGenerator3D.cpp:1796
TrackGenerator3D(Geometry *geometry, int num_azim, int num_polar, double azim_spacing, double z_spacing)
Constructor for the TrackGenerator3D assigns default values.
Definition: TrackGenerator3D.cpp:13
void retrieve3DSegmentCoords(double *coords, long num_segments)
Fills an array with the x,y coordinates for each Track segment.
Definition: TrackGenerator3D.cpp:604
void getTrackOTF(Track3D *track, TrackStackIndexes *tsi)
Updates the provided Track with the correct information based on the Track indexes.
Definition: TrackGenerator3D.cpp:1697
int _xy
Definition: TrackGenerator3D.h:60
int _polar
Definition: TrackGenerator3D.h:63
long getNumSegments()
Return the total number of Track segments across the Geometry.
Definition: TrackGenerator3D.cpp:164
void retrieveSegmentCoords(double *coords, long num_segments)
Fills an array with the x,y,z coordinates for each Track segment.
Definition: TrackGenerator3D.cpp:582
TrackStackIndexes()
Definition: TrackGenerator3D.h:69
Track ** getTemporaryTracksArray(int thread_id)
Returns an array of pointers to temporary Tracks for use in on-the-fly computations.
Definition: TrackGenerator3D.cpp:291
void setLinkIndex(TrackChainIndexes *tci, TrackStackIndexes *tsi)
Updates the index into the 3D chain based on chain and stack indexes.
Definition: TrackGenerator3D.cpp:1807
int _lz
Definition: TrackGenerator3D.h:33
int getNumL(int azim, int polar)
Returns the number of 3D Tracks in the radial direction for a given azimuthal angle index and polar a...
Definition: TrackGenerator3D.cpp:339
A Track represents a characteristic line across the geometry.
Definition: Track.h:67
int getNumZ(int azim, int polar)
Returns the number of 3D Tracks in the z-direction for a given azimuthal angle index and polar angle ...
Definition: TrackGenerator3D.cpp:327
long getNumTracks()
Return the total number of 3D Tracks across the Geometry.
Definition: TrackGenerator3D.cpp:142
The TrackGenerator3D is dedicated to generating and storing Tracks which cyclically wrap across the G...
Definition: TrackGenerator3D.h:86
int getMaxNumTracksPerStack()
Returns the maximum number of tracks in a single stack.
Definition: TrackGenerator3D.cpp:219
int _link
Definition: TrackGenerator3D.h:36