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

Simulate the propagation of the acoustic wave in lossy media using the finite-difference time-domain method. More...

#include <ACFDTD22.hpp>

Inheritance diagram for ACFDTD22:
ACFDTD22MemEfficient

Public Member Functions

 ACFDTD22 ()
 ACFDTD22 (const double frequency, const double cfl_number)
virtual void calcCoefficients (const Model &model, const Grid &grid)
 Calculate the coefficients of the FDTD update equations.
virtual void execute (const Grid &grid, const CartPosition &sig_loc, const Function *signal, const double time_span, const std::vector< Sensor * > &sen_vec, const unsigned negY=BC_PRESS, const unsigned posY=BC_PRESS, const unsigned negZ=BC_PRESS, const unsigned posZ=BC_PRESS)
 Engine to handle the hard acoustic pressure source.
virtual void execute (const Model &model, const Grid &grid, const HardPlaneWaveSource &source, const double time_span, const std::vector< Sensor * > &sen_vec, const unsigned negY=BC_PRESS, const unsigned posY=BC_PRESS, const unsigned negZ=BC_PRESS, const unsigned posZ=BC_PRESS)
 Engine to handle the hard plane wave source.
virtual double getDeltaT () const
virtual unsigned getnTimeSteps () const
virtual ~ACFDTD22 ()

Protected Attributes

UniqueCoefficientContainer container
 populated in ACFDTD22::calcCoefficients()
std::string sim_name
double f_c
 Central frequency.
double S
 CFL number.
double dt
 temporal step.
unsigned nTimeSteps
 Initialized in ACFDTD22::execute().

Private Member Functions

void parseModel (const Model &model, const Grid &grid)
 Update the cofficients pra, prb, prc, prd, pred and uya, uyb, uyc, uza, uzb, uzc.

Private Attributes

unsigned short ** bya
unsigned short ** byb
unsigned short ** bza
unsigned short ** bzb
unsigned short ** pra
unsigned short ** prb
unsigned short ** prc
unsigned short ** prd
unsigned short ** pre
unsigned short ** aya
unsigned short ** ayb
unsigned short ** aza
unsigned short ** azb
unsigned short ** uya
unsigned short ** uyb
unsigned short ** uyc
unsigned short ** uza
unsigned short ** uzb
unsigned short ** uzc

Detailed Description

Simulate the propagation of the acoustic wave in lossy media using the finite-difference time-domain method.

Constructor & Destructor Documentation

ACFDTD22::ACFDTD22 ( )
ACFDTD22::ACFDTD22 ( const double  frequency,
const double  cfl_number 
)
ACFDTD22::~ACFDTD22 ( )
virtual

Member Function Documentation

void ACFDTD22::calcCoefficients ( const Model model,
const Grid grid 
)
virtual

Calculate the coefficients of the FDTD update equations.

If the Model contains the PML around its boundaries, this function also calculates the coefficients in the PML region. See notes on 2012-05-14 for the expression of the coefficients.

Reimplemented in ACFDTD22MemEfficient.

virtual void ACFDTD22::execute ( const Grid grid,
const CartPosition sig_loc,
const Function signal,
const double  time_span,
const std::vector< Sensor * > &  sen_vec,
const unsigned  negY = BC_PRESS,
const unsigned  posY = BC_PRESS,
const unsigned  negZ = BC_PRESS,
const unsigned  posZ = BC_PRESS 
)
virtual

Engine to handle the hard acoustic pressure source.

Reimplemented in ACFDTD22MemEfficient.

virtual void ACFDTD22::execute ( const Model model,
const Grid grid,
const HardPlaneWaveSource source,
const double  time_span,
const std::vector< Sensor * > &  sen_vec,
const unsigned  negY = BC_PRESS,
const unsigned  posY = BC_PRESS,
const unsigned  negZ = BC_PRESS,
const unsigned  posZ = BC_PRESS 
)
virtual

Engine to handle the hard plane wave source.

On the boundary conditions, if BC_PRESS is specified on a boundary, the acoustic pressure is set to 0 on that boundary.

If BC_RIGID is specified on a boundary, the particle velocity normal to the boundary is set to 0.

If BC_PERIODIC is specifified on a boundary, then it is assumed that BC_PERIODIC is also specified on the opposite boundary. The values of the acoustic pressure on the positive boundary are copied to the values of the acoustic pressure on the negative boundary to impose the periodicity.

Reimplemented in ACFDTD22MemEfficient.

double ACFDTD22::getDeltaT ( ) const
virtual
unsigned ACFDTD22::getnTimeSteps ( ) const
virtual
void ACFDTD22::parseModel ( const Model model,
const Grid grid 
)
private

Update the cofficients pra, prb, prc, prd, pred and uya, uyb, uyc, uza, uzb, uzc.

Member Data Documentation

unsigned short** ACFDTD22::aya
private
unsigned short ** ACFDTD22::ayb
private
unsigned short ** ACFDTD22::aza
private
unsigned short ** ACFDTD22::azb
private
unsigned short** ACFDTD22::bya
private
unsigned short ** ACFDTD22::byb
private
unsigned short ** ACFDTD22::bza
private
unsigned short ** ACFDTD22::bzb
private
UniqueCoefficientContainer ACFDTD22::container
protected
double ACFDTD22::dt
protected

temporal step.

Initialized in calcCoefficient().

double ACFDTD22::f_c
protected

Central frequency.

unsigned ACFDTD22::nTimeSteps
protected

Initialized in ACFDTD22::execute().

unsigned short** ACFDTD22::pra
private
unsigned short ** ACFDTD22::prb
private
unsigned short ** ACFDTD22::prc
private
unsigned short ** ACFDTD22::prd
private
unsigned short ** ACFDTD22::pre
private
double ACFDTD22::S
protected

CFL number.

std::string ACFDTD22::sim_name
protected
unsigned short** ACFDTD22::uya
private
unsigned short ** ACFDTD22::uyb
private
unsigned short ** ACFDTD22::uyc
private
unsigned short ** ACFDTD22::uza
private
unsigned short ** ACFDTD22::uzb
private
unsigned short ** ACFDTD22::uzc
private

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