Code Monkey home page Code Monkey logo

waveform's Introduction

WAVEFORM - a softWAre enVironmEnt For nOnlinear inveRse probleMs

Waveform is a flexible and modular approach to solving PDE-constrained inverse problems that aims to

  • accurately reflect the underlying mathematics of the problem
  • produce readable code that reflects the underlying mathematics
  • scales easily from small 2D problems to large-scale 3D problems with minimal code modifications
  • allow users to integrate their own preconditioners, stencils, linear solvers, etc. easily in to the entire inversion framework

For more details, as well as the full design of the software, see (https://arxiv.org/abs/1703.09268). All functions are written by Curt Da Silva, unless indicated otherwise in the function documentation.

Requirements

Waveform requires Matlab (tested on R2015b), the Parallel Toolbox (for using parallelism), and the following packages:

Optional packages, for running certain examples

Installation

At the terminal, type

git clone [email protected]:slimgroup/WAVEFORM.git
matlab

In the Matlab console, once you have the prerequisite packages installed in your path, type

addpath(genpath('WAVEFORM'));
compile_waveform_mex;

Examples

The examples from the attendant paper, as well as some other scripts demonstrating how to use the framework, can be found in the /examples/ subdirectory.

Citing

If you find this software useful in your own work, please cite

"A Unified 2D/3D Large Scale Software Environment for Nonlinear Inverse Problems", Curt Da Silva and Felix J. Herrmann, 2017.

waveform's People

Contributors

curtd avatar henryk-modzelewski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waveform's Issues

Issue with returning Hessian

Hi!

I am trying to obtain Hessian by [f,g,h] = obj(m) where obj = misfit_setup(m0,Q,D,model_r,opts). However, the computation is failed due to incompatibility of the size of matrix multiplication. I tried to debug the code, and I found out the error lies in the PDEfunc.m line 266 or 268 from the function handler 'T' in

    if strcmp(func,HESS) 
        [H,comp_grid,T,DT_adj] = discrete_helmholtz(v,model,freq(k),params);        
    else
        [H,comp_grid,T] = discrete_helmholtz(v,model,freq(k),params);
    end  

This leads to error in line 368 for the Hessian computation.

case HESS_GN
            dm = to_comp*vec(input);
            dU = H\(-T(U)*dm); % Error HERE!
            dU = H'\(-Pr'*Pr*dU);
            output = output + sum_srcs(T(U)'*dU);

Below are the errors for your reference. Kindly seek your assistance in this matter.

Great thanks!

Unable to perform assignment because the indices on the left side are not compatible with the size of the
right side.

Error in opSpot/applyMultiply (line 96)
                    y(:,i) = op.multiply(x(:,i), mode);

Error in  *  (line 73)
         y = A.applyMultiply(B,1);

Error in PDEfunc (line 368)
            dU = H\(-T(U)*dm);

Error in PDEfunc_dist (line 221)
        dm = PDEfunc(func,v,Q,input,[],model,params,freqsxsy);

Error in oppHGN/multiply (line 67)
           y = PDEfunc_dist(PDEopts.HESS_GN,op.mt,op.Q,x,[],op.model,op.params);

Error in opSpot/applyMultiply (line 96)
                    y(:,i) = op.multiply(x(:,i), mode);

Error in opFoG/multiply (line 120)
              y = applyMultiply(op.children{2},x,mode);

Error in opSpot/applyMultiply (line 96)
                    y(:,i) = op.multiply(x(:,i), mode);

Error in  *  (line 73)
         y = A.applyMultiply(B,1);

Scaling issue when changing the gridsize

Hi Curt! I hope you are doing well. I noticed an issue with scaling when changing the gridsize. It seems that it should be corrected in line 298 of PDEfunc, however when model.d and params.dt are the same, not scaling happens. To make the wavefield amplitude invariant under changes of the gridspacing it should be scaled by 1/prod(model.d). Is that what you intend in this line? See example code attached.

Thanks and best regards,
Tristan

test_grid_scalling.m.zip

;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.