ParaView
vtkPANLHaloFinder.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPANLHaloFinder.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
15 #ifndef vtkPANLHaloFinder_h
16 #define vtkPANLHaloFinder_h
17 
39 #include "vtkPVVTKExtensionsCosmoToolsModule.h" // For export macro
40 #include "vtkUnstructuredGridAlgorithm.h"
41 
42 class vtkMultiProcessController;
43 
44 class VTKPVVTKEXTENSIONSCOSMOTOOLS_EXPORT vtkPANLHaloFinder : public vtkUnstructuredGridAlgorithm
45 {
46  vtkTypeMacro(vtkPANLHaloFinder, vtkUnstructuredGridAlgorithm) public
47  : static vtkPANLHaloFinder* New();
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
55  vtkSetMacro(RunSubHaloFinder, bool) vtkGetMacro(RunSubHaloFinder, bool)
56  vtkBooleanMacro(RunSubHaloFinder, bool)
58 
60 
64  vtkSetMacro(RL, double) vtkGetMacro(RL, double)
66 
68 
73  vtkSetMacro(DistanceConvertFactor, double) vtkGetMacro(DistanceConvertFactor, double)
75 
77 
82  vtkSetMacro(MassConvertFactor, double) vtkGetMacro(MassConvertFactor, double)
84 
86 
91  vtkSetMacro(DeadSize, double) vtkGetMacro(DeadSize, double)
93 
95 
100  vtkSetMacro(ParticleMass, float) vtkGetMacro(ParticleMass, float)
102 
104 
109  vtkSetMacro(BB, double) vtkGetMacro(BB, double)
111 
113 
118  vtkSetClampMacro(AlphaFactor, double, 0.0, 1.0) vtkGetMacro(AlphaFactor, double)
120 
122 
128  vtkSetClampMacro(BetaFactor, double, 0.0, 1.0) vtkGetMacro(BetaFactor, double)
130 
132 
136  vtkSetMacro(NP, int) vtkGetMacro(NP, int)
138 
140 
145  vtkSetMacro(NMin, int) vtkGetMacro(NMin, int)
147 
149 
154  vtkSetMacro(PMin, int) vtkGetMacro(PMin, int)
156 
158 
162  vtkSetMacro(MinFOFSubhaloSize, long) vtkGetMacro(MinFOFSubhaloSize, long)
164 
166 
170  vtkSetMacro(MinCandidateSize, int) vtkGetMacro(MinCandidateSize, int)
172 
174 
178  vtkSetMacro(NumSPHNeighbors, int) vtkGetMacro(NumSPHNeighbors, int)
180 
182 
187  vtkSetMacro(NumNeighbors, int) vtkGetMacro(NumNeighbors, int)
189 
191  NONE = 0,
192  MOST_BOUND_PARTICLE = 1,
193  MOST_CONNECTED_PARTICLE = 2,
194  HIST_CENTER_FINDING = 3
195  };
196 
198 
203  vtkSetMacro(CenterFindingMode, int) vtkGetMacro(CenterFindingMode, int)
205 
207 
211  vtkSetMacro(SmoothingLength, double) vtkGetMacro(SmoothingLength, double)
213 
215 
220  vtkSetMacro(OmegaDM, double) vtkGetMacro(OmegaDM, double)
222 
224 
229  vtkSetMacro(OmegaNU, double) vtkGetMacro(OmegaNU, double)
231 
233 
238  vtkSetMacro(Deut, double) vtkGetMacro(Deut, double)
240 
242 
247  vtkSetMacro(Hubble, double) vtkGetMacro(Hubble, double)
249 
251 
255  vtkSetMacro(RedShift, double) vtkGetMacro(RedShift, double)
257 
258  protected : vtkPANLHaloFinder();
259  virtual ~vtkPANLHaloFinder();
260 
261  virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
262  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
263  int FillInputPortInformation(int port, vtkInformation* info);
264 
265  double RL;
266  double DistanceConvertFactor;
267  double MassConvertFactor;
268  double DeadSize;
269  float ParticleMass;
270  double BB;
271  double AlphaFactor;
272  double BetaFactor;
273  int NP;
274  int NMin;
275  int PMin;
276  long MinFOFSubhaloSize;
277  int MinCandidateSize;
278  int NumSPHNeighbors;
279  int NumNeighbors;
280 
281  bool RunSubHaloFinder;
282 
283  // Center finding parameters
284  int CenterFindingMode;
285  double SmoothingLength;
286  double OmegaNU;
287  double OmegaDM;
288  double Deut;
289  double Hubble;
290  double RedShift;
291 
292  vtkMultiProcessController* Controller;
293 
294  class vtkInternals;
295  vtkInternals* Internal;
296 
297 private:
298  vtkPANLHaloFinder(const vtkPANLHaloFinder&) VTK_DELETE_FUNCTION;
299  void operator=(const vtkPANLHaloFinder&) VTK_DELETE_FUNCTION;
300 
301  void ExtractDataArrays(vtkUnstructuredGrid* input, vtkIdType offset);
302  void DistributeInput();
303  void CreateGhostParticles();
304  void ExecuteHaloFinder(vtkUnstructuredGrid* allParticles, vtkUnstructuredGrid* fofProperties);
305  void ExecuteSubHaloFinder(
306  vtkUnstructuredGrid* allParticles, vtkUnstructuredGrid* subFofProperties);
307  void FindCenters(vtkUnstructuredGrid* allParticles, vtkUnstructuredGrid* fofProperties);
308 };
309 
310 #endif // vtkPANLHaloFinder_h
Given an input a vtkUnstructuredGrid of points with arrays vx, vy, vz, and id, finds clumps of points...