Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastic 2D P-SV adjoints and gradients #1

Open
wants to merge 119 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 111 commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
1ec6737
starting the elastic business...
May 12, 2023
2280513
Merge branch 'main' into elastic
May 17, 2023
66f6624
Merge branch 'main' into elastic
May 17, 2023
6f9f5b4
some progress...
May 25, 2023
860caae
modified: ela_models.jl
May 25, 2023
f4077b8
some progress towards elastic...
Jun 7, 2023
036280d
slow progress
Jun 9, 2023
df502bd
working on ela...
Oct 23, 2023
0c81959
Merge branch 'main' into elastic
Nov 29, 2023
8604987
wip...
Nov 30, 2023
6cc55b9
Merge branch 'main' into elastic
Dec 15, 2023
8d88a87
update
Dec 15, 2023
a135ced
wip...
Dec 19, 2023
3b6d50d
updates...
Jan 9, 2024
24218fd
new arg in build_wavesim
Jan 10, 2024
918af77
work in prog... breaking changes
Jan 10, 2024
7c04e24
refactor init_shot!, etc.
Jan 12, 2024
ab3922e
updates...
Jan 14, 2024
5a938bf
update
Jan 14, 2024
395c0b1
wip... working without cpml
Jan 15, 2024
ad58e0e
testing snapshots
Jan 16, 2024
0db9a47
bump version
Jan 17, 2024
b563688
fix free surface mirroring
Jan 19, 2024
2703a4c
fix free surface, again...
Jan 19, 2024
76851e9
wip: interpolate src and rec with a sinc
Jan 24, 2024
4eefba1
wip: interp src and recs with sinc
Jan 24, 2024
c774286
first src and rec interpolation with sinc
Jan 25, 2024
bd5851d
fix bug in PMLs
Jan 26, 2024
b0aafb6
add simple_example_elastic.jl
Feb 1, 2024
71592f1
Pinned compatibility on Julia v1.7 to v1.9 for now
GiackAloZ Mar 11, 2024
115697c
Merge branch 'elastic' into develop
GiackAloZ Mar 11, 2024
52c96b7
Fix changes and tests (for CPU backends)
GiackAloZ Mar 12, 2024
8fd6323
First formatting pass
GiackAloZ Mar 12, 2024
f4b3619
Fix linter problems
GiackAloZ Mar 12, 2024
769fab9
Remove old comments
GiackAloZ Mar 12, 2024
d152621
Remove MPI dep for now
GiackAloZ Mar 12, 2024
3c5440b
Remove more old comments
GiackAloZ Mar 12, 2024
dc0fab0
Fix snapshots with GPU backend
GiackAloZ Apr 29, 2024
c864aac
CUDA extension (first commit)
GiackAloZ Apr 29, 2024
2fb1508
Start grid refactor (WIP)
GiackAloZ May 2, 2024
bb60945
Better tests
GiackAloZ Jun 14, 2024
8ba7f1c
Better logging
GiackAloZ Jun 14, 2024
8202dc8
Fix return in wrappers
GiackAloZ Jun 14, 2024
7f72a69
First overhaul (WIP)
GiackAloZ Jun 14, 2024
6f0f337
First overhaul (tests passing)
GiackAloZ Jun 17, 2024
41f425c
Preparing to test FD gradient (constant density)
GiackAloZ Jun 17, 2024
efeae1f
Finish structure of Grid, Fields and Checkpointer
GiackAloZ Jul 1, 2024
c197c3f
Simplified grid passing
GiackAloZ Jul 1, 2024
a4d9c07
MatProps now depend on data type
GiackAloZ Jul 1, 2024
af5c062
InputParameters now depend on data type
GiackAloZ Jul 1, 2024
20f7931
InputBDCParams now depend on data type
GiackAloZ Jul 1, 2024
daff79e
WaveSimul now depends on data type
GiackAloZ Jul 2, 2024
1dc1e82
Renaming
GiackAloZ Jul 2, 2024
4313d52
Add support for different data types (not yet tested)
GiackAloZ Jul 2, 2024
e93532c
Fix snapshot return types
GiackAloZ Jul 2, 2024
0cb4742
Symplify adjoint for CD
GiackAloZ Jul 2, 2024
87f0298
Rewrite VD acoustic
GiackAloZ Jul 4, 2024
de995c3
Rename all wavsim to model and fix init_gradient bug
GiackAloZ Jul 4, 2024
6ff62f3
Rename WaveSimul to WaveSimulation (and subtypes)
GiackAloZ Jul 4, 2024
c9b60c8
Reenable checks and remove redundant fields
GiackAloZ Jul 4, 2024
e852bde
Refactor Shot and its subtypes for better typing
GiackAloZ Jul 4, 2024
7843f0f
Move things around
GiackAloZ Jul 4, 2024
f24bb44
Refactor snapshotting
GiackAloZ Jul 4, 2024
9eeecef
Fix support for single precision (or even half precision)
GiackAloZ Jul 4, 2024
5b39263
Fix union for GPU backend
GiackAloZ Jul 4, 2024
29639d3
Rename :GPU to :CUDA and add support for :AMDGPU
GiackAloZ Jul 4, 2024
72f4e00
Refactor elastic model
GiackAloZ Jul 5, 2024
c317758
Add PS implementation for elastic 2D iso
GiackAloZ Jul 5, 2024
c4a6eb0
Fix bug
GiackAloZ Jul 5, 2024
edc9cb0
Fix backend selection
GiackAloZ Jul 5, 2024
5077ac8
Fix backend again
GiackAloZ Jul 5, 2024
c32fd92
Fix shared 2D
GiackAloZ Jul 5, 2024
7f1405d
Fix shared 2D again
GiackAloZ Jul 5, 2024
116a7d1
Update README
GiackAloZ Jul 9, 2024
36e3b5e
Better documentation
GiackAloZ Jul 9, 2024
6911a28
Remove generated md
GiackAloZ Jul 9, 2024
e9dada5
Fix some docs and add generated to gitignore
GiackAloZ Jul 9, 2024
cd65383
Update example
GiackAloZ Jul 10, 2024
2d4b195
Update guide with links to other sections
GiackAloZ Jul 10, 2024
f195774
Elastic gradient (WIP)
GiackAloZ Sep 5, 2024
cedb240
Implement adjoint and gradients for 2D elastic isotropic
GiackAloZ Sep 20, 2024
91974de
Elastic gradients WIP 2
GiackAloZ Oct 2, 2024
8d575e4
Disable sinc interpolation with flag
GiackAloZ Oct 21, 2024
52bf989
Fix sinc interpolation (WIP)
GiackAloZ Oct 21, 2024
ac8359b
Move things in utils
GiackAloZ Oct 22, 2024
e0d458c
Replace elastic backend (WIP)
GiackAloZ Oct 22, 2024
ba6e662
Fix gradient correlations and checkpointing + test
GiackAloZ Oct 22, 2024
2ea1bd3
Update grad check
GiackAloZ Oct 23, 2024
8e919b3
Fix gradient check
GiackAloZ Oct 23, 2024
a477f14
Refactor receiver recording to fix concurrency
GiackAloZ Oct 24, 2024
059ee12
Refactor receiver recording to improve performance
GiackAloZ Oct 24, 2024
39e48e2
Implement correct adjoint solver elasic 2D iso P-SV
GiackAloZ Oct 28, 2024
12a3ef0
Add module FiniteDifferencesMacros and use them to refactor elastic 2…
GiackAloZ Nov 20, 2024
257c4eb
Add macros for first derivatives with CPMLs
GiackAloZ Nov 21, 2024
edf5a8a
Add macros for second order CPML derivatives
GiackAloZ Nov 21, 2024
a4c5982
Polished up macros
GiackAloZ Nov 26, 2024
cdab2c2
Formatting
GiackAloZ Nov 26, 2024
de22441
Remove error print when boundary checking
GiackAloZ Nov 26, 2024
bcfb2e7
Refactor VD acoustic with new macros
GiackAloZ Nov 26, 2024
d37f1de
fix indices free surface
Nov 27, 2024
bd11d32
Merge branch 'develop' of gitlab.com:JuliaGeoph/SeismicWaves.jl into …
GiackAloZ Nov 27, 2024
1906a6b
Add support for different fields in gradient macro
GiackAloZ Nov 27, 2024
ae558e4
Refactor acoustic backends with new macros
GiackAloZ Nov 28, 2024
ba1d9af
Remove unnecessary @views
GiackAloZ Dec 3, 2024
a418952
Keep only one CPML coefficients implementation
GiackAloZ Dec 3, 2024
25b4ea6
Fix mirroring for free surface
GiackAloZ Dec 3, 2024
f5e81f7
Fix arbitrary source / receivers interpolations with corrected mirror…
GiackAloZ Jan 21, 2025
d1fec86
Merge branch "main" into develop
GiackAloZ Feb 3, 2025
81eb3a1
Merge branch "main" into develop
GiackAloZ Feb 3, 2025
74806bc
Fix merge
GiackAloZ Feb 3, 2025
122750f
Fix source scaling
GiackAloZ Feb 3, 2025
8c9f849
Add gradient smoothing for elastic backend
GiackAloZ Feb 19, 2025
9c2b0cd
add mute_grads.jl
inverseproblem Feb 26, 2025
af32dfc
Add single function to mute gradients at the source for all backends
inverseproblem Feb 28, 2025
af687dc
clean up mute_grad.jl
inverseproblem Feb 28, 2025
361d080
Add muting also around receivers
inverseproblem Feb 28, 2025
d7f75db
fix minor things in mute_grad.jl
inverseproblem Feb 28, 2025
db138aa
fix typo
inverseproblem Feb 28, 2025
322683e
Merge pull request #2 from GinvLab/smooth_grad_srcrec
inverseproblem Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.7.0"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
ParallelStencil = "94395366-693c-11ea-3b26-d9b7aac5d958"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ warn_logger = ConsoleLogger(stderr, Logging.Warn)
error_logger = ConsoleLogger(stderr, Logging.Error)
debug_logger = ConsoleLogger(stderr, Logging.Debug)

