UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sim::fdm::SimulatorIso Class Reference

#include <sim_fdm_simulator_iso.hpp>

Public Member Functions

sim::ErrCode init (const Snapshot::Area &snapshot_area, const VelModel< sim::VmParamsIso > &vm)
 
sim::ErrCode init (const Snapshot::Area &snapshot_area, const VelModel< sim::VmParamsIso > &vm, const Source &source)
 
void addSource (const Source &source)
 
void clearSources ()
 
sim::ErrCode operator() (const TimeT &dt, WaveField &wf) const
 
void setExecutionFlag (const bool flag)
 
virtual void snapshotCallback (const TimeT &t, const TimeT &tmax, const Snapshot &snapshot) const
 

Protected Member Functions

void time_grid_step (Snapshot &fp, Snapshot &f, const Snapshot &fn) const
 
void modelling (SchemeIsoIt &scheme_it) const
 
AmplT interpol_ampl (const TimeT &t1, const AmplT &a1, const TimeT &t2, const AmplT &a2, const TimeT &t) const
 

Protected Attributes

Snapshot::Area m_snapshot_area
 
std::vector< Sourcem_sources_vec
 
GridIso m_grid
 
bool m_execution_flag
 

Detailed Description

Isotropic model finite-differences simulation.

Member Function Documentation

void sim::fdm::SimulatorIso::addSource ( const Source source)
Add new source function. 
Parameters
sourceSource function.
void sim::fdm::SimulatorIso::clearSources ( )

Remove all sources

sim::ErrCode sim::fdm::SimulatorIso::init ( const Snapshot::Area snapshot_area,
const VelModel< sim::VmParamsIso > &  vm 
)
Reinitialize simulator. 
Parameters
snapshot_areaSnapshot x and z coordinates area.
vmVelocity model.
Returns
error code (EC_OK if all good).
sim::ErrCode sim::fdm::SimulatorIso::init ( const Snapshot::Area snapshot_area,
const VelModel< sim::VmParamsIso > &  vm,
const Source source 
)
Reinitialize simulator. 
Parameters
snapshot_areaSnapshot x and z coordinates area.
vmVelocity model.
sourceSource function.
Returns
error code (EC_OK if all good).
AmplT sim::fdm::SimulatorIso::interpol_ampl ( const TimeT &  t1,
const AmplT &  a1,
const TimeT &  t2,
const AmplT &  a2,
const TimeT &  t 
) const
protected

Linear interpolation of amplitudes.

sim::ErrCode sim::fdm::SimulatorIso::operator() ( const TimeT &  dt,
WaveField wf 
) const

Fill predefined wavefield amplitudes by finite-difference modelling. wf.header().t0 - start time of modeling. wf.header().timestep - resulted tim step. wf[i].size() - length of resulted wavefield. TA_XOP, TA_ZOP are used as coordinates of receiver points. TA_COMP (X/x, Z/z or any for z-component) is used to match required component.

Parameters
dtFinite differencies time grid step.
wfResulted wavefied.
Returns
error code (EC_OK if all good).
void sim::fdm::SimulatorIso::setExecutionFlag ( const bool  flag)
Set calculations execution flag. 

Usefull for stop calculations from other threads.

Parameters
Flagof execution. If false => executions (init, operator()) terminated or will not run.
virtual void sim::fdm::SimulatorIso::snapshotCallback ( const TimeT &  t,
const TimeT &  tmax,
const Snapshot snapshot 
) const
virtual
Callback function called on every operator() time step. Should be reimplemented.
Parameters
tCurrent time step.
tMaximal modelling time.
snapshotCurrent snapshot.

Member Data Documentation

bool sim::fdm::SimulatorIso::m_execution_flag
protected

Flag of execution.

GridIso sim::fdm::SimulatorIso::m_grid
protected

Grid of parameters.

Snapshot::Area sim::fdm::SimulatorIso::m_snapshot_area
protected

Snapshot area.

std::vector<Source> sim::fdm::SimulatorIso::m_sources_vec
protected

Array of sources.


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