Acoustic FDTD Solver
Public Member Functions | Private Attributes | List of all members
GaussianModulatedSinusoid Class Reference

#include <GaussianModulatedSinusoid.hpp>

Inheritance diagram for GaussianModulatedSinusoid:
Function

Public Member Functions

 GaussianModulatedSinusoid ()
 GaussianModulatedSinusoid (const double magnitude, const double frequency, const double mean, const double std_dev)
 Create a Gaussian modulated sinusoid signal.
virtual double getValue (const double x) const
 Evaluate the function at x.
virtual void setScale (const double magnitude)
virtual double getDf (const double x) const
 Evaluate the first-order derivative at x.
virtual double getFrequency () const
 return the central frequency
int getType () const
virtual ~GaussianModulatedSinusoid ()
- Public Member Functions inherited from Function
 Function ()
double rtnewt (const double x1, const double x2, const double xacc) const
 Use the Newton-Raphson method, find the root of a function known to line in the interval [x1, x2].
double rtsecan (double xn_1, double xn, const double xacc) const
 o * Use the secant method to find the root of a function with the initial guess at xn_1 and xn.
virtual ~Function ()

Private Attributes

double A
 Peak amplitude.
double f_c
 Carrier frequency.
double mu
 Temporal delay, equal to 7*sigma to ensure a smooth transition from 0 to non zero.
double sigma
 Temporal variance.

Constructor & Destructor Documentation

GaussianModulatedSinusoid::GaussianModulatedSinusoid ( )
GaussianModulatedSinusoid::GaussianModulatedSinusoid ( const double  magnitude,
const double  frequency,
const double  mean,
const double  std_dev 
)

Create a Gaussian modulated sinusoid signal.

The peak of the Gaussian envelop is aligned with the zero of the sinusoid.

The exact function implemented here is

$ g(x) = A e^{-\frac{(x-\mu)^2}{2\sigma^2}}\sin(2\pi f_c x + \theta) $

where $ \theta = -2\pi f_c \mu $.

Parameters
magnitude$ A $
frequency$ f_c $
mean$ \mu $
std_dev$ \sigma $
virtual GaussianModulatedSinusoid::~GaussianModulatedSinusoid ( )
inlinevirtual

Member Function Documentation

double GaussianModulatedSinusoid::getDf ( const double  x) const
virtual

Evaluate the first-order derivative at x.

Reimplemented from Function.

double GaussianModulatedSinusoid::getFrequency ( ) const
virtual

return the central frequency

Reimplemented from Function.

int GaussianModulatedSinusoid::getType ( ) const
double GaussianModulatedSinusoid::getValue ( const double  x) const
virtual

Evaluate the function at x.

Reimplemented from Function.

void GaussianModulatedSinusoid::setScale ( const double  magnitude)
virtual

Reimplemented from Function.

Member Data Documentation

double GaussianModulatedSinusoid::A
private

Peak amplitude.

double GaussianModulatedSinusoid::f_c
private

Carrier frequency.

double GaussianModulatedSinusoid::mu
private

Temporal delay, equal to 7*sigma to ensure a smooth transition from 0 to non zero.

Avoid high-frequency component

double GaussianModulatedSinusoid::sigma
private

Temporal variance.


The documentation for this class was generated from the following files: