{"action":"created","comment":{"url":"https://api.github.com/repos/geodynamics/aspect/pulls/comments/69199872","id":69199872,"diff_hunk":"@@ -0,0 +1,975 @@\n+/*\n+  Copyright (C) 2011 - 2015 by the authors of the ASPECT code.\n+\n+  This file is part of ASPECT.\n+\n+  ASPECT is free software; you can redistribute it and/or modify\n+  it under the terms of the GNU General Public License as published by\n+  the Free Software Foundation; either version 2, or (at your option)\n+  any later version.\n+\n+  ASPECT is distributed in the hope that it will be useful,\n+  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+  GNU General Public License for more details.\n+\n+  You should have received a copy of the GNU General Public License\n+  along with ASPECT; see the file doc/COPYING.  If not see\n+  <http://www.gnu.org/licenses/>.\n+*/\n+#include <deal.II/base/quadrature_lib.h>\n+#include <deal.II/fe/fe_values.h>\n+\n+#include <aspect/utilities.h>\n+#include <aspect/postprocess/geoid.h>\n+#include <aspect/geometry_model/spherical_shell.h>\n+\n+namespace aspect\n+{\n+  namespace Postprocess\n+  {\n+    namespace internal\n+    {\n+      /* Definitions for HarmonicCoefficients */\n+\n+      template <int dim>\n+      HarmonicCoefficients<dim>::HarmonicCoefficients(const unsigned int max_degree)\n+      {\n+        // Allocate vectors of the appropriate size for 2D and 3D.  For 2D we\n+        // need cylindrical harmonics, for 3D we need spherical harmonics.\n+\n+        unsigned int k= (dim == 2 ?\n+                         2 * (max_degree + 1 ) :             //cylindrical harmonics\n+                         (max_degree+1)*(max_degree+2)/2 ) ; //spherical harmonics\n+        sine_coefficients.resize(k);\n+        cosine_coefficients.resize(k);\n+      }\n+\n+\n+      /* Definitions for the MultipoleExpansion base class */\n+\n+      // Constructor.  Just need the initialize the coefficients struct.\n+      template <int dim>\n+      MultipoleExpansion<dim>::MultipoleExpansion(const unsigned int max_degree)\n+        :\n+        max_degree(max_degree),\n+        coefficients(max_degree)\n+      {}\n+\n+      template <int dim>\n+      void\n+      MultipoleExpansion<dim>::add_quadrature_point( const Point<dim> &, const double, const double )\n+      {\n+        AssertThrow(false, ExcNotImplemented() );\n+      }\n+\n+      template <int dim>\n+      double\n+      MultipoleExpansion<dim>::evaluate( const Point<dim> &) const\n+      {\n+        AssertThrow(false, ExcNotImplemented() );\n+        return 0.0;\n+      }\n+\n+      //Return a reference to the internal representation of the multipole expansion\n+      template <int dim>\n+      const HarmonicCoefficients<dim> &\n+      MultipoleExpansion<dim>::get_coefficients () const\n+      {\n+        return coefficients;\n+      }\n+\n+      template <int dim>\n+      unsigned int\n+      MultipoleExpansion<dim>::degree () const\n+      {\n+        return max_degree;\n+      }\n+\n+      //Zero out the expansion in 2D\n+      template <>\n+      void MultipoleExpansion<2>::clear()\n+      {\n+        for (unsigned int n = 2; n <= max_degree; ++n)\n+          {\n+            coefficients.sine_coefficients[n] = 0.0;\n+            coefficients.cosine_coefficients[n] = 0.0;\n+          }\n+      }\n+\n+      //Zero out the expansion in 3D\n+      template <>\n+      void MultipoleExpansion<3>::clear()\n+      {\n+        for (unsigned int l = 2, k = 0; l <= max_degree; ++l)\n+          for (unsigned int m = 0; m <= l; ++m, ++k)\n+            {\n+              coefficients.sine_coefficients[k] = 0.0;\n+              coefficients.cosine_coefficients[k] = 0.0;\n+            }\n+      }\n+\n+      template <>\n+      void MultipoleExpansion<2>::sadd( double s, double a, const MultipoleExpansion &M )\n+      {\n+        AssertThrow( coefficients.sine_coefficients.size() == M.get_coefficients().sine_coefficients.size() ,\n+                     ExcInternalError() );\n+\n+        for (unsigned int n = 2; n <= max_degree; ++n)\n+          {\n+            coefficients.sine_coefficients[n] = s * coefficients.sine_coefficients[n] +","path":"source/postprocess/geoid.cc","position":120,"original_position":120,"commit_id":"f2a806f34a6516c677558cdcd1b344f9623d2f6f","original_commit_id":"f2a806f34a6516c677558cdcd1b344f9623d2f6f","user":{"login":"gassmoeller","id":7582930,"avatar_url":"https://avatars.githubusercontent.com/u/7582930?v=3","gravatar_id":"","url":"https://api.github.com/users/gassmoeller","html_url":"https://github.com/gassmoeller","followers_url":"https://api.github.com/users/gassmoeller/followers","following_url":"https://api.github.com/users/gassmoeller/following{/other_user}","gists_url":"https://api.github.com/users/gassmoeller/gists{/gist_id}","starred_url":"https://api.github.com/users/gassmoeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gassmoeller/subscriptions","organizations_url":"https://api.github.com/users/gassmoeller/orgs","repos_url":"https://api.github.com/users/gassmoeller/repos","events_url":"https://api.github.com/users/gassmoeller/events{/privacy}","received_events_url":"https://api.github.com/users/gassmoeller/received_events","type":"User","site_admin":false},"body":"Maybe I just did not understand this correctly, but in 2D you fill `sine_coefficients[2...end]`, but in 3D  you fill `sine_coefficients[0...end]`? Is this because of the different structure of the expansions?","created_at":"2016-06-30T19:59:39Z","updated_at":"2016-06-30T19:59:39Z","html_url":"https://github.com/geodynamics/aspect/pull/1060#discussion_r69199872","pull_request_url":"https://api.github.com/repos/geodynamics/aspect/pulls/1060","_links":{"self":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/comments/69199872"},"html":{"href":"https://github.com/geodynamics/aspect/pull/1060#discussion_r69199872"},"pull_request":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1060"}}},"pull_request":{"url":"https://api.github.com/repos/geodynamics/aspect/pulls/1060","id":75872183,"html_url":"https://github.com/geodynamics/aspect/pull/1060","diff_url":"https://github.com/geodynamics/aspect/pull/1060.diff","patch_url":"https://github.com/geodynamics/aspect/pull/1060.patch","issue_url":"https://api.github.com/repos/geodynamics/aspect/issues/1060","number":1060,"state":"open","locked":false,"title":"[WIP] Geoid postprocessor2","user":{"login":"ian-r-rose","id":5728311,"avatar_url":"https://avatars.githubusercontent.com/u/5728311?v=3","gravatar_id":"","url":"https://api.github.com/users/ian-r-rose","html_url":"https://github.com/ian-r-rose","followers_url":"https://api.github.com/users/ian-r-rose/followers","following_url":"https://api.github.com/users/ian-r-rose/following{/other_user}","gists_url":"https://api.github.com/users/ian-r-rose/gists{/gist_id}","starred_url":"https://api.github.com/users/ian-r-rose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ian-r-rose/subscriptions","organizations_url":"https://api.github.com/users/ian-r-rose/orgs","repos_url":"https://api.github.com/users/ian-r-rose/repos","events_url":"https://api.github.com/users/ian-r-rose/events{/privacy}","received_events_url":"https://api.github.com/users/ian-r-rose/received_events","type":"User","site_admin":false},"body":"Updated and rebased version of a Geoid postprocessor. Still a work in progress, but open for stylistic and organizational notes.","created_at":"2016-06-30T18:57:35Z","updated_at":"2016-06-30T19:59:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eceb1fe5718771873917f9a8c63b00368be89fb2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/geodynamics/aspect/pulls/1060/commits","review_comments_url":"https://api.github.com/repos/geodynamics/aspect/pulls/1060/comments","review_comment_url":"https://api.github.com/repos/geodynamics/aspect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geodynamics/aspect/issues/1060/comments","statuses_url":"https://api.github.com/repos/geodynamics/aspect/statuses/f2a806f34a6516c677558cdcd1b344f9623d2f6f","head":{"label":"ian-r-rose:geoid_postprocessor2","ref":"geoid_postprocessor2","sha":"f2a806f34a6516c677558cdcd1b344f9623d2f6f","user":{"login":"ian-r-rose","id":5728311,"avatar_url":"https://avatars.githubusercontent.com/u/5728311?v=3","gravatar_id":"","url":"https://api.github.com/users/ian-r-rose","html_url":"https://github.com/ian-r-rose","followers_url":"https://api.github.com/users/ian-r-rose/followers","following_url":"https://api.github.com/users/ian-r-rose/following{/other_user}","gists_url":"https://api.github.com/users/ian-r-rose/gists{/gist_id}","starred_url":"https://api.github.com/users/ian-r-rose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ian-r-rose/subscriptions","organizations_url":"https://api.github.com/users/ian-r-rose/orgs","repos_url":"https://api.github.com/users/ian-r-rose/repos","events_url":"https://api.github.com/users/ian-r-rose/events{/privacy}","received_events_url":"https://api.github.com/users/ian-r-rose/received_events","type":"User","site_admin":false},"repo":{"id":19902476,"name":"aspect","full_name":"ian-r-rose/aspect","owner":{"login":"ian-r-rose","id":5728311,"avatar_url":"https://avatars.githubusercontent.com/u/5728311?v=3","gravatar_id":"","url":"https://api.github.com/users/ian-r-rose","html_url":"https://github.com/ian-r-rose","followers_url":"https://api.github.com/users/ian-r-rose/followers","following_url":"https://api.github.com/users/ian-r-rose/following{/other_user}","gists_url":"https://api.github.com/users/ian-r-rose/gists{/gist_id}","starred_url":"https://api.github.com/users/ian-r-rose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ian-r-rose/subscriptions","organizations_url":"https://api.github.com/users/ian-r-rose/orgs","repos_url":"https://api.github.com/users/ian-r-rose/repos","events_url":"https://api.github.com/users/ian-r-rose/events{/privacy}","received_events_url":"https://api.github.com/users/ian-r-rose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ian-r-rose/aspect","description":"Finite element parallel code to simulate problems in thermal convection in both 2D and 3D models.","fork":true,"url":"https://api.github.com/repos/ian-r-rose/aspect","forks_url":"https://api.github.com/repos/ian-r-rose/aspect/forks","keys_url":"https://api.github.com/repos/ian-r-rose/aspect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ian-r-rose/aspect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ian-r-rose/aspect/teams","hooks_url":"https://api.github.com/repos/ian-r-rose/aspect/hooks","issue_events_url":"https://api.github.com/repos/ian-r-rose/aspect/issues/events{/number}","events_url":"https://api.github.com/repos/ian-r-rose/aspect/events","assignees_url":"https://api.github.com/repos/ian-r-rose/aspect/assignees{/user}","branches_url":"https://api.github.com/repos/ian-r-rose/aspect/branches{/branch}","tags_url":"https://api.github.com/repos/ian-r-rose/aspect/tags","blobs_url":"https://api.github.com/repos/ian-r-rose/aspect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ian-r-rose/aspect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ian-r-rose/aspect/git/refs{/sha}","trees_url":"https://api.github.com/repos/ian-r-rose/aspect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ian-r-rose/aspect/statuses/{sha}","languages_url":"https://api.github.com/repos/ian-r-rose/aspect/languages","stargazers_url":"https://api.github.com/repos/ian-r-rose/aspect/stargazers","contributors_url":"https://api.github.com/repos/ian-r-rose/aspect/contributors","subscribers_url":"https://api.github.com/repos/ian-r-rose/aspect/subscribers","subscription_url":"https://api.github.com/repos/ian-r-rose/aspect/subscription","commits_url":"https://api.github.com/repos/ian-r-rose/aspect/commits{/sha}","git_commits_url":"https://api.github.com/repos/ian-r-rose/aspect/git/commits{/sha}","comments_url":"https://api.github.com/repos/ian-r-rose/aspect/comments{/number}","issue_comment_url":"https://api.github.com/repos/ian-r-rose/aspect/issues/comments{/number}","contents_url":"https://api.github.com/repos/ian-r-rose/aspect/contents/{+path}","compare_url":"https://api.github.com/repos/ian-r-rose/aspect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ian-r-rose/aspect/merges","archive_url":"https://api.github.com/repos/ian-r-rose/aspect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ian-r-rose/aspect/downloads","issues_url":"https://api.github.com/repos/ian-r-rose/aspect/issues{/number}","pulls_url":"https://api.github.com/repos/ian-r-rose/aspect/pulls{/number}","milestones_url":"https://api.github.com/repos/ian-r-rose/aspect/milestones{/number}","notifications_url":"https://api.github.com/repos/ian-r-rose/aspect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ian-r-rose/aspect/labels{/name}","releases_url":"https://api.github.com/repos/ian-r-rose/aspect/releases{/id}","deployments_url":"https://api.github.com/repos/ian-r-rose/aspect/deployments","created_at":"2014-05-18T04:04:13Z","updated_at":"2016-02-23T00:40:24Z","pushed_at":"2016-06-30T06:12:06Z","git_url":"git://github.com/ian-r-rose/aspect.git","ssh_url":"git@github.com:ian-r-rose/aspect.git","clone_url":"https://github.com/ian-r-rose/aspect.git","svn_url":"https://github.com/ian-r-rose/aspect","homepage":null,"size":120055,"stargazers_count":0,"watchers_count":0,"language":"Gnuplot","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"geodynamics:master","ref":"master","sha":"9cc3e2ba8e4e529e007702627df624446e56525d","user":{"login":"geodynamics","id":4052461,"avatar_url":"https://avatars.githubusercontent.com/u/4052461?v=3","gravatar_id":"","url":"https://api.github.com/users/geodynamics","html_url":"https://github.com/geodynamics","followers_url":"https://api.github.com/users/geodynamics/followers","following_url":"https://api.github.com/users/geodynamics/following{/other_user}","gists_url":"https://api.github.com/users/geodynamics/gists{/gist_id}","starred_url":"https://api.github.com/users/geodynamics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geodynamics/subscriptions","organizations_url":"https://api.github.com/users/geodynamics/orgs","repos_url":"https://api.github.com/users/geodynamics/repos","events_url":"https://api.github.com/users/geodynamics/events{/privacy}","received_events_url":"https://api.github.com/users/geodynamics/received_events","type":"Organization","site_admin":false},"repo":{"id":19502452,"name":"aspect","full_name":"geodynamics/aspect","owner":{"login":"geodynamics","id":4052461,"avatar_url":"https://avatars.githubusercontent.com/u/4052461?v=3","gravatar_id":"","url":"https://api.github.com/users/geodynamics","html_url":"https://github.com/geodynamics","followers_url":"https://api.github.com/users/geodynamics/followers","following_url":"https://api.github.com/users/geodynamics/following{/other_user}","gists_url":"https://api.github.com/users/geodynamics/gists{/gist_id}","starred_url":"https://api.github.com/users/geodynamics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geodynamics/subscriptions","organizations_url":"https://api.github.com/users/geodynamics/orgs","repos_url":"https://api.github.com/users/geodynamics/repos","events_url":"https://api.github.com/users/geodynamics/events{/privacy}","received_events_url":"https://api.github.com/users/geodynamics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geodynamics/aspect","description":"A parallel, extendible finite element code to simulate thermal convection in both 2D and 3D models.","fork":false,"url":"https://api.github.com/repos/geodynamics/aspect","forks_url":"https://api.github.com/repos/geodynamics/aspect/forks","keys_url":"https://api.github.com/repos/geodynamics/aspect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geodynamics/aspect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geodynamics/aspect/teams","hooks_url":"https://api.github.com/repos/geodynamics/aspect/hooks","issue_events_url":"https://api.github.com/repos/geodynamics/aspect/issues/events{/number}","events_url":"https://api.github.com/repos/geodynamics/aspect/events","assignees_url":"https://api.github.com/repos/geodynamics/aspect/assignees{/user}","branches_url":"https://api.github.com/repos/geodynamics/aspect/branches{/branch}","tags_url":"https://api.github.com/repos/geodynamics/aspect/tags","blobs_url":"https://api.github.com/repos/geodynamics/aspect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geodynamics/aspect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geodynamics/aspect/git/refs{/sha}","trees_url":"https://api.github.com/repos/geodynamics/aspect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geodynamics/aspect/statuses/{sha}","languages_url":"https://api.github.com/repos/geodynamics/aspect/languages","stargazers_url":"https://api.github.com/repos/geodynamics/aspect/stargazers","contributors_url":"https://api.github.com/repos/geodynamics/aspect/contributors","subscribers_url":"https://api.github.com/repos/geodynamics/aspect/subscribers","subscription_url":"https://api.github.com/repos/geodynamics/aspect/subscription","commits_url":"https://api.github.com/repos/geodynamics/aspect/commits{/sha}","git_commits_url":"https://api.github.com/repos/geodynamics/aspect/git/commits{/sha}","comments_url":"https://api.github.com/repos/geodynamics/aspect/comments{/number}","issue_comment_url":"https://api.github.com/repos/geodynamics/aspect/issues/comments{/number}","contents_url":"https://api.github.com/repos/geodynamics/aspect/contents/{+path}","compare_url":"https://api.github.com/repos/geodynamics/aspect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geodynamics/aspect/merges","archive_url":"https://api.github.com/repos/geodynamics/aspect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geodynamics/aspect/downloads","issues_url":"https://api.github.com/repos/geodynamics/aspect/issues{/number}","pulls_url":"https://api.github.com/repos/geodynamics/aspect/pulls{/number}","milestones_url":"https://api.github.com/repos/geodynamics/aspect/milestones{/number}","notifications_url":"https://api.github.com/repos/geodynamics/aspect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geodynamics/aspect/labels{/name}","releases_url":"https://api.github.com/repos/geodynamics/aspect/releases{/id}","deployments_url":"https://api.github.com/repos/geodynamics/aspect/deployments","created_at":"2014-05-06T16:47:18Z","updated_at":"2016-06-28T02:05:15Z","pushed_at":"2016-06-30T19:59:24Z","git_url":"git://github.com/geodynamics/aspect.git","ssh_url":"git@github.com:geodynamics/aspect.git","clone_url":"https://github.com/geodynamics/aspect.git","svn_url":"https://github.com/geodynamics/aspect","homepage":"http://aspect.dealii.org/","size":142310,"stargazers_count":27,"watchers_count":27,"language":"Gnuplot","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":146,"forks":57,"open_issues":146,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1060"},"html":{"href":"https://github.com/geodynamics/aspect/pull/1060"},"issue":{"href":"https://api.github.com/repos/geodynamics/aspect/issues/1060"},"comments":{"href":"https://api.github.com/repos/geodynamics/aspect/issues/1060/comments"},"review_comments":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1060/comments"},"review_comment":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1060/commits"},"statuses":{"href":"https://api.github.com/repos/geodynamics/aspect/statuses/f2a806f34a6516c677558cdcd1b344f9623d2f6f"}}}}
{"actor":{"display_login":"gassmoeller"}}