salvus io, adjoints & sensitivity kernels · computational seismology department of earth...

32
| Computational Seismology Department of Earth Sciences, Institute of Geophysics MESS 2017 1 Salvus IO, Adjoints & Sensitivity Kernels

Upload: others

Post on 25-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics

MESS 2017

1

Salvus IO, Adjoints & Sensitivity Kernels

Page 2: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 2

Modular Design through Template Mixins

Wavefield I/O

Finite Elements

Basic Wave Equation

Additional Physics

Boundary Conditions

Tetrahedra Hexahedra

Attenuation Anisotropy

Acoustic Elastic

Absorbing

I/O

Quads Triangles

Dirichlet

Coupling

Page 3: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 3

Modular Design through Template Mixins

Wavefield I/O

Finite Elements

Basic Wave Equation

Additional Physics

Boundary Conditions

Hexahedra

Elastic

I/O

template class WavefieldIO< IsotropicElastic<

TensorGll3D< Hexahedra<HexP1>,

ORDER>>>;

Page 4: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 4

Modular Design through Template Mixins

Wavefield I/O

Finite Elements

Basic Wave Equation

Additional Physics

Boundary Conditions

Hexahedra

Scalar

Fluid-Solid Coupling

Absorbing BC

I/O

template class WavefieldIO< AbsorbingBoundary<

SolidToFluid< Scalar<

TensorGll3D< Hexahedra<HexP1>,

ORDER>>>;

Page 5: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 5

Wavefield IO for Volume, Surface and Point Data

Page 6: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 6

Wavefield IO for Volume, Surface and Point Data

Page 7: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 7

Extensions

Page 8: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 8

Extensions

Page 9: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 9

Forward Problem Given the material properties of the Earth, simulate the propagation of seismic waves through the subsurface. Inverse Problem Given a set of seismograms and a description of the seismic sources, determine the material parameters of the Earth.

Page 10: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 10

Nonlinear Optimization Problem

Inverse Problem

Reformulation as minimization problem

misfit regularization

§  model parameters §  data §  forward operator (the wave equation)

Page 11: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 11

A Topography Map of Misfit Land

contour lines of misfit functional

minimum

mk

negative gradient of the misfit functional

w.r.t. the model

Iterative minimization based on local information (misfit, derivatives)

(i) Find a direction along which the misfit decreases. (ii) Determine a step-length to update the model and ensure

Page 12: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 12

Full-Waveform Inversion

simplifying notation

misfit wave equation

Page 13: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 13

Deriving Adjoints without Physics

Page 14: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 14

easy

Deriving Adjoints without Physics

Page 15: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 15

easy

Deriving Adjoints without Physics

Page 16: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 16

easy

Deriving Adjoints without Physics

difficult

Page 17: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 17

easy difficult

Deriving Adjoints without Physics

Page 18: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 18

Abstraction from basic linear algebra

Deriving Adjoints without Physics

Page 19: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 19

Abstraction from basic linear algebra

Deriving Adjoints without Physics

linear systems vector-vector products

Page 20: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 20

Abstraction from basic linear algebra

Deriving Adjoints without Physics

linear systems vector-vector products

linear system vector-vector products

Page 21: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 21

Abstraction from basic linear algebra

Deriving Adjoints without Physics

linear systems vector-vector products

linear system vector-vector products

adjoint equation

Page 22: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 22

Back to the Wave Equation

§  The adjoint of a linear operator is the generalization of the transpose of a matrix

Page 23: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 23

Back to the Wave Equation

§  The adjoint of a linear operator is the generalization of the transpose of a matrix

2x integration by parts in time + initial time conditions (forward) + final time conditions (adjoint)

Page 24: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 24

Back to the Wave Equation

§  The adjoint of a linear operator is the generalization of the transpose of a matrix

symmetry of the elastic tensor

Page 25: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 25

Sensitivity Kernels

-1 1

nothing happens

How does the misfit change (up to first order) if we increase the model parameters?

misfit decreases

misfit increases

Page 26: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 26

Sensitivity Kernels

Page 27: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 27

Kernel Computations

for (auto i=0; i<mStoreLocalFieldData.size(); i++ ) mStoreLocalFieldData[i] = &(mEpsilonVoigt[i]); template <typename Element>void IsotropicElastic3D<Element>::updateKernel() { this->mGradient += (this->mEpsilonVoigt[0]

+ this->mEpsilonVoigt[1] + this->mEpsilonVoigt[2]) *

(this->mAdjEpsilonVoigt[3] + this->mAdjEpsilonVoigt[4] + this->mAdjEpsilonVoigt[5]);

} template <typename Element>void IsotropicElastic3D<Element>::writeKernel() { Element::sumFieldsInExodusModel(kernelFields, Element::MapIntPtsToVtx(

Element::applyTestAndIntegrate(this->mGradient)));}

Page 28: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 28

Kernel Computations

Page 29: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 29

Kernel Computations

Page 30: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 30

Unit Tests for Sensitivity Kernels

§  Example: Check for a consistently discretized adjoint equation and gradient by a finite-difference approximation

Page 31: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 31

Full-Waveform Inversion Workflow

Compute Update

Smoothing

Clipping

Depth scaling

Compute Gradients

Model Compute Update

Compute Misfits

Update

Automation is possible if §  Kernels and model parameterization are consistent §  File I/O and data transfer are efficiently handled §  A workflow management tool allows for reproducibility and user interaction

Page 32: Salvus IO, Adjoints & Sensitivity Kernels · Computational Seismology Department of Earth Sciences, Institute of Geophysics 11 A Topography Map of Misfit Land contour lines of misfit

| Computational Seismology Department of Earth Sciences, Institute of Geophysics 32

Final Remarks

§  Salvus is work in progress

§  Watch http://salvus.io for updates

§  Sign up to [email protected]

§  Please report bugs and feature requests