openPSTD  2.0
Open source simulation for sound propagation in urban environments
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenPSTD::Kernel::Solver Class Reference

Component that computes the state variables of the scene for consecutive time steps. More...

#include <Solver.h>

Inheritance diagram for OpenPSTD::Kernel::Solver:
Inheritance graph
Collaboration diagram for OpenPSTD::Kernel::Solver:
Collaboration graph

Public Member Functions

 Solver (std::shared_ptr< Scene > scene, KernelCallback *callback)
 Solver constructor (abstract). More...
 
void compute_propagation ()
 Start the simulation solver. More...
 

Protected Member Functions

void update_field_values (std::shared_ptr< Domain > domain, unsigned long rk_step)
 Updates the pressure and velocity fields of the domains to the new values computed in the RK scheme. More...
 
PSTD_FRAME_PTR get_pressure_vector ()
 The GUI format for pressure fields. More...
 

Protected Attributes

KernelCallbackcallback
 
int number_of_time_steps
 The final number of computed frames.
 

Detailed Description

Component that computes the state variables of the scene for consecutive time steps.

This is an abstract class, implemented in single/multi-threaded solvers. Based on the settings and the scene, the solver repeatedly executes the PSTD method to approximate the pressure and velocity. The time integration is performed with a RK6 method described in <paper>.

Constructor & Destructor Documentation

OpenPSTD::Kernel::Solver::Solver ( std::shared_ptr< Scene scene,
KernelCallback callback 
)

Solver constructor (abstract).

Initialized parameters for running the openPSTD algorithm

Parameters
scenePointer to scene object.
callbackPointer to callback function
Returns
: New solver object.

Member Function Documentation

void OpenPSTD::Kernel::Solver::compute_propagation ( )

Start the simulation solver.

Runs until the simulation is finished, but meanwhile makes calls to the callback. A more badass name is welcome

PSTD_FRAME_PTR OpenPSTD::Kernel::Solver::get_pressure_vector ( )
protected

The GUI format for pressure fields.

Returns
PSTD_FRAME (shared pointer to float vector)
void OpenPSTD::Kernel::Solver::update_field_values ( std::shared_ptr< Domain domain,
unsigned long  rk_step 
)
protected

Updates the pressure and velocity fields of the domains to the new values computed in the RK scheme.

Parameters
domainDomain under consideration
rk_stepsub-step of RK6 method

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