From 1a741aea647d7956c12a1c8621b8716944642a4a Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Mon, 14 Nov 2011 11:58:38 +0100 Subject: [PATCH] coefficientOfFriction -> mu --- dune/tectonic/globallaursennonlinearity.hh | 11 ++++------- dune/tectonic/globalruinanonlinearity.hh | 10 ++++------ src/one-body-sample.cc | 10 +++++----- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/dune/tectonic/globallaursennonlinearity.hh b/dune/tectonic/globallaursennonlinearity.hh index 2a6d14bf..4b24e83c 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 a4fb9304..a2b2cb68 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 97955995..6eb97709 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); } -- GitLab