{"action":"created","comment":{"url":"https://api.github.com/repos/geodynamics/aspect/pulls/comments/116401164","pull_request_review_id":38015874,"id":116401164,"diff_hunk":"@@ -0,0 +1,108 @@\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+\n+#ifndef __aspect__model_simple_nonlinear_h\n+#define __aspect__model_simple_nonlinear_h\n+\n+#include <aspect/material_model/interface.h>\n+#include <aspect/simulator_access.h>\n+\n+namespace aspect\n+{\n+  namespace MaterialModel\n+  {\n+    using namespace dealii;\n+\n+    /**\n+     * A material model based on a simple powerlaw rheology and\n+     * Implements the derivatives needed for the Newton method.\n+     * TODO: more documentation.\n+     *\n+     * @ingroup MaterialModels\n+     */\n+    template <int dim>\n+    class SimpleNonlinear : public MaterialModel::Interface<dim>, public ::aspect::SimulatorAccess<dim>\n+    {\n+      public:\n+        std::vector<double> compute_volume_fractions( const std::vector<double> &compositional_fields) const;\n+\n+        virtual void evaluate(const MaterialModel::MaterialModelInputs<dim> &in,\n+                              MaterialModel::MaterialModelOutputs<dim> &out) const;\n+\n+        /**\n+         * Return whether the model is compressible or not.  Incompressibility\n+         * does not necessarily imply that the density is constant; rather, it\n+         * may still depend on temperature or pressure. In the current\n+         * context, compressibility means whether we should solve the continuity\n+         * equation as $\\nabla \\cdot (\\rho \\mathbf u)=0$ (compressible Stokes)\n+         * or as $\\nabla \\cdot \\mathbf{u}=0$ (incompressible Stokes).\n+        *\n+        * This material model is incompressible.\n+         */\n+        virtual bool is_compressible () const;\n+\n+        virtual double reference_viscosity () const;\n+\n+        virtual double reference_density () const;\n+\n+        static\n+        void\n+        declare_parameters (ParameterHandler &prm);\n+\n+        virtual\n+        void\n+        parse_parameters (ParameterHandler &prm);\n+\n+      private:\n+\n+        double reference_T;\n+\n+        /**\n+         * Defining a minimum strain rate stabilizes the viscosity calculation,\n+         * which involves a division by the strain rate. Units: $1/s$.\n+         */\n+        std::vector<double> min_strain_rate;\n+        std::vector<double> min_visc;\n+        std::vector<double> max_visc;\n+        std::vector<double> veff_coefficient;\n+        double ref_visc;\n+\n+        std::vector<double> thermal_diffusivity;\n+        std::vector<double> heat_capacity;\n+\n+\n+        std::vector<double> densities;\n+        std::vector<double> thermal_expansivities;\n+\n+\n+        std::vector<double> prefactor;\n+        std::vector<double> stress_exponent;\n+\n+        unsigned int n_fields;\n+        // averaging parameters\n+        double viscosity_averaging_p;","path":"include/aspect/material_model/simple_nonlinear.h","position":100,"original_position":100,"commit_id":"679ca6840ceceacefdd6f42a78b46b5958172ebf","original_commit_id":"679ca6840ceceacefdd6f42a78b46b5958172ebf","user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars1.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"body":"these are a lot of parameters. It will be that much more important to have a formula (in the class doc, and in particular in the documentation at the bottom of the .cc file) that explains how they all fit together.\r\n\r\nYou may then go back to the documentation of all of these member variables and explain what symbols in the formula they correspond to.","created_at":"2017-05-15T02:41:50Z","updated_at":"2017-05-15T02:52:55Z","html_url":"https://github.com/geodynamics/aspect/pull/1653#discussion_r116401164","pull_request_url":"https://api.github.com/repos/geodynamics/aspect/pulls/1653","_links":{"self":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/comments/116401164"},"html":{"href":"https://github.com/geodynamics/aspect/pull/1653#discussion_r116401164"},"pull_request":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1653"}}},"pull_request":{"url":"https://api.github.com/repos/geodynamics/aspect/pulls/1653","id":120472669,"html_url":"https://github.com/geodynamics/aspect/pull/1653","diff_url":"https://github.com/geodynamics/aspect/pull/1653.diff","patch_url":"https://github.com/geodynamics/aspect/pull/1653.patch","issue_url":"https://api.github.com/repos/geodynamics/aspect/issues/1653","number":1653,"state":"open","locked":false,"title":"Newton merge 3: To the spd factor visualisation and (a bit too far) beyond","user":{"login":"MFraters","id":7631629,"avatar_url":"https://avatars3.githubusercontent.com/u/7631629?v=3","gravatar_id":"","url":"https://api.github.com/users/MFraters","html_url":"https://github.com/MFraters","followers_url":"https://api.github.com/users/MFraters/followers","following_url":"https://api.github.com/users/MFraters/following{/other_user}","gists_url":"https://api.github.com/users/MFraters/gists{/gist_id}","starred_url":"https://api.github.com/users/MFraters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MFraters/subscriptions","organizations_url":"https://api.github.com/users/MFraters/orgs","repos_url":"https://api.github.com/users/MFraters/repos","events_url":"https://api.github.com/users/MFraters/events{/privacy}","received_events_url":"https://api.github.com/users/MFraters/received_events","type":"User","site_admin":false},"body":"This pull request was intended to only add a visualisation post processor for the spd factor computations. But to make that work I also needed material models to play with. \r\n\r\nSo I have rewritten drucker prager (@anne-glerum, are you oke with this?) to be able to compute the derivatives (analytically) and have written tests for them. The tests test the derivative of the material model (which are analytical) with a finite difference derivative. There are some cases where there are differences between these, which I can derive from both sides, but don't know which is actually better. ","created_at":"2017-05-14T04:15:50Z","updated_at":"2017-05-15T02:52:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1a10acb2fd4ddf59222e2115558422c97064346","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/geodynamics/aspect/pulls/1653/commits","review_comments_url":"https://api.github.com/repos/geodynamics/aspect/pulls/1653/comments","review_comment_url":"https://api.github.com/repos/geodynamics/aspect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geodynamics/aspect/issues/1653/comments","statuses_url":"https://api.github.com/repos/geodynamics/aspect/statuses/679ca6840ceceacefdd6f42a78b46b5958172ebf","head":{"label":"MFraters:add_spd_factor_visualisation","ref":"add_spd_factor_visualisation","sha":"679ca6840ceceacefdd6f42a78b46b5958172ebf","user":{"login":"MFraters","id":7631629,"avatar_url":"https://avatars3.githubusercontent.com/u/7631629?v=3","gravatar_id":"","url":"https://api.github.com/users/MFraters","html_url":"https://github.com/MFraters","followers_url":"https://api.github.com/users/MFraters/followers","following_url":"https://api.github.com/users/MFraters/following{/other_user}","gists_url":"https://api.github.com/users/MFraters/gists{/gist_id}","starred_url":"https://api.github.com/users/MFraters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MFraters/subscriptions","organizations_url":"https://api.github.com/users/MFraters/orgs","repos_url":"https://api.github.com/users/MFraters/repos","events_url":"https://api.github.com/users/MFraters/events{/privacy}","received_events_url":"https://api.github.com/users/MFraters/received_events","type":"User","site_admin":false},"repo":{"id":19946391,"name":"aspect","full_name":"MFraters/aspect","owner":{"login":"MFraters","id":7631629,"avatar_url":"https://avatars3.githubusercontent.com/u/7631629?v=3","gravatar_id":"","url":"https://api.github.com/users/MFraters","html_url":"https://github.com/MFraters","followers_url":"https://api.github.com/users/MFraters/followers","following_url":"https://api.github.com/users/MFraters/following{/other_user}","gists_url":"https://api.github.com/users/MFraters/gists{/gist_id}","starred_url":"https://api.github.com/users/MFraters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MFraters/subscriptions","organizations_url":"https://api.github.com/users/MFraters/orgs","repos_url":"https://api.github.com/users/MFraters/repos","events_url":"https://api.github.com/users/MFraters/events{/privacy}","received_events_url":"https://api.github.com/users/MFraters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MFraters/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/MFraters/aspect","forks_url":"https://api.github.com/repos/MFraters/aspect/forks","keys_url":"https://api.github.com/repos/MFraters/aspect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MFraters/aspect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MFraters/aspect/teams","hooks_url":"https://api.github.com/repos/MFraters/aspect/hooks","issue_events_url":"https://api.github.com/repos/MFraters/aspect/issues/events{/number}","events_url":"https://api.github.com/repos/MFraters/aspect/events","assignees_url":"https://api.github.com/repos/MFraters/aspect/assignees{/user}","branches_url":"https://api.github.com/repos/MFraters/aspect/branches{/branch}","tags_url":"https://api.github.com/repos/MFraters/aspect/tags","blobs_url":"https://api.github.com/repos/MFraters/aspect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MFraters/aspect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MFraters/aspect/git/refs{/sha}","trees_url":"https://api.github.com/repos/MFraters/aspect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MFraters/aspect/statuses/{sha}","languages_url":"https://api.github.com/repos/MFraters/aspect/languages","stargazers_url":"https://api.github.com/repos/MFraters/aspect/stargazers","contributors_url":"https://api.github.com/repos/MFraters/aspect/contributors","subscribers_url":"https://api.github.com/repos/MFraters/aspect/subscribers","subscription_url":"https://api.github.com/repos/MFraters/aspect/subscription","commits_url":"https://api.github.com/repos/MFraters/aspect/commits{/sha}","git_commits_url":"https://api.github.com/repos/MFraters/aspect/git/commits{/sha}","comments_url":"https://api.github.com/repos/MFraters/aspect/comments{/number}","issue_comment_url":"https://api.github.com/repos/MFraters/aspect/issues/comments{/number}","contents_url":"https://api.github.com/repos/MFraters/aspect/contents/{+path}","compare_url":"https://api.github.com/repos/MFraters/aspect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MFraters/aspect/merges","archive_url":"https://api.github.com/repos/MFraters/aspect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MFraters/aspect/downloads","issues_url":"https://api.github.com/repos/MFraters/aspect/issues{/number}","pulls_url":"https://api.github.com/repos/MFraters/aspect/pulls{/number}","milestones_url":"https://api.github.com/repos/MFraters/aspect/milestones{/number}","notifications_url":"https://api.github.com/repos/MFraters/aspect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MFraters/aspect/labels{/name}","releases_url":"https://api.github.com/repos/MFraters/aspect/releases{/id}","deployments_url":"https://api.github.com/repos/MFraters/aspect/deployments","created_at":"2014-05-19T15:08:19Z","updated_at":"2016-01-13T15:59:16Z","pushed_at":"2017-05-14T15:47:22Z","git_url":"git://github.com/MFraters/aspect.git","ssh_url":"git@github.com:MFraters/aspect.git","clone_url":"https://github.com/MFraters/aspect.git","svn_url":"https://github.com/MFraters/aspect","homepage":null,"size":144343,"stargazers_count":0,"watchers_count":0,"language":"Gnuplot","has_issues":false,"has_projects":true,"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":"7156933b320b796c939ed73a700b047963f20812","user":{"login":"geodynamics","id":4052461,"avatar_url":"https://avatars2.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://avatars2.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":"2017-05-09T19:31:14Z","pushed_at":"2017-05-15T02:51:31Z","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":149001,"stargazers_count":33,"watchers_count":33,"language":"Gnuplot","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":70,"mirror_url":null,"open_issues_count":160,"forks":70,"open_issues":160,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1653"},"html":{"href":"https://github.com/geodynamics/aspect/pull/1653"},"issue":{"href":"https://api.github.com/repos/geodynamics/aspect/issues/1653"},"comments":{"href":"https://api.github.com/repos/geodynamics/aspect/issues/1653/comments"},"review_comments":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1653/comments"},"review_comment":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geodynamics/aspect/pulls/1653/commits"},"statuses":{"href":"https://api.github.com/repos/geodynamics/aspect/statuses/679ca6840ceceacefdd6f42a78b46b5958172ebf"}}}}
{"actor":{"display_login":"bangerth"}}