specfem::receivers¶
-
namespace receivers¶
Namespace for structures that handle receivers and seismic data capture.
This namespace contains receiver classes that capture wavefield data at specific locations during seismic simulations. The base class is specfem::receivers::receiver, with template specializations for different spatial dimensions.
2D receiver implementations
3D receiver implementations
Receivers are responsible for:
Recording displacement, velocity, or acceleration at specific coordinates
Interpolating wavefield values from the finite element mesh
Managing station metadata (network name, station name, coordinates)
Outputting seismograms for comparison with observed data
See also
specfem::receivers::receiver¶
-
template<specfem::element::dimension_tag DimensionTag>
class receiver¶ Receiver Class.
This class is responsible for handling the reception of seismic data at a specific station.
- Template Parameters:
DimensionTag – The dimension tag (2D or 3D) for the receiver.
2D Specialization¶
-
template<>
class receiver<specfem::element::dimension_tag::dim2>¶ Unnamed Group
-
static constexpr specfem::element::dimension_tag dimension_tag = specfem::element::dimension_tag::dim2¶
Compile-time constants
Public Functions
-
inline receiver(const std::string &network_name, const std::string &station_name, const type_real x, const type_real z, const type_real angle)¶
Construct a new receiver object.
- Parameters:
network_name – Name of network where this station lies in
station_name – Name of station
x – X coordinate of the station
z – Z coordinate of the station
angle – Angle of the station
-
inline std::string get_network_name()¶
Get the name of network where this station lies.
- Returns:
std::string name of the network where the station lies
-
inline std::string get_station_name()¶
Get the name of this station.
- Returns:
std::string Name of this station
-
std::string print() const¶
User output.
-
inline type_real get_angle() const¶
-
inline specfem::point::global_coordinates<dimension_tag> get_global_coordinates() const¶
Get the global coordinates of the receiver.
- Returns:
specfem::point::global_coordinates<dimension_tag>
-
inline void set_global_coordinates(const specfem::point::global_coordinates<dimension_tag> &global_coordinates)¶
Set the global coordinates of the receiver.
- Parameters:
global_coordinates – global coordinates
-
bool operator==(const receiver &other) const¶
Equality operator.
- Parameters:
other – Other receiver to compare with
- Returns:
true if receivers are equal, false otherwise
-
inline int get_partition_index() const¶
-
inline void set_partition_index(int rank)¶
-
inline void set_read_coordinates(std::unique_ptr<specfem::coordinate_systems::coordinates<dimension_tag>> coordinates)¶
Set the generic coordinates for this receiver.
-
inline const specfem::coordinate_systems::coordinates<dimension_tag> *get_read_coordinates() const¶
Get the generic coordinates (const), or nullptr if not set.
-
inline specfem::coordinate_systems::coordinates<dimension_tag> *get_read_coordinates()¶
Get the generic coordinates (mutable), or nullptr if not set.
Private Members
-
specfem::point::global_coordinates<dimension_tag> global_coordinates¶
Global coordinates of the receiver.
-
std::unique_ptr<specfem::coordinate_systems::coordinates<dimension_tag>> read_coordinates_¶
Generic coordinates (resolved at assembly time)
-
type_real angle¶
Angle to rotate components at receivers.
-
std::string network_name¶
Name of the network where this station lies.
-
std::string station_name¶
Name of the station.
-
static constexpr specfem::element::dimension_tag dimension_tag = specfem::element::dimension_tag::dim2¶
3D Specialization¶
-
template<>
class receiver<specfem::element::dimension_tag::dim3>¶ Unnamed Group
-
static constexpr specfem::element::dimension_tag dimension_tag = specfem::element::dimension_tag::dim3¶
Compile-time constants
Public Functions
-
inline receiver(const std::string &network_name, const std::string &station_name, const type_real x, const type_real y, const type_real z)¶
Construct a new receiver object.
- Parameters:
network_name – Name of network where this station lies in
station_name – Name of station
x – X coordinate of the station
y – Y coordinate of the station
z – Z coordinate of the station
-
inline receiver(const std::string &network_name, const std::string &station_name, std::unique_ptr<specfem::coordinate_systems::coordinates<dimension_tag>> coordinates)¶
Construct a new receiver object from generic coordinates.
- Parameters:
network_name – Name of network where this station lies in
station_name – Name of station
coordinates – Generic coordinate object
-
inline std::string get_network_name()¶
Get the name of network where this station lies.
- Returns:
std::string name of the network where the station lies
-
inline std::string get_station_name()¶
Get the name of this station.
- Returns:
std::string Name of this station
-
std::string print() const¶
User output.
-
inline specfem::point::global_coordinates<dimension_tag> get_global_coordinates() const¶
Get the global coordinates of the receiver.
- Returns:
specfem::point::global_coordinates<dimension_tag>
-
inline void set_global_coordinates(const specfem::point::global_coordinates<dimension_tag> &global_coordinates)¶
Set the global coordinates of the receiver.
- Parameters:
global_coordinates – global coordinates
-
bool operator==(const receiver &other) const¶
Equality operator.
- Parameters:
other – Other receiver to compare with
- Returns:
true if receivers are equal, false otherwise
-
inline int get_partition_index() const¶
-
inline void set_partition_index(int rank)¶
-
inline void set_read_coordinates(std::unique_ptr<specfem::coordinate_systems::coordinates<dimension_tag>> coordinates)¶
Set the generic coordinates for this receiver.
-
inline const specfem::coordinate_systems::coordinates<dimension_tag> *get_read_coordinates() const¶
Get the generic coordinates (const), or nullptr if not set.
-
inline specfem::coordinate_systems::coordinates<dimension_tag> *get_read_coordinates()¶
Get the generic coordinates (mutable), or nullptr if not set.
Private Members
-
specfem::point::global_coordinates<dimension_tag> global_coordinates¶
Global coordinates of the receiver.
-
std::unique_ptr<specfem::coordinate_systems::coordinates<dimension_tag>> read_coordinates_¶
Generic coordinates (resolved at assembly time)
-
std::string network_name¶
Name of the network where this station lies.
-
std::string station_name¶
Name of the station.
-
static constexpr specfem::element::dimension_tag dimension_tag = specfem::element::dimension_tag::dim3¶