From cbb51725cacf3fd55b70dde01f181fb82ab9f653 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Thu, 15 Dec 2011 12:32:25 +0100 Subject: [PATCH] Typedef --- src/one-body-sample.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index ed357293..63896959 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -143,25 +143,22 @@ void assemble_nonlinearity( Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const> &myGlobalNonlinearity, Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> nodalIntegrals) { + typedef Dune::BlockVector<Dune::FieldVector<double, 1>> SingletonVectorType; + // {{{ Assemble terms for the nonlinearity - auto mu = - Dune::make_shared<Dune::BlockVector<Dune::FieldVector<double, 1>>>(size); + auto mu = Dune::make_shared<SingletonVectorType>(size); *mu = parset.get<double>("boundary.friction.mu"); - auto normalStress = - Dune::make_shared<Dune::BlockVector<Dune::FieldVector<double, 1>>>(size); + auto normalStress = Dune::make_shared<SingletonVectorType>(size); *normalStress = parset.get<double>("boundary.friction.normalstress"); std::string const friction_model = parset.get<std::string>("boundary.friction.model"); if (friction_model == std::string("Ruina")) { - auto a = Dune::make_shared<Dune::BlockVector<Dune::FieldVector<double, 1>>>( - size); + auto a = Dune::make_shared<SingletonVectorType>(size); *a = parset.get<double>("boundary.friction.ruina.a"); - auto eta = - Dune::make_shared<Dune::BlockVector<Dune::FieldVector<double, 1>>>( - size); + auto eta = Dune::make_shared<SingletonVectorType>(size); *eta = parset.get<double>("boundary.friction.eta"); myGlobalNonlinearity = -- GitLab