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

Dcip/dev #650

Merged
merged 218 commits into from Jan 29, 2018
Merged

Dcip/dev #650

merged 218 commits into from Jan 29, 2018

Conversation

sgkang
Copy link
Contributor

@sgkang sgkang commented Nov 10, 2017

  • Survey Design for 2.5D Problem
  • Implementing Mixed B.C for 2.5D and 3D Problem_CC

@thast contribution:
Major updates to StaticUtils:

  • IO functions for UBC-GIF codes DCIP2D and DCIP3D
  • add Utils such electrode_separations or geometric_factor
  • Utils are now compatible with all types of survey

@fourndo contribution:

  • Add getJ forming sensitivity matrix explicitly
  • Add sensitivity weighting directive
  • Add functionality in Regularization to handle TreeMesh
  • Update IRLS directive
  • Change to Directive to convert reg, misfit to ComboObjective
  • Update SaveEveryIteration Directives for Combo

micmitch and others added 18 commits April 25, 2017 17:14
…ompatible. Changed the ”3D” “General” case so that it flips the sign on the z-component of Tx and Rx locs for the DCoctree code. Flipping sign was overwriting locs in original survey object so added some .copy() statements to safeguard this.
Clean up Rx and Src for DC

Test SurveyDesign Class for DC
… setting mixed BC

- SurveyDesign.py: visualize currents, fields, charges, and potentials
@codecov
Copy link

codecov bot commented Nov 10, 2017

Codecov Report

Merging #650 into master will increase coverage by 2.93%.
The diff coverage is 56.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #650      +/-   ##
==========================================
+ Coverage   71.03%   73.96%   +2.93%     
==========================================
  Files         104       99       -5     
  Lines       14429    14637     +208     
==========================================
+ Hits        10249    10826     +577     
+ Misses       4180     3811     -369
Impacted Files Coverage Δ
SimPEG/EM/__init__.py 100% <ø> (ø) ⬆️
SimPEG/EM/Static/SIP/RxSIP.py 90.74% <ø> (ø) ⬆️
SimPEG/EM/Static/DC/FieldsDC.py 68.6% <0%> (ø) ⬆️
SimPEG/EM/Static/IP/SurveyIP.py 100% <100%> (ø) ⬆️
SimPEG/PF/Gravity.py 62.55% <100%> (+0.67%) ⬆️
SimPEG/EM/Static/DC/RxDC.py 94.65% <100%> (+0.04%) ⬆️
SimPEG/EM/Static/DC/__init__.py 100% <100%> (ø) ⬆️
SimPEG/EM/Static/DC/SrcDC.py 95.83% <100%> (+0.48%) ⬆️
SimPEG/PF/Magnetics.py 62.1% <100%> (+0.25%) ⬆️
SimPEG/Problem.py 80.34% <20%> (-2.7%) ⬇️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 636d706...f8e20ee. Read the comment docs.

This was referenced Nov 10, 2017
@sgkang
Copy link
Contributor Author

sgkang commented Nov 11, 2017

Not sure why there are solver issues ...
any ideas? @lheagy

@lheagy lheagy changed the base branch from dev to master November 16, 2017 14:25
@sgkang
Copy link
Contributor Author

sgkang commented Jan 23, 2018

hi @lheagy i went through your comments and modified. Will be great to be merged.

@thast
Copy link
Member

thast commented Jan 23, 2018

hey @sgkang , most tests fails because of this missing package. Is it needed?
image

@@ -11,6 +11,7 @@
import scipy as sp
from SimPEG.Utils import Zero
from .BoundaryUtils import getxBCyBC_CC
from profilehooks import profile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgkang: can we remove this for now? I am not sure we want profilehooks to be something we require for SimPEG

@lheagy
Copy link
Member

lheagy commented Jan 23, 2018

Thanks @sgkang, this is looking good. If you don't mind, could you remove the profilehooks for now - I know it is useful for developing / diagnosing code efficiency issues, but I think we want to use it internally only and not distribute SimPEG code that relies on it

Copy link
Member

@lheagy lheagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all of your work on this everyone @sgkang, @thast, @fourndo, @micmitch!! There are lots of improvements here. I will post an issue related to the densifying of the projection matrices - we should be able to stay with sparse, but for now I think that can be addressed elsewhere.

I will give @rowanc1 a chance to take a look if you like and we can get this in 🎉

@lheagy
Copy link
Member

lheagy commented Jan 26, 2018

@sgkang: would you mind generating some release notes that highlight the major changes here? You can write them in the comment box on this pr and I will generate the release from there.

@thast, @fourndo: I will also ask you to also take a look and contribute a few bullet points of things that you have done!

@sgkang
Copy link
Contributor Author

sgkang commented Jan 28, 2018

Release note for dcip/dev branch

This release is motivated by enhancing DC/IP packages in SimPEG, and several contributors have sweated on this release for the past several months. There are four main categories that developments have been carried out:

  • Physics
  • Utilities
  • Inversion Directives

Highlights of each development is summarized below.

Physics

Handling Pole-Pole data

  • Mixed boundary condition for Problem2D_CC and Problem3D_CC

Easy import for DC and IP problems

  • Now DC and IP can be easily imported:
 from SimPEG import DC, IP

Storing Sensitivity

  • Sensitivity can be stored, and this option can be used in the inversion:
problem = DC.Problem3D_CC(mesh, storeJ=True, ...) 
J = problem.getJ(m)

Working DC octree inversion (thanks to @fourndo and @micmitch)

  • This is limited in a specific branch of discretize package: discretize/TreeMesh_CellGrad
  • Regularization and DC problems have been improved to handle octree and working!
  • Mesh generation utility has not been updated in this branch, but will be included in the next release.
  • IP problem has not been tested for octree yet.

Utilities for DC and IP problems (thanks to @thast )

Updated StaticUtils

  • IO functions for UBC-GIF codes DCIP2D and DCIP3D
  • add Utils such electrode_separations or geometric_factor
  • Utils are now compatible with all types of survey

Survey and I/O

  • IO class for DC problem is initiated, but still requires further developments.
  • Synthetic DC survey can be easily generated using StaticUtils + DC.IO + DC.Survey
# Initiate I/O class for DC
IO = DC.IO()
endl = np.array([[xmin, ymin, zmin], [xmax, ymax, zmax]])
# Generate DC survey object
survey = DC.Utils.gen_DCIPsurvey(endl, survey_type=survey_type, dim=2,
                                 a=10, b=10, n=10)
# Obtain ABMN locations
survey.getABMN_locations()
# Obtain 2D TensorMesh
mesh, actind = IO.set_mesh()
# Generate Topography    
topo, mesh1D = DC.Utils.genTopography(mesh, -10, 0, its=100)
# Generate active cells
actind = Utils.surface2ind_topo(mesh, np.c_[mesh1D.vectorCCx, topo])
# Drape electrode locations to topography
survey.drapeTopo(mesh, actind, option="top")

Inversion Directives (thanks to @fourndo!)

  • Add sensitivity weighting directive
  • Update IRLS directive
  • Change to Directive to convert regularization, misfit to ComboObjective

Copy link
Member

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome.

@micmitch
Copy link
Contributor

@fourndo Dom, I think that I remember you saying you had a fix for the problem we were having with Directives.SaveOutputEveryIteration(). I would be great if we could get that in as well!

@fourndo
Copy link
Member

fourndo commented Jan 29, 2018

@micmitch thanks for the reminder, Looks good on my side.

@lheagy lheagy merged commit 0afd266 into master Jan 29, 2018
DC project automation moved this from To do to Done Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
DC project
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants