35 #ifndef __vtkAMRResampleFilter_h
36 #define __vtkAMRResampleFilter_h
38 #include "vtkFiltersAMRModule.h"
39 #include "vtkMultiBlockDataSetAlgorithm.h"
43 class vtkInformationVector;
45 class vtkOverlappingAMR;
46 class vtkMultiBlockDataSet;
47 class vtkMultiProcessController;
59 void PrintSelf(ostream &oss, vtkIndent indent);
64 vtkSetVector3Macro(NumberOfSamples,
int);
65 vtkGetVector3Macro(NumberOfSamples,
int);
70 vtkSetMacro(TransferToNodes,
int);
71 vtkGetMacro(TransferToNodes,
int);
77 vtkSetMacro(DemandDrivenMode,
int);
78 vtkGetMacro(DemandDrivenMode,
int);
83 vtkSetMacro(NumberOfPartitions,
int);
84 vtkGetMacro(NumberOfPartitions,
int);
89 vtkSetVector3Macro(Min,
double);
90 vtkGetVector3Macro(Min,
double);
95 vtkSetVector3Macro(Max,
double);
96 vtkGetVector3Macro(Max,
double);
101 vtkSetMacro(UseBiasVector,
bool);
102 vtkGetMacro(UseBiasVector,
bool);
109 vtkSetVector3Macro(BiasVector,
double);
110 vtkGetVector3Macro(BiasVector,
double);
115 vtkSetMacro(Controller, vtkMultiProcessController*);
116 vtkGetMacro(Controller, vtkMultiProcessController*);
124 virtual int RequestInformation(
125 vtkInformation *rqst,
126 vtkInformationVector **inputVector,
127 vtkInformationVector *outputVector );
130 virtual int RequestData(
131 vtkInformation*,vtkInformationVector**,vtkInformationVector*);
132 virtual int FillInputPortInformation(
int port, vtkInformation *info);
133 virtual int FillOutputPortInformation(
int port, vtkInformation *info);
137 virtual int RequestUpdateExtent(
138 vtkInformation*, vtkInformationVector**, vtkInformationVector* );
147 vtkMultiBlockDataSet *
ROI;
148 int NumberOfSamples[3];
149 int GridNumberOfSamples[3];
160 double BiasVector[3];
180 bool IsRegionMine(
const int regionIdx );
184 int GetRegionProcessId(
const int regionIdx );
189 void ComputeCellCentroid(
190 vtkUniformGrid *g,
const vtkIdType cellIdx,
double c[3] );
197 void InitializeFields( vtkFieldData *f, vtkIdType size, vtkCellData *src );
201 void CopyData( vtkFieldData *
target, vtkIdType targetIdx,
202 vtkCellData *src, vtkIdType srcIdx );
208 bool FoundDonor(
double q[3],vtkUniformGrid *&donorGrid,
int &cellIdx);
215 bool SearchForDonorGridAtLevel(
216 double q[3], vtkOverlappingAMR *amrds,
217 unsigned int level,
unsigned int& gridId,
226 int ProbeGridPointInAMR(
227 double q[3],
unsigned int &donorLevel,
unsigned int& donorGridId,
228 vtkOverlappingAMR *amrds,
unsigned int maxLevel,
bool useCached);
237 int ProbeGridPointInAMRGraph(
double q[3],
238 unsigned int &donorLevel,
unsigned int &donorGridId,
239 vtkOverlappingAMR *amrds,
unsigned int maxLevel,
bool useCached);
245 void TransferToCellCenters(
246 vtkUniformGrid *g, vtkOverlappingAMR *amrds );
252 void TransferToGridNodes(
253 vtkUniformGrid *g, vtkOverlappingAMR *amrds );
258 void TransferSolution(
259 vtkUniformGrid *g, vtkOverlappingAMR *amrds);
265 vtkOverlappingAMR *amrds, vtkMultiBlockDataSet *mbds,
266 vtkOverlappingAMR *metadata );
271 bool IsBlockWithinBounds(
double *grd );
276 void ComputeAMRBlocksToLoad( vtkOverlappingAMR *metadata );
280 void ComputeRegionParameters(
281 vtkOverlappingAMR *amrds,
282 int N[3],
double min[3],
double max[3],
double h[3] );
287 void GetDomainParameters(
288 vtkOverlappingAMR *amr,
289 double domainMin[3],
double domainMax[3],
double h[3],
290 int dims[3],
double &rf );
295 bool RegionIntersectsWithAMR(
296 double domainMin[3],
double domainMax[3],
297 double regionMin[3],
double regionMax[3] );
303 void AdjustNumberOfSamplesInRegion(
const double Rh[3],
304 const bool outside[6],
int N[3] );
311 void ComputeLevelOfResolution(
312 const int N[3],
const double h0[3],
const double L[3],
const double rf);
322 const double h0[3],
const double domainMin[3],
const double domainMax[3],
323 const int dims[3],
bool outside[6] );
331 void ComputeAndAdjustRegionParameters(
332 vtkOverlappingAMR *amrds,
double h[3] );
336 void GetRegion(
double h[3] );
339 bool GridsIntersect(
double *g1,
double *g2 );
342 vtkUniformGrid* GetReferenceGrid( vtkOverlappingAMR *amrds );
353 void SearchGridDecendants(
double q[3],
354 vtkOverlappingAMR *amrds,
355 unsigned int maxLevel,
357 unsigned int &gridId,
364 bool SearchGridAncestors(
double q[3],
365 vtkOverlappingAMR *amrds,
367 unsigned int &gridId,
vtkMultiProcessController * Controller
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkOverlappingAMR * AMRMetaData
vtkMultiBlockDataSet * ROI
int NumberOfBlocksTestedForLevel
std::vector< int > BlocksToLoad
int NumberOfTimesLevelDown
int NumberOfBlocksVisSkipped
int NumberOfTimesFoundOnDonorLevel
VTKWRAPPINGJAVA_EXPORT jlong q(JNIEnv *env, jobject obj)