def __init__(self, mesh, pos, **kwargs): """Constructor for the PointReceiver class. Parameters ---------- mesh : pysit.Mesh Computation domain on which the source is defined. position : tuple of float Coordinates of the point in the physical coordinates of the domain. **kwargs : dict, optional May be used to specify `approximation` and `approximation_width` to base class. """ # Populate parameters from the base class. PointRepresentationBase.__init__(self, mesh, pos, **kwargs) ReceiverBase.__init__(self, **kwargs) self.data_dft = dict()
def __init__(self, mesh, pos, src_func, intensity=1.0, **kwargs): """Constructor for the PointSource class. Parameters ---------- mesh : pysit.Mesh Computation domain on which the source is defined. position : tuple of float Coordinates of the point in the physical coordinates of the domain. src_func : function or function object Function of time that produces the source wavelet. intensity : float, optional Intensity of the source wavelet. **kwargs : dict, optional May be used to specify `approximation` and `approximation_width` to base class. """ # Populate parameters from the base class. PointRepresentationBase.__init__(self, mesh, pos, **kwargs) SourceBase.__init__(self, **kwargs) self.w = src_func self.intensity = intensity