Commit c538116d authored by akbib's avatar akbib Committed by akbib@FU-BERLIN.DE
Browse files

-rename member configuration_ to what it actually is: the displacement

-bugfix: compute the determinant of the deformation gradient and not of the displacement gradient
-fix include

[[Imported from SVN: r11293]]
parent 79614f59
......@@ -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) :
//! 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);
// evaluate the derminante of the deformation gradient
const ctype J = localConfGrad.determinant();
// compute linearization of the determinante of the deformation gradient
FMdimdim linDefDet;
/* Compute the nonlinear strain tensor from the displacement gradient*/
SymmetricTensor<dim> 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;
......@@ -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_;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment