Public Documentation

Documentation for AcousticWaveCPML.jl's public interface.

Public Interface

AcousticWaveCPML.ReceiversMethod
Receivers(positions::Matrix{<:Real})

Create a single shot wave propagation receivers configuration from receivers positions.

The positions matrix must have a row for each receiver and as many columns as problem dimensions. Each receiver coordinate is specified in meters.

Fields

  • seismograms::Matrix{<:Real}: container for recorded seismogram traces (one column per receiver in the order specified by positions and one row per simulation time step).
source
AcousticWaveCPML.SourcesMethod
Sources(
    positions::Matrix{<:Real},
    t0s::Vector{<:Real},
    srctfs::Vector{<:Function},
    freqdomain::Real
)

Create a single shot wave propagation source configuration from source positions, time-functions and a frequency domain.

The positions matrix must have a row for each source and as many columns as problem dimensions. Each source coordinate is specified in meters. The t0s vector must have one value for each source representing the activation time of that source in seconds. The srctfs vector must have one function for each source. Each function accepts three parameters (the current time, the activation time and the dominating frequency) and returns the value of the sources at that current time. The freqdomain parameter specifies the dominating frequency for all sources (which must be the same for all of them).

source
AcousticWaveCPML.rickersource1DMethod
rickersource1D(t::Real, t0::Real, f0::Real)

Ricker source time function for current time t, activation time t0 and dominating frequency f0.

source
AcousticWaveCPML.Acoustic1D.solve1DMethod
solve1D(
    lx::Real,
    lt::Real,
    vel::Vector{<:Real},
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    do_bench::Bool = false,
    do_vis::Bool = false,
    nvis::Integer = 5,
    gif_name::String = "acoustic1D",
    plims::Vector{<:Real} = [-1.0, 1.0]
)

Solve 1D acoustic wave equation on a model with length lx [m], for final time lt [sec] with the velocity model vel [m/s]. The size of vel implicitly specifies the number of grid points to use for the simulation.

Sources and receivers are specified by srcs and recs.

Return the final time pressure field as a vector and populate the receivers seismograms with the recorded traces.

If do_vis, create and save visualization in simulations folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • do_bench::Bool = false: do benchmark instead of computation.
  • do_vis::Bool = false: enables plotting.
  • nvis::Integer = 5: plotting time step frequency.
  • gif_name::String = "acoustic1D": name of animation plot.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
source
AcousticWaveCPML.Acoustic2D.solve2DMethod
solve2D(
    lx::Real,
    ly::Real,
    lt::Real,
    vel::Matrix{<:Real},
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_bench::Bool = false,
    do_vis::Bool = false,
    nvis::Integer = 5,
    gif_name::String = "acoustic2D",
    plims::Vector{<:Real} = [-1.0, 1.0],
    threshold::Real = 0.01
)

Solve 2D acoustic wave equation on a model with size lxxly [m], for final time lt [sec] with the velocity model vel [m/s]. The size of vel implicitly specifies the number of grid points to use for the simulation.

Sources and receivers are specified by srcs and recs.

Return the final time pressure field as a vector and populate the receivers seismograms with the recorded traces.

If do_vis, create and save visualization in simulations folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_bench::Bool = false: do benchmark instead of computation.
  • do_vis::Bool = false: enables plotting.
  • nvis::Integer = 5: plotting time step frequency.
  • gif_name::String = "acoustic2D": name of animation plot.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots.
source
AcousticWaveCPML.Acoustic2D_CUDA.solve2DMethod
solve2D(
    lx::Real,
    ly::Real,
    lt::Real,
    vel::Matrix{<:Real},
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_bench::Bool = false,
    do_vis::Bool = false,
    nvis::Integer = 5,
    gif_name::String = "acoustic2D_xPU",
    plims::Vector{<:Real} = [-1.0, 1.0],
    threshold::Real = 0.01
)

Solve 2D acoustic wave equation on a model with size lxxly [m], for final time lt [sec] with the velocity model vel [m/s]. The size of vel implicitly specifies the number of grid points to use for the simulation.

Sources and receivers are specified by srcs and recs.

Return the final time pressure field as a vector and populate the receivers seismograms with the recorded traces.

If do_vis, create and save visualization in simulations folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_bench::Bool = false: do benchmark instead of computation.
  • do_vis::Bool = false: enables plotting.
  • nvis::Integer = 5: plotting time step frequency.
  • gif_name::String = "acoustic2D_xPU": name of animation plot.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots.
source
AcousticWaveCPML.Acoustic2Dmulti_Threads.solve2D_multiMethod
solve2D_multi(
    lx::Real,
    ly::Real,
    lt::Real,
    nx::Integer,
    ny::Integer,
    vel_func::Function,
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_vis::Bool = false,
    nvis::Integer = 5,
    gif_name::String = "acoustic2D_multixPU",
    plims::Vector{<:Real} = [-1, 1],
    threshold::Real = 0.01,
    init_MPI::Bool = true
)

Solve 2D acoustic wave equation on multiple MPI processes on a model with size lxxly [m], for final time lt [sec] with the velocity model vel_func [m/s]. The LOCAL number of grid points to use for the simulation (for each MPI processes) is specified by nx and ny. The velocity model vel_func must be a function accepting two arguments, the x and y coordinates of a point in meters, and returning the velocity value at that point.

Sources and receivers are specified by srcs and recs.

Return the LOCAL final time pressure field as a vector and populate the receivers seismograms with the LOCAL recorded traces. This means that the each MPI process returns only its piece of final pressure field and only records traces of receivers inside of its local domain.

If do_vis, create and save visualization in simulations folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_vis::Bool = false: enables plotting.
  • nvis::Integer = 5: plotting time step frequency.
  • gif_name::String = "acoustic2D_multixPU": name of animation plot.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots.
  • init_MPI::Bool = true: initialize MPI with ImplicitGlobalGrid.
source
AcousticWaveCPML.Acoustic2Dmulti_CUDA.solve2D_multiMethod
solve2D_multi(
    lx::Real,
    ly::Real,
    lt::Real,
    nx::Integer,
    ny::Integer,
    vel_func::Function,
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_vis::Bool = false,
    nvis::Integer = 5,
    gif_name::String = "acoustic2D_multixPU",
    plims::Vector{<:Real} = [-1, 1],
    threshold::Real = 0.01,
    init_MPI::Bool = true
)

Solve 2D acoustic wave equation on multiple MPI processes on a model with size lxxly [m], for final time lt [sec] with the velocity model vel_func [m/s]. The LOCAL number of grid points to use for the simulation (for each MPI processes) is specified by nx and ny. The velocity model vel_func must be a function accepting two arguments, the x and y coordinates of a point in meters, and returning the velocity value at that point.

Sources and receivers are specified by srcs and recs.

Return the LOCAL final time pressure field as a vector and populate the receivers seismograms with the LOCAL recorded traces. This means that the each MPI process returns only its piece of final pressure field and only records traces of receivers inside of its local domain.

If do_vis, create and save visualization in simulations folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_vis::Bool = false: enables plotting.
  • nvis::Integer = 5: plotting time step frequency.
  • gif_name::String = "acoustic2D_multixPU": name of animation plot.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots
  • init_MPI::Bool = true: initialize MPI with ImplicitGlobalGrid.
source
AcousticWaveCPML.Acoustic3D.solve3DMethod
solve3D(
    lx::Real,
    ly::Real,
    lz::Real,
    lt::Real,
    vel::Array{<:Real, 3},
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_bench::Bool = false,
    do_vis::Bool = false,
    do_save::Bool = false,
    nvis::Integer = 5,
    nsave::Integer = 5,
    gif_name::String = "acoustic3D_slice",
    save_name::String = "acoustic3D",
    plims::Vector{<:Real} = [-1.0, 1.0],
    threshold::Real = 0.01
)

Solve 3D acoustic wave equation on a model with size lxxlyxlz [m], for final time lt [sec] with the velocity model vel [m/s]. The size of vel implicitly specifies the number of grid points to use for the simulation.

Sources and receivers are specified by srcs and recs.

Return the final time pressure field as a vector and populate the receivers seismograms with the recorded traces.

If do_vis, create and save visualization in simulations folder. If do_save, create and save intermediate pressure fields in simulations/tmp folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_bench::Bool = false: do benchmark instead of computation.
  • do_vis::Bool = false: enables plotting.
  • do_save::Bool = false: enables saving intermediate pressure fields.
  • nvis::Integer = 5: plotting time step frequency.
  • nsave::Integer = 5: saving time step frequency.
  • gif_name::String = "acoustic3D_slice": name of animation plot.
  • save_name::String = "acoustic3D": prefix names of saved pressure files.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots.
source
AcousticWaveCPML.Acoustic3D_Threads.solve3DMethod
solve3D(
    lx::Real,
    ly::Real,
    lz::Real,
    lt::Real,
    vel::Array{<:Real, 3},
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_bench::Bool = false,
    do_vis::Bool = false,
    do_save::Bool = false,
    nvis::Integer = 5,
    nsave::Integer = 5,
    gif_name::String = "acoustic3D_xPU_slice",
    save_name::String = "acoustic3D_xPU",
    plims::Vector{<:Real} = [-1.0, 1.0],
    threshold::Real = 0.01
)

Solve 3D acoustic wave equation on a model with size lxxlyxlz [m], for final time lt [sec] with the velocity model vel [m/s]. The size of vel implicitly specifies the number of grid points to use for the simulation.

Sources and receivers are specified by srcs and recs.

Return the final time pressure field as a vector and populate the receivers seismograms with the recorded traces.

If do_vis, create and save visualization in simulations folder. If do_save, create and save intermediate pressure fields in simulations/tmp folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_bench::Bool = false: do benchmark instead of computation.
  • do_vis::Bool = false: enables plotting.
  • do_save::Bool = false: enables saving intermediate pressure fields.
  • nvis::Integer = 5: plotting time step frequency.
  • nsave::Integer = 5: saving time step frequency.
  • gif_name::String = "acoustic3D_xPU_slice": name of animation plot.
  • save_name::String = "acoustic3D_xPU": prefix names of saved pressure files.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots.
source
AcousticWaveCPML.Acoustic3D_CUDA.solve3DMethod
solve3D(
    lx::Real,
    ly::Real,
    lz::Real,
    lt::Real,
    vel::Array{<:Real, 3},
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_bench::Bool = false,
    do_vis::Bool = false,
    do_save::Bool = false,
    nvis::Integer = 5,
    nsave::Integer = 5,
    gif_name::String = "acoustic3D_xPU_slice",
    save_name::String = "acoustic3D_xPU",
    plims::Vector{<:Real} = [-1.0, 1.0],
    threshold::Real = 0.01
)

Solve 3D acoustic wave equation on a model with size lxxlyxlz [m], for final time lt [sec] with the velocity model vel [m/s]. The size of vel implicitly specifies the number of grid points to use for the simulation.

Sources and receivers are specified by srcs and recs.

Return the final time pressure field as a vector and populate the receivers seismograms with the recorded traces.

If do_vis, create and save visualization in simulations folder. If do_save, create and save intermediate pressure fields in simulations/tmp folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_bench::Bool = false: do benchmark instead of computation.
  • do_vis::Bool = false: enables plotting.
  • do_save::Bool = false: enables saving intermediate pressure fields.
  • nvis::Integer = 5: plotting time step frequency.
  • nsave::Integer = 5: saving time step frequency.
  • gif_name::String = "acoustic3D_xPU_slice": name of animation plot.
  • save_name::String = "acoustic3D_xPU": prefix names of saved pressure files.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots.
source
AcousticWaveCPML.Acoustic3Dmulti_Threads.solve3D_multiMethod
solve3D_multi(
    lx::Real,
    ly::Real,
    lz::Real,
    lt::Real,
    nx::Integer,
    ny::Integer,
    nz::Integer,
    vel_func::Function,
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_vis::Bool = false,
    do_save::Bool = false,
    nvis::Integer = 5,
    nsave::Integer = 5,
    gif_name::String = "acoustic3D_multixPU_slice",
    save_name::String = "acoustic3D_multixPU",
    plims::Vector{<:Real} = [-1.0, 1.0],
    threshold::Real = 0.01,
    init_MPI::Bool = true
)

