{"action":"created","comment":{"url":"https://api.github.com/repos/simpeg/simpeg/pulls/comments/54668720","id":54668720,"diff_hunk":"@@ -0,0 +1,294 @@\n+from SimPEG import *\n+\n+class FieldsDC_CC(Problem.Fields):\n+    knownFields = {'phi_sol':'CC'}\n+    aliasFields = {\n+                    'phi' : ['phi_sol','CC','_phi'],\n+                    'e' : ['phi_sol','F','_e'],\n+                    'j' : ['phi_sol','F','_j']\n+                  }\n+\n+    def __init__(self,mesh,survey,**kwargs):\n+        super(FieldsDC_CC, self).__init__(mesh, survey, **kwargs)\n+\n+    def startup(self):\n+        self._cellGrad = self.survey.prob.mesh.cellGrad\n+        self._Mfinv = self.survey.prob.mesh.getFaceInnerProduct(invMat=True)\n+\n+    def _phi(self, phi_sol, srcList):\n+        phi = phi_sol\n+        # for i, src in enumerate(srcList):\n+        #     phi_p = src.phi_p(self.survey.prob)\n+        #     if phi_p is not None:\n+        #         phi[:,i] += phi_p\n+        return phi\n+\n+    def _e(self, phi_sol, srcList):\n+        e = -self._cellGrad*phi_sol\n+        # for i, src in enumerate(srcList):\n+        #     e_p = src.e_p(self.survey.prob)\n+        #     if e_p is not None:\n+        #         e[:,i] += e_p\n+        return e\n+\n+    def _j(self, phi_sol, srcList):\n+\n+        j = -self._Mfinv*self.survey.prob.Msig*self._cellGrad*phi_sol\n+        # for i, src in enumerate(srcList):\n+        #     j_p = src.j_p(self.survey.prob)\n+        #     if j_p is not None:\n+        #         j[:,i] += j_p\n+        return j\n+\n+\n+\n+class SrcDipole(Survey.BaseSrc):\n+    \"\"\"A dipole source, locA and locB are moved to the closest cell-centers\"\"\"\n+\n+    current = 1\n+    loc  = None\n+    # _rhsDict = None","path":"SimPEG/DCIP/BaseDC.py","position":50,"original_position":50,"commit_id":"cba52c3b8132a6cfa5fb6c1c739a4b4a739d8b52","original_commit_id":"cba52c3b8132a6cfa5fb6c1c739a4b4a739d8b52","user":{"login":"lheagy","id":6361812,"avatar_url":"https://avatars.githubusercontent.com/u/6361812?v=3","gravatar_id":"","url":"https://api.github.com/users/lheagy","html_url":"https://github.com/lheagy","followers_url":"https://api.github.com/users/lheagy/followers","following_url":"https://api.github.com/users/lheagy/following{/other_user}","gists_url":"https://api.github.com/users/lheagy/gists{/gist_id}","starred_url":"https://api.github.com/users/lheagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lheagy/subscriptions","organizations_url":"https://api.github.com/users/lheagy/orgs","repos_url":"https://api.github.com/users/lheagy/repos","events_url":"https://api.github.com/users/lheagy/events{/privacy}","received_events_url":"https://api.github.com/users/lheagy/received_events","type":"User","site_admin":false},"body":"is this something to be implemented? or is it old and can be removed?","created_at":"2016-03-02T01:58:32Z","updated_at":"2016-03-02T01:58:32Z","html_url":"https://github.com/simpeg/simpeg/pull/236#discussion_r54668720","pull_request_url":"https://api.github.com/repos/simpeg/simpeg/pulls/236","_links":{"self":{"href":"https://api.github.com/repos/simpeg/simpeg/pulls/comments/54668720"},"html":{"href":"https://github.com/simpeg/simpeg/pull/236#discussion_r54668720"},"pull_request":{"href":"https://api.github.com/repos/simpeg/simpeg/pulls/236"}}},"pull_request":{"url":"https://api.github.com/repos/simpeg/simpeg/pulls/236","id":58491111,"html_url":"https://github.com/simpeg/simpeg/pull/236","diff_url":"https://github.com/simpeg/simpeg/pull/236.diff","patch_url":"https://github.com/simpeg/simpeg/pull/236.patch","issue_url":"https://api.github.com/repos/simpeg/simpeg/issues/236","number":236,"state":"open","locked":false,"title":"DC merge.","user":{"login":"rowanc1","id":913249,"avatar_url":"https://avatars.githubusercontent.com/u/913249?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanc1","html_url":"https://github.com/rowanc1","followers_url":"https://api.github.com/users/rowanc1/followers","following_url":"https://api.github.com/users/rowanc1/following{/other_user}","gists_url":"https://api.github.com/users/rowanc1/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanc1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanc1/subscriptions","organizations_url":"https://api.github.com/users/rowanc1/orgs","repos_url":"https://api.github.com/users/rowanc1/repos","events_url":"https://api.github.com/users/rowanc1/events{/privacy}","received_events_url":"https://api.github.com/users/rowanc1/received_events","type":"User","site_admin":false},"body":"* DC base problem\r\n* IP base problem\r\n* Adds `getIndicesSphere` to Utils\r\n* Examples for the DC problem","created_at":"2016-02-05T22:06:10Z","updated_at":"2016-03-02T01:58:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"562a846c63fb2509f1b1328369ebf74679c89227","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/simpeg/simpeg/pulls/236/commits","review_comments_url":"https://api.github.com/repos/simpeg/simpeg/pulls/236/comments","review_comment_url":"https://api.github.com/repos/simpeg/simpeg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/simpeg/simpeg/issues/236/comments","statuses_url":"https://api.github.com/repos/simpeg/simpeg/statuses/cba52c3b8132a6cfa5fb6c1c739a4b4a739d8b52","head":{"label":"simpeg:dcip/dev","ref":"dcip/dev","sha":"cba52c3b8132a6cfa5fb6c1c739a4b4a739d8b52","user":{"login":"simpeg","id":6043842,"avatar_url":"https://avatars.githubusercontent.com/u/6043842?v=3","gravatar_id":"","url":"https://api.github.com/users/simpeg","html_url":"https://github.com/simpeg","followers_url":"https://api.github.com/users/simpeg/followers","following_url":"https://api.github.com/users/simpeg/following{/other_user}","gists_url":"https://api.github.com/users/simpeg/gists{/gist_id}","starred_url":"https://api.github.com/users/simpeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simpeg/subscriptions","organizations_url":"https://api.github.com/users/simpeg/orgs","repos_url":"https://api.github.com/users/simpeg/repos","events_url":"https://api.github.com/users/simpeg/events{/privacy}","received_events_url":"https://api.github.com/users/simpeg/received_events","type":"Organization","site_admin":false},"repo":{"id":14727320,"name":"simpeg","full_name":"simpeg/simpeg","owner":{"login":"simpeg","id":6043842,"avatar_url":"https://avatars.githubusercontent.com/u/6043842?v=3","gravatar_id":"","url":"https://api.github.com/users/simpeg","html_url":"https://github.com/simpeg","followers_url":"https://api.github.com/users/simpeg/followers","following_url":"https://api.github.com/users/simpeg/following{/other_user}","gists_url":"https://api.github.com/users/simpeg/gists{/gist_id}","starred_url":"https://api.github.com/users/simpeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simpeg/subscriptions","organizations_url":"https://api.github.com/users/simpeg/orgs","repos_url":"https://api.github.com/users/simpeg/repos","events_url":"https://api.github.com/users/simpeg/events{/privacy}","received_events_url":"https://api.github.com/users/simpeg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simpeg/simpeg","description":"Simulation and Parameter Estimation in Geophysics  -  A python package for simulation and gradient based parameter estimation in the context of geophysical applications.","fork":false,"url":"https://api.github.com/repos/simpeg/simpeg","forks_url":"https://api.github.com/repos/simpeg/simpeg/forks","keys_url":"https://api.github.com/repos/simpeg/simpeg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simpeg/simpeg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simpeg/simpeg/teams","hooks_url":"https://api.github.com/repos/simpeg/simpeg/hooks","issue_events_url":"https://api.github.com/repos/simpeg/simpeg/issues/events{/number}","events_url":"https://api.github.com/repos/simpeg/simpeg/events","assignees_url":"https://api.github.com/repos/simpeg/simpeg/assignees{/user}","branches_url":"https://api.github.com/repos/simpeg/simpeg/branches{/branch}","tags_url":"https://api.github.com/repos/simpeg/simpeg/tags","blobs_url":"https://api.github.com/repos/simpeg/simpeg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simpeg/simpeg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simpeg/simpeg/git/refs{/sha}","trees_url":"https://api.github.com/repos/simpeg/simpeg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simpeg/simpeg/statuses/{sha}","languages_url":"https://api.github.com/repos/simpeg/simpeg/languages","stargazers_url":"https://api.github.com/repos/simpeg/simpeg/stargazers","contributors_url":"https://api.github.com/repos/simpeg/simpeg/contributors","subscribers_url":"https://api.github.com/repos/simpeg/simpeg/subscribers","subscription_url":"https://api.github.com/repos/simpeg/simpeg/subscription","commits_url":"https://api.github.com/repos/simpeg/simpeg/commits{/sha}","git_commits_url":"https://api.github.com/repos/simpeg/simpeg/git/commits{/sha}","comments_url":"https://api.github.com/repos/simpeg/simpeg/comments{/number}","issue_comment_url":"https://api.github.com/repos/simpeg/simpeg/issues/comments{/number}","contents_url":"https://api.github.com/repos/simpeg/simpeg/contents/{+path}","compare_url":"https://api.github.com/repos/simpeg/simpeg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simpeg/simpeg/merges","archive_url":"https://api.github.com/repos/simpeg/simpeg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simpeg/simpeg/downloads","issues_url":"https://api.github.com/repos/simpeg/simpeg/issues{/number}","pulls_url":"https://api.github.com/repos/simpeg/simpeg/pulls{/number}","milestones_url":"https://api.github.com/repos/simpeg/simpeg/milestones{/number}","notifications_url":"https://api.github.com/repos/simpeg/simpeg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simpeg/simpeg/labels{/name}","releases_url":"https://api.github.com/repos/simpeg/simpeg/releases{/id}","deployments_url":"https://api.github.com/repos/simpeg/simpeg/deployments","created_at":"2013-11-26T19:46:36Z","updated_at":"2016-01-27T23:32:06Z","pushed_at":"2016-03-02T01:56:12Z","git_url":"git://github.com/simpeg/simpeg.git","ssh_url":"git@github.com:simpeg/simpeg.git","clone_url":"https://github.com/simpeg/simpeg.git","svn_url":"https://github.com/simpeg/simpeg","homepage":null,"size":23370,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":49,"forks":5,"open_issues":49,"watchers":26,"default_branch":"master"}},"base":{"label":"simpeg:dev","ref":"dev","sha":"8bd4eedb830c987749f6fcaa4b94f558254e94ca","user":{"login":"simpeg","id":6043842,"avatar_url":"https://avatars.githubusercontent.com/u/6043842?v=3","gravatar_id":"","url":"https://api.github.com/users/simpeg","html_url":"https://github.com/simpeg","followers_url":"https://api.github.com/users/simpeg/followers","following_url":"https://api.github.com/users/simpeg/following{/other_user}","gists_url":"https://api.github.com/users/simpeg/gists{/gist_id}","starred_url":"https://api.github.com/users/simpeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simpeg/subscriptions","organizations_url":"https://api.github.com/users/simpeg/orgs","repos_url":"https://api.github.com/users/simpeg/repos","events_url":"https://api.github.com/users/simpeg/events{/privacy}","received_events_url":"https://api.github.com/users/simpeg/received_events","type":"Organization","site_admin":false},"repo":{"id":14727320,"name":"simpeg","full_name":"simpeg/simpeg","owner":{"login":"simpeg","id":6043842,"avatar_url":"https://avatars.githubusercontent.com/u/6043842?v=3","gravatar_id":"","url":"https://api.github.com/users/simpeg","html_url":"https://github.com/simpeg","followers_url":"https://api.github.com/users/simpeg/followers","following_url":"https://api.github.com/users/simpeg/following{/other_user}","gists_url":"https://api.github.com/users/simpeg/gists{/gist_id}","starred_url":"https://api.github.com/users/simpeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simpeg/subscriptions","organizations_url":"https://api.github.com/users/simpeg/orgs","repos_url":"https://api.github.com/users/simpeg/repos","events_url":"https://api.github.com/users/simpeg/events{/privacy}","received_events_url":"https://api.github.com/users/simpeg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simpeg/simpeg","description":"Simulation and Parameter Estimation in Geophysics  -  A python package for simulation and gradient based parameter estimation in the context of geophysical applications.","fork":false,"url":"https://api.github.com/repos/simpeg/simpeg","forks_url":"https://api.github.com/repos/simpeg/simpeg/forks","keys_url":"https://api.github.com/repos/simpeg/simpeg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simpeg/simpeg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simpeg/simpeg/teams","hooks_url":"https://api.github.com/repos/simpeg/simpeg/hooks","issue_events_url":"https://api.github.com/repos/simpeg/simpeg/issues/events{/number}","events_url":"https://api.github.com/repos/simpeg/simpeg/events","assignees_url":"https://api.github.com/repos/simpeg/simpeg/assignees{/user}","branches_url":"https://api.github.com/repos/simpeg/simpeg/branches{/branch}","tags_url":"https://api.github.com/repos/simpeg/simpeg/tags","blobs_url":"https://api.github.com/repos/simpeg/simpeg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simpeg/simpeg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simpeg/simpeg/git/refs{/sha}","trees_url":"https://api.github.com/repos/simpeg/simpeg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simpeg/simpeg/statuses/{sha}","languages_url":"https://api.github.com/repos/simpeg/simpeg/languages","stargazers_url":"https://api.github.com/repos/simpeg/simpeg/stargazers","contributors_url":"https://api.github.com/repos/simpeg/simpeg/contributors","subscribers_url":"https://api.github.com/repos/simpeg/simpeg/subscribers","subscription_url":"https://api.github.com/repos/simpeg/simpeg/subscription","commits_url":"https://api.github.com/repos/simpeg/simpeg/commits{/sha}","git_commits_url":"https://api.github.com/repos/simpeg/simpeg/git/commits{/sha}","comments_url":"https://api.github.com/repos/simpeg/simpeg/comments{/number}","issue_comment_url":"https://api.github.com/repos/simpeg/simpeg/issues/comments{/number}","contents_url":"https://api.github.com/repos/simpeg/simpeg/contents/{+path}","compare_url":"https://api.github.com/repos/simpeg/simpeg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simpeg/simpeg/merges","archive_url":"https://api.github.com/repos/simpeg/simpeg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simpeg/simpeg/downloads","issues_url":"https://api.github.com/repos/simpeg/simpeg/issues{/number}","pulls_url":"https://api.github.com/repos/simpeg/simpeg/pulls{/number}","milestones_url":"https://api.github.com/repos/simpeg/simpeg/milestones{/number}","notifications_url":"https://api.github.com/repos/simpeg/simpeg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simpeg/simpeg/labels{/name}","releases_url":"https://api.github.com/repos/simpeg/simpeg/releases{/id}","deployments_url":"https://api.github.com/repos/simpeg/simpeg/deployments","created_at":"2013-11-26T19:46:36Z","updated_at":"2016-01-27T23:32:06Z","pushed_at":"2016-03-02T01:56:12Z","git_url":"git://github.com/simpeg/simpeg.git","ssh_url":"git@github.com:simpeg/simpeg.git","clone_url":"https://github.com/simpeg/simpeg.git","svn_url":"https://github.com/simpeg/simpeg","homepage":null,"size":23370,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":49,"forks":5,"open_issues":49,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simpeg/simpeg/pulls/236"},"html":{"href":"https://github.com/simpeg/simpeg/pull/236"},"issue":{"href":"https://api.github.com/repos/simpeg/simpeg/issues/236"},"comments":{"href":"https://api.github.com/repos/simpeg/simpeg/issues/236/comments"},"review_comments":{"href":"https://api.github.com/repos/simpeg/simpeg/pulls/236/comments"},"review_comment":{"href":"https://api.github.com/repos/simpeg/simpeg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/simpeg/simpeg/pulls/236/commits"},"statuses":{"href":"https://api.github.com/repos/simpeg/simpeg/statuses/cba52c3b8132a6cfa5fb6c1c739a4b4a739d8b52"}}}}