Open int-ptr-ptr opened 5 hours ago
For this to work, as well as making it easier for other seismogram types to be added, the current compute_seismograms
routine may need to be reworked, since additional shared views may be needed.
Moreover, there is currently no good way to isolate code between seismogram types that need more than just a "use this field, instead"-type difference in implementation.
For our pressure case, we need to compute the divergence of the displacement field (or for the acoustic case, just take the acceleration field). I can see two ways of doing it:
parfor
(requiring more scratch size), store the displacement field in there, then compute the divergence. This aux-field is used under the assumption that the receiver kernel's get_field()
should be ignorant of the seismogram type.get_field()
access seismogram_type_l
, then the divergence can be computed directly from the displacement field. Additionally, the acoustic kernel can just return the negative acceleration of $\chi$ and skip the $\chi$->displacement conversion.
Is your feature request related to a problem? Please describe. A pressure seismogram is a feature in the original
SPECFEM
that would be beneficial to add inSPECFEM++
.Describe the solution you'd like One should be able to add
-pressure
toseismogram-type
in the configuration file, and produce seismogram outputs for pressure at stations.Additional context Add any other context or screenshots about the feature request here.