include("../../models.jl")
include("../../geometries.jl")
include("../../plotting_utils.jl")
include("../../../models.jl")
include("../../../geometries.jl")
include("../../../plotting_utils.jl")

function setup(nt, c0, c0max, r, dx, dy, dt, halo, rcoef, nx, ny, parall)
##========================================
Expand Down Expand Up @@ -81,7 +81,7 @@ function gradient_fd_check(wavesim, shots, matprop_const, matprop_gauss; compute
copy(shots[i].recs.positions),
nt;
observed=copy(shots[i].recs.seismograms),
invcov=Diagonal(ones(nt))
invcov=1.0 * I(nt)
)
# add pair as shot
push!(shots_obs, ScalarShot(; srcs=shots[i].srcs, recs=recs)) # srcs => recs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ warn_logger = ConsoleLogger(stderr, Logging.Warn)
error_logger = ConsoleLogger(stderr, Logging.Error)
debug_logger = ConsoleLogger(stderr, Logging.Debug)

include("../../models.jl")
include("../../geometries.jl")
include("../../plotting_utils.jl")
include("../../../models.jl")
include("../../../geometries.jl")
include("../../../plotting_utils.jl")

function setup(nt, c0, c0max, rho0, rho0max, r, dx, dy, dt, halo, rcoef, nx, ny, parall)
##========================================
Expand Down Expand Up @@ -96,7 +96,7 @@ function gradient_fd_check(wavesim, shots, matprop_const, matprop_gauss)
copy(shots[i].recs.positions),
nt;
observed=copy(shots[i].recs.seismograms),
invcov=Diagonal(ones(nt))
invcov=1.0 * I(nt)
)
# add pair as shot
push!(shots_obs, ScalarShot(; srcs=shots[i].srcs, recs=recs)) # srcs => recs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Serialization

include("../../models.jl")
include("../../geometries.jl")
include("../../plotting_utils.jl")
include("../../../models.jl")
include("../../../geometries.jl")
include("../../../plotting_utils.jl")

# Numerical parameters
nt = 1000
Expand Down
Loading
Loading