Public Documentation
Documentation for AcousticWaveCPML.jl
's public interface.
Public Interface
AcousticWaveCPML.Receivers
— TypeType representing a multi-receiver configuration for a wave propagation shot.
AcousticWaveCPML.Receivers
— MethodReceivers(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 bypositions
and one row per simulation time step).
AcousticWaveCPML.Sources
— TypeType representing a multi-source configuration for a wave propagation shot.
AcousticWaveCPML.Sources
— MethodSources(
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).
AcousticWaveCPML.rickersource1D
— Methodrickersource1D(t::Real, t0::Real, f0::Real)
Ricker source time function for current time t
, activation time t0
and dominating frequency f0
.
AcousticWaveCPML.Acoustic1D
— ModuleModule with acoustic 1D solver.
AcousticWaveCPML.Acoustic1D.solve1D
— Methodsolve1D(
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.
AcousticWaveCPML.Acoustic2D
— ModuleModule with acoustic 2D solver.
AcousticWaveCPML.Acoustic2D.solve2D
— Methodsolve2D(
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 lx
xly
[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 ofplims
to use as threshold for plots.
AcousticWaveCPML.Acoustic2D_Threads
— ModuleModule with acoustic 2D xPU solver using Base.Threads
.
AcousticWaveCPML.Acoustic2D_CUDA
— ModuleModule with acoustic 2D xPU solver using CUDA
.
AcousticWaveCPML.Acoustic2D_CUDA.solve2D
— Methodsolve2D(
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 lx
xly
[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 ofplims
to use as threshold for plots.
AcousticWaveCPML.Acoustic2Dmulti_Threads
— ModuleModule with acoustic 2D multi-xPU solver using Base.Threads
.
AcousticWaveCPML.Acoustic2Dmulti_Threads.solve2D_multi
— Methodsolve2D_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 lx
xly
[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 ofplims
to use as threshold for plots.init_MPI::Bool = true
: initialize MPI with ImplicitGlobalGrid.
AcousticWaveCPML.Acoustic2Dmulti_CUDA
— ModuleModule with acoustic 2D multi-xPU solver using CUDA
.
AcousticWaveCPML.Acoustic2Dmulti_CUDA.solve2D_multi
— Methodsolve2D_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 lx
xly
[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 ofplims
to use as threshold for plotsinit_MPI::Bool = true
: initialize MPI with ImplicitGlobalGrid.
AcousticWaveCPML.Acoustic3D
— ModuleModule with acoustic 3D solver.
AcousticWaveCPML.Acoustic3D.solve3D
— Methodsolve3D(
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 lx
xly
xlz
[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 ofplims
to use as threshold for plots.
AcousticWaveCPML.Acoustic3D_Threads
— ModuleModule with acoustic 3D xPU solver using Base.Threads
.
AcousticWaveCPML.Acoustic3D_Threads.solve3D
— Methodsolve3D(
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 lx
xly
xlz
[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 ofplims
to use as threshold for plots.
AcousticWaveCPML.Acoustic3D_CUDA
— ModuleModule with acoustic 3D xPU solver using CUDA
.
AcousticWaveCPML.Acoustic3D_CUDA.solve3D
— Methodsolve3D(
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 lx
xly
xlz
[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 ofplims
to use as threshold for plots.
AcousticWaveCPML.Acoustic3Dmulti_Threads
— ModuleModule with acoustic 3D multi-xPU solver using Base.Threads
.
AcousticWaveCPML.Acoustic3Dmulti_Threads.solve3D_multi
— Methodsolve3D_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 lx
xly
xlz
[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 ofplims
to use as threshold for plotsinit_MPI::Bool = true
: initialize MPI with ImplicitGlobalGrid.
AcousticWaveCPML.Acoustic3Dmulti_CUDA
— ModuleModule with acoustic 3D multi-xPU solver using CUDA
.
AcousticWaveCPML.Acoustic3Dmulti_CUDA.solve3D_multi
— Methodsolve3D_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 lx
xly
xlz
[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 ofplims
to use as threshold for plotsinit_MPI::Bool = true
: initialize MPI with ImplicitGlobalGrid.