30 #ifndef vtkAMRGaussianPulseSource_h
31 #define vtkAMRGaussianPulseSource_h
33 #include "vtkFiltersAMRModule.h"
38 VTK_ABI_NAMESPACE_BEGIN
55 vtkSetMacro(Dimension,
int);
62 vtkSetMacro(NumberOfLevels,
int);
70 this->RefinmentRatio = r;
80 this->RootSpacing[0] = this->RootSpacing[1] = this->RootSpacing[2] = h0;
89 vtkSetVector3Macro(PulseOrigin,
double);
90 vtkGetVector3Macro(PulseOrigin,
double);
93 this->PulseOrigin[0] = f;
98 this->PulseOrigin[1] = f;
103 this->PulseOrigin[2] = f;
112 vtkSetVector3Macro(PulseWidth,
double);
113 vtkGetVector3Macro(PulseWidth,
double);
116 this->PulseWidth[0] = f;
121 this->PulseWidth[1] = f;
126 this->PulseWidth[2] = f;
135 vtkSetMacro(PulseAmplitude,
double);
136 vtkGetMacro(PulseAmplitude,
double);
161 return (this->ComputePulseAt(xyz));
167 for (
int i = 0; i < this->Dimension; ++i)
169 double d = pt[i] - this->PulseOrigin[i];
171 double L2 = this->PulseWidth[i] * this->PulseWidth[i];
174 pulse = this->PulseAmplitude * std::exp(-r);
209 double RootSpacing[3];
210 double PulseOrigin[3];
211 double PulseWidth[3];
222 VTK_ABI_NAMESPACE_END
A source that generates sample AMR data with gaussian pulse field.
vtkUniformGrid * RefinePatch(vtkUniformGrid *parent, int patchExtent[6])
Constructs a refined patch from the given parent grid.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double ComputePulseAt(double pt[3])
Computes the gaussian pulse at the given location based on the user supplied parameters for pulse wid...
void Generate3DDataSet(vtkOverlappingAMR *amr)
Generate 2-D or 3-D DataSet.
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...
~vtkAMRGaussianPulseSource() override
void SetZPulseWidth(double f)
Set & Get macro for the pulse width.
vtkAMRGaussianPulseSource()
void SetRootSpacing(double h0)
Set the root spacing.
void SetZPulseOrigin(double f)
Set & Get macro for the pulse origin.
void SetYPulseWidth(double f)
Set & Get macro for the pulse width.
static vtkAMRGaussianPulseSource * New()
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void SetYPulseOrigin(double f)
Set & Get macro for the pulse origin.
void SetRefinementRatio(int r)
Set the refinement ratio.
void Generate2DDataSet(vtkOverlappingAMR *amr)
Generate 2-D or 3-D DataSet.
vtkUniformGrid * GetGrid(double origin[3], double h[3], int ndim[3])
Constructs a uniform grid path with the given origin/spacing and node dimensions.
void SetXPulseOrigin(double f)
Set & Get macro for the pulse origin.
void GeneratePulseField(vtkUniformGrid *grid)
Generates a pulse field for the given uniform grid.
void SetXPulseWidth(double f)
Set & Get macro for the pulse width.
void ComputeCellCenter(vtkUniformGrid *grid, vtkIdType cellIdx, double centroid[3])
Given the cell index w.r.t.
a simple class to control print indentation
virtual void Modified()
Update the modification time for this object.
A base class for all algorithms that take as input vtkOverlappingAMR and produce vtkOverlappingAMR.
hierarchical dataset of vtkUniformGrids
Computes the portion of a dataset which is inside a selection.