diff --git a/dune/elasticity/assemblers/neohookefunctionalassembler.hh b/dune/elasticity/assemblers/neohookefunctionalassembler.hh index 2292b8deb083c772f08089aa155681c72b976619..d4dc7d3fcea58eed100ecc95afd6761f19d59271 100644 --- a/dune/elasticity/assemblers/neohookefunctionalassembler.hh +++ b/dune/elasticity/assemblers/neohookefunctionalassembler.hh @@ -9,7 +9,7 @@ #include <dune/fufem/symmetrictensor.hh> #include <dune/fufem/functions/virtualgridfunction.hh> -#include <dune/elasticity/common/elasticityhelper.hh> +#include <dune/elasticity/common/elasticityhelpers.hh> /** \brief Local assembler for the linearization of a nonlinear Neo-Hookean energy at a displacement u * @@ -56,7 +56,7 @@ public: NeoHookeFunctionalAssembler(ctype lambda, ctype mu, const Dune::shared_ptr<GridFunction> displacement) : lambda_(lambda), mu_(mu), - configuration_(configuration) + displacement_(displacement) {} //! Create assembler from material parameters @@ -117,29 +117,24 @@ public: } - // evaluate the displacement gradients of the configuration at the quadrature point + // evaluate the displacement gradient at the quadrature point typename GridFunction::DerivativeType localConfGrad; - if (configuration_->isDefinedOn(*element)) - configuration_->evaluateDerivativeLocal(*element, quadPos, localConfGrad); + if (displacement_->isDefinedOn(*element)) + displacement_->evaluateDerivativeLocal(*element, quadPos, localConfGrad); else - configuration_->evaluateDerivative(geometry.global(quadPos),localConfGrad); - - // evaluate the derminante of the deformation gradient - const ctype J = localConfGrad.determinant(); + displacement_->evaluateDerivative(geometry.global(quadPos),localConfGrad); // compute linearization of the determinante of the deformation gradient FMdimdim linDefDet; Dune::Elasticity::linearisedDefDet(localConfGrad,linDefDet); - - - /* Compute the nonlinear strain tensor from the displacement gradient*/ - SymmetricTensor<dim> strain; - computeStrain(localConfGrad,strain); // make deformation gradient out of the discplacement for (int i=0;i<dim;i++) localConfGrad[i][i] += 1; + // evaluate the derminante of the deformation gradient + const ctype J = localConfGrad.determinant(); + // collect terms FMdimdim fu(0); @@ -162,8 +157,8 @@ public: } /** \brief Set new configuration. In Newton iterations this needs to be assembled more than one time.*/ - void setConfiguration(Dune::shared_ptr<GridFunction> newConfig) { - configuration_ = newConfig; + void setConfiguration(Dune::shared_ptr<GridFunction> newDisplacement) { + displacement_ = newDisplacement; } private: @@ -174,7 +169,7 @@ private: ctype mu_; /** \brief The configuration at which the functional is evaluated.*/ - Dune::shared_ptr<GridFunction> configuration_; + Dune::shared_ptr<GridFunction> displacement_; }; #endif