29 #ifndef VTKAMRGAUSSIANPULSESOURCE_H_
30 #define VTKAMRGAUSSIANPULSESOURCE_H_
32 #include "vtkFiltersAMRModule.h"
33 #include "vtkOverlappingAMRAlgorithm.h"
37 class vtkOverlappingAMR;
40 class vtkInformationVector;
43 public vtkOverlappingAMRAlgorithm
48 void PrintSelf(ostream& os, vtkIndent indent);
52 vtkSetMacro(Dimension,
int);
57 vtkSetMacro(NumberOfLevels,
int);
63 {this->RefinmentRatio=r;this->Modified();}
70 this->RootSpacing[0]=this->RootSpacing[1]=this->RootSpacing[2]=h0;
77 vtkSetVector3Macro(PulseOrigin,
double);
78 vtkGetVector3Macro(PulseOrigin,
double);
80 {this->PulseOrigin[0]=f;this->Modified();}
82 {this->PulseOrigin[1]=f;this->Modified();}
84 {this->PulseOrigin[2]=f;this->Modified();}
89 vtkSetVector3Macro(PulseWidth,
double);
90 vtkGetVector3Macro(PulseWidth,
double);
92 {this->PulseWidth[0]=f;this->Modified();}
94 {this->PulseWidth[1]=f;this->Modified();}
96 {this->PulseWidth[2]=f;this->Modified();}
101 vtkSetMacro(PulseAmplitude,
double);
102 vtkGetMacro(PulseAmplitude,
double);
112 virtual int RequestData(vtkInformation *request,
113 vtkInformationVector **inputVector,
114 vtkInformationVector *outputVector);
122 double xyz[3]; xyz[0]=x; xyz[1]=y; xyz[2]=z;
123 return( this->ComputePulseAt(xyz) );
129 for(
int i=0; i < this->Dimension; ++i )
131 double d = pt[i]-this->PulseOrigin[i];
133 double L2 = this->PulseWidth[i]*this->PulseWidth[i];
136 pulse = this->PulseAmplitude*std::exp( -r );
144 void ComputeCellCenter(vtkUniformGrid *grid,
146 double centroid[3] );
150 void GeneratePulseField(vtkUniformGrid *grid);
154 vtkUniformGrid* GetGrid(
double origin[3],
double h[3],
int ndim[3] );
157 vtkUniformGrid* RefinePatch(vtkUniformGrid* parent,
int patchExtent[6]);
161 void Generate2DDataSet(vtkOverlappingAMR* amr);
162 void Generate3DDataSet(vtkOverlappingAMR* amr);
165 double RootSpacing[3];
166 double PulseOrigin[3];
167 double PulseWidth[3];
void SetZPulseOrigin(double f)
void SetYPulseWidth(double f)
void SetXPulseWidth(double f)
double ComputePulseAt(const double x, const double y, const double z)
void SetRootSpacing(double h0)
double ComputePulseAt(double pt[3])
void SetYPulseOrigin(double f)
void SetZPulseWidth(double f)
void SetRefinementRatio(int r)
void SetXPulseOrigin(double f)