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

#include <sim_fdm_snapshot.hpp>

Classes

class  Area
 

Public Member Functions

 Snapshot ()
 
 Snapshot (const Area &area)
 
std::vector< AmplT > & operator() (const CoordsMask &coord)
 
const std::vector< AmplT > & operator() (const CoordsMask &coord) const
 
int id (const Point2D &coords) const
 
AmplT * operator() (const size_t x_id, const size_t z_id, const CoordsMask &coord)
 
const AmplT * operator() (const size_t x_id, const size_t z_id, const CoordsMask &coord) const
 
const Areaarea () const
 

Static Public Member Functions

static bool test_to_file (const Snapshot &snapshot, const std::string &fname)
 

Detailed Description

Snapshot of amplitudes a(x,z).

Constructor & Destructor Documentation

sim::fdm::Snapshot::Snapshot ( )

Empty snapshot.

sim::fdm::Snapshot::Snapshot ( const Area area)
Construct snapshot filled by zeros. 
Parameters
areaCoordinates area of the snapshot.

Member Function Documentation

const Area& sim::fdm::Snapshot::area ( ) const
inline

Access to snapshot area.

int sim::fdm::Snapshot::id ( const Point2D coords) const
Index of snapshot element from provided xz-coordinates. 

Coordinates provided.

Returns
requested index or -1 if coordinates are out of range.
std::vector<AmplT>& sim::fdm::Snapshot::operator() ( const CoordsMask coord)
Access to 2D snapshot. 
Parameters
coordCoordinate projection required.
const std::vector<AmplT>& sim::fdm::Snapshot::operator() ( const CoordsMask coord) const
Access to 2D snapshot. 
Parameters
coordCoordinate projection required.
AmplT* sim::fdm::Snapshot::operator() ( const size_t  x_id,
const size_t  z_id,
const CoordsMask coord 
)
Access to 2D snapshot element. 
Parameters
x_idIndex of x-coordinate.
z_idIndex of z-coordinate.
coordCoordinate projection required.
Returns
required element or NULL on error.
const AmplT* sim::fdm::Snapshot::operator() ( const size_t  x_id,
const size_t  z_id,
const CoordsMask coord 
) const
Access to 2D snapshot element. 
Parameters
x_idIndex of x-coordinate.
z_idIndex of z-coordinate.
coordCoordinate projection required.
Returns
required element or NULL on error.

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