-
Notifications
You must be signed in to change notification settings - Fork 229
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
examples: free surface for coupled tti eqs #2173
Conversation
tests/test_adjoint.py
Outdated
@@ -90,7 +96,7 @@ def test_adjoint_F(self, mkey, shape, kernel, space_order, time_order, setup_fun | |||
location from data. This test uses the conventional dot test: | |||
< Fx, y> = <x, F^T y> | |||
""" | |||
tn = 500. # Final time | |||
tn = 1000. if mkey[-3:] == "-fs" else 500. # Final time (twice the time for fs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the truth is that using 500. or 1000. doesn't make difference, the original value can be used.
tests/test_adjoint.py
Outdated
@@ -155,7 +165,7 @@ def test_adjoint_J(self, mkey, shape, kernel, space_order, time_order, setup_fun | |||
dot test: | |||
< Jx, y> = <x ,J^T y> | |||
""" | |||
tn = 500. # Final time | |||
tn = 1000. if mkey[-3:] == "-fs" else 500. # Final time (twice the time for fs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the data in the linearized shot record is close to the end of the register time with very low values and that makes the values of the dot product be very low, that's why I increased the time, although it can be a lower value for example 750.
examples/seismic/tti/wavesolver.py
Outdated
warning("Bad arguments in AnisotropicWaveSolver() - " + | ||
"if model.fs is True, kernel should be centered. " + | ||
"Switching to 'centered'") | ||
self.kernel = 'centered' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should raise an error not change user set parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will use raise ValueError
then.
examples/seismic/tti/wavesolver.py
Outdated
@@ -34,6 +34,10 @@ def __init__(self, model, geometry, space_order=4, kernel='centered', | |||
self.geometry = geometry | |||
self.kernel = kernel | |||
|
|||
if model.fs and kernel == 'staggered': | |||
raise ValueError("Bad arguments in AnisotropicWaveSolver() - " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Free surface only supported for centered TTI kernel"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
|
||
# Add free surface | ||
if model.fs: | ||
stencils.append(freesurface(model, Eq(unext, stencilp))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to recreate the eq, just freesurface(first_stencil)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
firs_stencil
is defined with the "physdomain" subdomain, for that reason I used Eq
again
tests/test_adjoint.py
Outdated
@@ -27,6 +29,8 @@ class TestAdjoint(object): | |||
('layers', (60, 70), 'OT2', 8, 2, acoustic_setup), | |||
('layers', (60, 70), 'OT2', 4, 2, acoustic_setup), | |||
('layers', (60, 70), 'OT4', 2, 2, acoustic_setup), | |||
# 2D test with 2 layers and freesurface | |||
('layers-fs', (200, 80), 'OT2', 4, 2, acoustic_setup), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We trying to avoid these "larger" sizes for CI as it increases the test time quite a bit, would prefer the standard sizes used with the other cases and keep the tn
as it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right , I'll keep the smaller sizes and 500. ms
Codecov Report
@@ Coverage Diff @@
## master #2173 +/- ##
=======================================
Coverage 87.09% 87.10%
=======================================
Files 226 226
Lines 40175 40180 +5
Branches 7331 7332 +1
=======================================
+ Hits 34990 34998 +8
+ Misses 4605 4602 -3
Partials 580 580
|
…ormulation for tti case
Add FS for TTI case taking advantage of the available structure (subdomain def in
model.py,
freesurface
fctn with mirroring stuff, etc) created for the acoustic case. If I'm missing something, let me know.