diff --git a/dune/elasticity/common/nonlinearelasticityproblem.cc b/dune/elasticity/common/nonlinearelasticityproblem.cc index 39fc4b5f740ffe3345656340906892ad6f218c4a..0694f0c01dcb6ea1c52116d30537e68d3ca1b325 100644 --- a/dune/elasticity/common/nonlinearelasticityproblem.cc +++ b/dune/elasticity/common/nonlinearelasticityproblem.cc @@ -10,17 +10,17 @@ void NonlinearElasticityProblem<VectorType, MatrixType, Basis>::assembleQP(const const Basis& basis = material_->basis(); - GridFunctionPtr displace = std::make_shared<BasisGridFunction<Basis,VectorType> >(basis,iterate);A + GridFunctionPtr displace = std::make_shared<BasisGridFunction<Basis,VectorType> >(basis,iterate); // assemble quadratic term OperatorAssembler<Basis,Basis> globalAssembler(basis,basis); - globalAssembler.assemble(material_->secondDerivative(displace), A); + globalAssembler.assemble(material_->secondDerivative(displace), A_); // assemble linear term FunctionalAssembler<Basis> funcAssembler(basis); - funcAssembler.assemble(material_->firstDerivative(displace), f); - f -= *extForces_; - f *= -1; + funcAssembler.assemble(material_->firstDerivative(displace), f_); + f_ -= *extForces_; + f_ *= -1; } template <class VectorType, class MatrixType, class Basis> @@ -94,11 +94,11 @@ typename VectorType::field_type NonlinearElasticityProblem<VectorType,MatrixType template <class VectorType, class MatrixType, class Basis> typename VectorType::field_type NonlinearElasticityProblem<VectorType,MatrixType, Basis>::modelDecrease(const VectorType& correction) const { - // the model decrease is simply <f,corr> - 0.5 <corr, H corr> + // the model decrease is simply -<f,corr> - 0.5 <corr, H corr> VectorType tmp(correction.size()); - A.mv(correction, tmp); + A_.mv(correction, tmp); - return (f*correction) - 0.5 * (correction*tmp); + return (f_*correction) - 0.5 * (correction*tmp); } diff --git a/dune/elasticity/common/nonlinearelasticityproblem.hh b/dune/elasticity/common/nonlinearelasticityproblem.hh index 2a80781011b6a40f9577be989e40d6a8224f3581..f2da69b18d49ec981f0d9f814fa3a1c87710d151 100644 --- a/dune/elasticity/common/nonlinearelasticityproblem.hh +++ b/dune/elasticity/common/nonlinearelasticityproblem.hh @@ -44,9 +44,9 @@ public: field_type modelDecrease(const VectorType& correction) const; //! The quadratic part - MatrixType A; + MatrixType A_; //! The linear functional - VectorType f; + VectorType f_; private: //! The involved materials