From 4d9846015f1437cea97f48e77a813aab7793df70 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Tue, 8 May 2012 15:17:42 +0200 Subject: [PATCH] Use parset.sub --- src/assemblers.cc | 15 +++++++-------- src/one-body-sample.cc | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/assemblers.cc b/src/assemblers.cc index df8cffe1..f8485a49 100644 --- a/src/assemblers.cc +++ b/src/assemblers.cc @@ -62,25 +62,24 @@ assemble_nonlinearity( typedef Dune::BlockVector<Dune::FieldVector<double, 1>> SingletonVectorType; // {{{ Assemble terms for the nonlinearity auto mu = Dune::make_shared<SingletonVectorType>(size); - *mu = parset.get<double>("boundary.friction.mu"); + *mu = parset.get<double>("mu"); auto normalStress = Dune::make_shared<SingletonVectorType>(size); - *normalStress = parset.get<double>("boundary.friction.normalstress"); + *normalStress = parset.get<double>("normalstress"); - std::string const friction_model = - parset.get<std::string>("boundary.friction.model"); + std::string const friction_model = parset.get<std::string>("model"); if (friction_model == std::string("Ruina")) { auto a = Dune::make_shared<SingletonVectorType>(size); - *a = parset.get<double>("boundary.friction.ruina.a"); + *a = parset.get<double>("ruina.a"); auto eta = Dune::make_shared<SingletonVectorType>(size); - *eta = parset.get<double>("boundary.friction.eta"); + *eta = parset.get<double>("eta"); auto b = Dune::make_shared<SingletonVectorType>(size); - *b = parset.get<double>("boundary.friction.ruina.b"); + *b = parset.get<double>("ruina.b"); auto L = Dune::make_shared<SingletonVectorType>(size); - *L = parset.get<double>("boundary.friction.ruina.L"); + *L = parset.get<double>("ruina.L"); return Dune::make_shared< Dune::GlobalRuinaNonlinearity<VectorType, MatrixType> const>( diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 30615613..04e210dc 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -251,7 +251,8 @@ int main(int argc, char *argv[]) { ++state_fpi) { auto myGlobalNonlinearity = assemble_nonlinearity<VectorType, OperatorType>( - finestSize, parset, nodalIntegrals, s4_new, h); + finestSize, parset.sub("boundary.friction"), nodalIntegrals, + s4_new, h); MyConvexProblemType const myConvexProblem(stiffnessMatrix, *myGlobalNonlinearity, b4); -- GitLab