diff --git a/dune/tectonic/globallaursennonlinearity.hh b/dune/tectonic/globallaursennonlinearity.hh index 2a6d14bf25bd21ac96f2e863e167fa15ccb8b73f..4b24e83c1a7c6e96ca0c955c76507086eedb16f1 100644 --- a/dune/tectonic/globallaursennonlinearity.hh +++ b/dune/tectonic/globallaursennonlinearity.hh @@ -15,12 +15,9 @@ template <int dim, class OuterFunctionType> class GlobalLaursenNonlinearity : public Dune::GlobalNonlinearity<dim> { public: GlobalLaursenNonlinearity( - std::vector<double> const &coefficientOfFriction, - std::vector<double> const &normalStress, + std::vector<double> const &mu, std::vector<double> const &normalStress, std::vector<Dune::FieldVector<double, 1>> const &nodalIntegrals) - : coefficientOfFriction(coefficientOfFriction), - normalStress(normalStress), - nodalIntegrals(nodalIntegrals) {} + : mu(mu), normalStress(normalStress), nodalIntegrals(nodalIntegrals) {} /* Return a restriction of the outer function to the i'th node. If @@ -39,14 +36,14 @@ class GlobalLaursenNonlinearity : public Dune::GlobalNonlinearity<dim> { virtual Dune::NiceFunction *restriction(int i) const { double coefficient = nodalIntegrals[i][0]; coefficient *= normalStress[i]; - coefficient *= 1 + coefficientOfFriction[i]; + coefficient *= 1 + mu[i]; return new OuterFunctionType(coefficient); } private: // TODO: If we're clever, we only store one vector with the precomputed // results - std::vector<double> coefficientOfFriction; + std::vector<double> mu; std::vector<double> normalStress; std::vector<Dune::FieldVector<double, 1>> nodalIntegrals; }; diff --git a/dune/tectonic/globalruinanonlinearity.hh b/dune/tectonic/globalruinanonlinearity.hh index a4fb93042e9406a7d03f58bda810b8379d44f103..a2b2cb68dbb7c19a746a46917bc6991cb27df5df 100644 --- a/dune/tectonic/globalruinanonlinearity.hh +++ b/dune/tectonic/globalruinanonlinearity.hh @@ -16,12 +16,11 @@ class GlobalRuinaNonlinearity : public Dune::GlobalNonlinearity<dim> { public: GlobalRuinaNonlinearity( std::vector<Dune::FieldVector<double, 1>> const &nodalIntegrals, - std::vector<double> const &a, - std::vector<double> const &coefficientOfFriction, + std::vector<double> const &a, std::vector<double> const &mu, std::vector<double> const &eta, std::vector<double> const &normalStress) : nodalIntegrals(nodalIntegrals), a(a), - coefficientOfFriction(coefficientOfFriction), + mu(mu), eta(eta), normalStress(normalStress) {} @@ -32,15 +31,14 @@ class GlobalRuinaNonlinearity : public Dune::GlobalNonlinearity<dim> { if (nodalIntegrals[i][0] == 0) return new Dune::TrivialFunction(); else - return new Dune::RuinaFunction(nodalIntegrals[i][0], a[i], - coefficientOfFriction[i], eta[i], + return new Dune::RuinaFunction(nodalIntegrals[i][0], a[i], mu[i], eta[i], normalStress[i]); } private: std::vector<Dune::FieldVector<double, 1>> nodalIntegrals; std::vector<double> a; - std::vector<double> coefficientOfFriction; + std::vector<double> mu; std::vector<double> eta; std::vector<double> normalStress; }; diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 97955995d5e6407e49eebb9522b1f6e92fead977..6eb97709eeb36b0d31d4efddcfd141d24a8de5f6 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -218,9 +218,9 @@ int main(int argc, char *argv[]) { // {{{ Assemble terms for the nonlinearity - std::vector<double> coefficientOfFriction; - coefficientOfFriction.resize(grid.size(grid.maxLevel(), dim)); - std::fill(coefficientOfFriction.begin(), coefficientOfFriction.end(), + std::vector<double> mu; + mu.resize(grid.size(grid.maxLevel(), dim)); + std::fill(mu.begin(), mu.end(), parset.get<double>("boundary.friction.mu")); std::vector<double> normalStress; @@ -244,11 +244,11 @@ int main(int argc, char *argv[]) { parset.get<double>("boundary.friction.eta")); myGlobalNonlinearity = new Dune::GlobalRuinaNonlinearity<dim>( - nodalIntegrals, a, coefficientOfFriction, eta, normalStress); + nodalIntegrals, a, mu, eta, normalStress); } else if (friction_model == std::string("Laursen")) { myGlobalNonlinearity = new Dune::GlobalLaursenNonlinearity<dim, Dune::LinearFunction>( - coefficientOfFriction, normalStress, nodalIntegrals); + mu, normalStress, nodalIntegrals); } else { assert(false); }