Solve 3D acoustic wave equation on multiple MPI processes on a model with size lxxlyxlz [m], for final time lt [sec] with the velocity model vel_func [m/s]. The LOCAL number of grid points to use for the simulation (for each MPI processes) is specified by nx, ny and nz. The velocity model vel_func must be a function accepting three arguments, the x, y and z coordinates of a point in meters, and returning the velocity value at that point.

Sources and receivers are specified by srcs and recs.

Return the LOCAL final time pressure field as a vector and populate the receivers seismograms with the LOCAL recorded traces. This means that the each MPI process returns only its piece of final pressure field and only records traces of receivers inside of its local domain.

If do_vis, create and save visualization in simulations folder. If do_save, create and save intermediate pressure fields in simulations/tmp folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_vis::Bool = false: enables plotting.
  • do_save::Bool = false: enables saving intermediate pressure fields.
  • nvis::Integer = 5: plotting time step frequency.
  • nsave::Integer = 5: saving time step frequency.
  • gif_name::String = "acoustic3D_multixPU_slice": name of animation plot.
  • save_name::String = "acoustic3D_multixPU": prefix names of saved pressure files.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots
  • init_MPI::Bool = true: initialize MPI with ImplicitGlobalGrid.
source
AcousticWaveCPML.Acoustic3Dmulti_CUDA.solve3D_multiMethod
solve3D_multi(
    lx::Real,
    ly::Real,
    lz::Real,
    lt::Real,
    nx::Integer,
    ny::Integer,
    nz::Integer,
    vel_func::Function,
    srcs::Sources,
    recs::Receivers;
    halo::Integer = 20,
    rcoef::Real = 0.0001,
    ppw::Real = 10.0,
    freetop::Bool = true,
    do_vis::Bool = false,
    do_save::Bool = false,
    nvis::Integer = 5,
    nsave::Integer = 5,
    gif_name::String = "acoustic3D_multixPU_slice",
    save_name::String = "acoustic3D_multixPU",
    plims::Vector{<:Real} = [-1.0, 1.0],
    threshold::Real = 0.01,
    init_MPI::Bool = true
)

Solve 3D acoustic wave equation on multiple MPI processes on a model with size lxxlyxlz [m], for final time lt [sec] with the velocity model vel_func [m/s]. The LOCAL number of grid points to use for the simulation (for each MPI processes) is specified by nx, ny and nz. The velocity model vel_func must be a function accepting three arguments, the x, y and z coordinates of a point in meters, and returning the velocity value at that point.

Sources and receivers are specified by srcs and recs.

Return the LOCAL final time pressure field as a vector and populate the receivers seismograms with the LOCAL recorded traces. This means that the each MPI process returns only its piece of final pressure field and only records traces of receivers inside of its local domain.

If do_vis, create and save visualization in simulations folder. If do_save, create and save intermediate pressure fields in simulations/tmp folder.

Arguments

  • halo::Integer = 20: the number of CPML layers.
  • rcoef::Real = 0.0001: the reflection coeffiecient for CPML layers.
  • ppw::Real = 10.0: minimum number of points per wavelength admissible.
  • freetop::Bool = true: enables free top boundary conditions.
  • do_vis::Bool = false: enables plotting.
  • do_save::Bool = false: enables saving intermediate pressure fields.
  • nvis::Integer = 5: plotting time step frequency.
  • nsave::Integer = 5: saving time step frequency.
  • gif_name::String = "acoustic3D_multixPU_slice": name of animation plot.
  • save_name::String = "acoustic3D_multixPU": prefix names of saved pressure files.
  • plims::Vector{<:Real} = [-1.0, 1.0]: limits for pressure values in plot.
  • threshold::Real = 0.01: percentage of plims to use as threshold for plots
  • init_MPI::Bool = true: initialize MPI with ImplicitGlobalGrid.
source