Guide to programming using RSF
Next:
C++ program
Up:
Sava: RSF DEMO
Previous:
Introduction
C program
Declare input, output and auxiliary file tags:
Fw
for input wavelet,
Fv
for velocity,
Fr
for reflectivity, and
Fo
for output wavefield.
Declare RSF cube axes:
at
time axis,
ax
space axis,
az
depth axis.
Declare multi-dimensional arrays for input, output and computations.
Open files for input/output.
Read axes from input files; write axes to output file.
Allocate arrays and read wavelet, velocity and reflectivity.
Allocate temporary arrays.
Loop over time.
Compute Laplacian:
.
Inject source wavelet:
Scale by velocity:
Time step:
2012-07-19