30 #ifndef vtkAMRGaussianPulseSource_h
31 #define vtkAMRGaussianPulseSource_h
33 #include "vtkFiltersAMRModule.h"
54 vtkSetMacro(Dimension,
int);
61 vtkSetMacro(NumberOfLevels,
int);
69 this->RefinmentRatio = r;
79 this->RootSpacing[0] = this->RootSpacing[1] = this->RootSpacing[2] = h0;
88 vtkSetVector3Macro(PulseOrigin,
double);
89 vtkGetVector3Macro(PulseOrigin,
double);
92 this->PulseOrigin[0] = f;
97 this->PulseOrigin[1] = f;
102 this->PulseOrigin[2] = f;
111 vtkSetVector3Macro(PulseWidth,
double);
112 vtkGetVector3Macro(PulseWidth,
double);
115 this->PulseWidth[0] = f;
120 this->PulseWidth[1] = f;
125 this->PulseWidth[2] = f;
134 vtkSetMacro(PulseAmplitude,
double);
135 vtkGetMacro(PulseAmplitude,
double);
160 return (this->ComputePulseAt(xyz));
166 for (
int i = 0; i < this->Dimension; ++i)
168 double d = pt[i] - this->PulseOrigin[i];
170 double L2 = this->PulseWidth[i] * this->PulseWidth[i];
173 pulse = this->PulseAmplitude * std::exp(-r);
193 vtkUniformGrid* GetGrid(
double origin[3],
double h[3],
int ndim[3]);
208 double RootSpacing[3];
209 double PulseOrigin[3];
210 double PulseWidth[3];
void SetZPulseOrigin(double f)
Set & Get macro for the pulse origin.
void SetYPulseWidth(double f)
Set & Get macro for the pulse width.
A base class for all algorithms that take as input vtkOverlappingAMR and produce vtkOverlappingAMR.
A source that generates sample AMR data with gaussian pulse field.
void SetXPulseWidth(double f)
Set & Get macro for the pulse width.
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...
a simple class to control print indentation
void SetRootSpacing(double h0)
Set the root spacing.
virtual void Modified()
Update the modification time for this object.
double ComputePulseAt(double pt[3])
Computes the gaussian pulse at the given location based on the user supplied parameters for pulse wid...
void SetYPulseOrigin(double f)
Set & Get macro for the pulse origin.
hierarchical dataset of vtkUniformGrids
void SetZPulseWidth(double f)
Set & Get macro for the pulse width.
void SetRefinementRatio(int r)
Set the refinement ratio.
void SetXPulseOrigin(double f)
Set & Get macro for the pulse origin.
static vtkOverlappingAMRAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.