Go to the documentation of this file.
30 #ifndef vtkAMRGaussianPulseSource_h
31 #define vtkAMRGaussianPulseSource_h
33 #include "vtkFiltersAMRModule.h"
55 vtkSetMacro(Dimension,
int);
62 vtkSetMacro(NumberOfLevels,
int);
69 {this->RefinmentRatio=r;this->
Modified();}
77 this->RootSpacing[0]=this->RootSpacing[1]=this->RootSpacing[2]=h0;
86 vtkSetVector3Macro(PulseOrigin,
double);
87 vtkGetVector3Macro(PulseOrigin,
double);
89 {this->PulseOrigin[0]=f;this->
Modified();}
91 {this->PulseOrigin[1]=f;this->
Modified();}
93 {this->PulseOrigin[2]=f;this->
Modified();}
100 vtkSetVector3Macro(PulseWidth,
double);
101 vtkGetVector3Macro(PulseWidth,
double);
103 {this->PulseWidth[0]=f;this->
Modified();}
105 {this->PulseWidth[1]=f;this->
Modified();}
107 {this->PulseWidth[2]=f;this->
Modified();}
114 vtkSetMacro(PulseAmplitude,
double);
115 vtkGetMacro(PulseAmplitude,
double);
137 double xyz[3]; xyz[0]=x; xyz[1]=y; xyz[2]=z;
138 return( this->ComputePulseAt(xyz) );
144 for(
int i=0; i < this->Dimension; ++i )
146 double d = pt[i]-this->PulseOrigin[i];
148 double L2 = this->PulseWidth[i]*this->PulseWidth[i];
151 pulse = this->PulseAmplitude*std::exp( -r );
162 double centroid[3] );
188 double RootSpacing[3];
189 double PulseOrigin[3];
190 double PulseWidth[3];
vtkAMRGaussianPulseSource()
~vtkAMRGaussianPulseSource() override
vtkUniformGrid * RefinePatch(vtkUniformGrid *parent, int patchExtent[6])
Constructs a refined patch from the given parent grid.
void SetZPulseWidth(double f)
void Generate2DDataSet(vtkOverlappingAMR *amr)
Generate 2-D or 3-D DataSet.
double ComputePulseAt(double pt[3])
void SetZPulseOrigin(double f)
void SetYPulseOrigin(double f)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Modified()
Update the modification time for this object.
static vtkAMRGaussianPulseSource * New()
double ComputePulseAt(const double x, const double y, const double z)
Computes the gaussian pulse at the given location based on the user supplied parameters for pulse wid...
void ComputeCellCenter(vtkUniformGrid *grid, vtkIdType cellIdx, double centroid[3])
Given the cell index w.r.t.
A source that generates sample AMR data with gaussian pulse field.
void SetRefinementRatio(int r)
Set the refinement ratio.
vtkUniformGrid * GetGrid(double origin[3], double h[3], int ndim[3])
Constructs a uniform grid path with the given origin/spacing and node dimensions.
a simple class to control print indentation
A base class for all algorithms that take as input vtkOverlappingAMR and produce vtkOverlappingAMR.
void SetYPulseWidth(double f)
void GeneratePulseField(vtkUniformGrid *grid)
Generates a pulse field for the given uniform grid.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
hierarchical dataset of vtkUniformGrids
void SetXPulseOrigin(double f)
void Generate3DDataSet(vtkOverlappingAMR *amr)
void SetRootSpacing(double h0)
Set the root spacing.
void SetXPulseWidth(double f)
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...