Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <dune/fufem/symmetrictensor.hh> #include <dune/fufem/symmetrictensor.hh>
#include <dune/fufem/functions/virtualgridfunction.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 /** \brief Local assembler for the linearization of a nonlinear Neo-Hookean energy at a displacement u
* *
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
NeoHookeFunctionalAssembler(ctype lambda, ctype mu, const Dune::shared_ptr<GridFunction> displacement) : NeoHookeFunctionalAssembler(ctype lambda, ctype mu, const Dune::shared_ptr<GridFunction> displacement) :
lambda_(lambda), lambda_(lambda),
mu_(mu), mu_(mu),
configuration_(configuration) displacement_(displacement)
{} {}
//! Create assembler from material parameters //! Create assembler from material parameters
...@@ -117,29 +117,24 @@ public: ...@@ -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; typename GridFunction::DerivativeType localConfGrad;
if (configuration_->isDefinedOn(*element)) if (displacement_->isDefinedOn(*element))
configuration_->evaluateDerivativeLocal(*element, quadPos, localConfGrad); displacement_->evaluateDerivativeLocal(*element, quadPos, localConfGrad);
else else
configuration_->evaluateDerivative(geometry.global(quadPos),localConfGrad); displacement_->evaluateDerivative(geometry.global(quadPos),localConfGrad);
// evaluate the derminante of the deformation gradient
const ctype J = localConfGrad.determinant();
// compute linearization of the determinante of the deformation gradient // compute linearization of the determinante of the deformation gradient
FMdimdim linDefDet; FMdimdim linDefDet;
Dune::Elasticity::linearisedDefDet(localConfGrad,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 // make deformation gradient out of the discplacement
for (int i=0;i<dim;i++) for (int i=0;i<dim;i++)
localConfGrad[i][i] += 1; localConfGrad[i][i] += 1;
// evaluate the derminante of the deformation gradient
const ctype J = localConfGrad.determinant();
// collect terms // collect terms
FMdimdim fu(0); FMdimdim fu(0);
...@@ -162,8 +157,8 @@ public: ...@@ -162,8 +157,8 @@ public:
} }
/** \brief Set new configuration. In Newton iterations this needs to be assembled more than one time.*/ /** \brief Set new configuration. In Newton iterations this needs to be assembled more than one time.*/
void setConfiguration(Dune::shared_ptr<GridFunction> newConfig) { void setConfiguration(Dune::shared_ptr<GridFunction> newDisplacement) {
configuration_ = newConfig; displacement_ = newDisplacement;
} }
private: private:
...@@ -174,7 +169,7 @@ private: ...@@ -174,7 +169,7 @@ private:
ctype mu_; ctype mu_;
/** \brief The configuration at which the functional is evaluated.*/ /** \brief The configuration at which the functional is evaluated.*/
Dune::shared_ptr<GridFunction> configuration_; Dune::shared_ptr<GridFunction> displacement_;
}; };
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment