diff --git a/nonlinelast.cc b/nonlinelast.cc index d0ea39bfd7f6ad792bf097fe712117b40f5ff40b..aa49f53112e2923c4c59420c599e7f063c0cb5d0 100644 --- a/nonlinelast.cc +++ b/nonlinelast.cc @@ -1,5 +1,6 @@ #include <config.h> +#include <dune/fufem/utilities/adolcnamespaceinjections.hh> #include <dune/common/parametertreeparser.hh> #include <dune/common/bitsetvector.hh> @@ -34,6 +35,8 @@ #include <dune/elasticity/common/nonlinearelasticityproblem.hh> #define LAURSEN #include <dune/elasticity/materials/neohookeanmaterial.hh> +#include <dune/elasticity/materials/adolcmaterial.hh> +#include <dune/elasticity/materials/mooneyrivlinmaterial.hh> // The grid dimension const int dim = 3; @@ -152,11 +155,17 @@ int main (int argc, char *argv[]) try typedef P1NodalBasis<GridType::LeafGridView> P1Basis; P1Basis p1Basis(grid->leafGridView()); - typedef NeoHookeanMaterial<P1Basis> MaterialType; + //typedef NeoHookeanMaterial<P1Basis> MaterialType; + MooneyRivlinMaterial<P1Basis> localEnergy(p1Basis, + parameterSet.get<double>("E"), + parameterSet.get<double>("nu")); + using MaterialType = AdolcMaterial<P1Basis>; + MaterialType material(p1Basis, localEnergy, parameterSet.get<bool>("vectorMode")); + /* MaterialType material(p1Basis, parameterSet.get<double>("E"), parameterSet.get<double>("nu")); - +*/ // /////////////////////////////////////////////////// // Do a homotopy of the Dirichlet boundary data @@ -291,9 +300,10 @@ int main (int argc, char *argv[]) try typedef P2NodalBasis<GridType::LeafGridView> P2Basis; P2Basis p2Basis(grid->leafGridView()); - typedef NeoHookeanMaterial<P2Basis> MaterialTypeP2; - MaterialTypeP2 p2Material(p2Basis, parameterSet.get<field_type>("E"), + typedef MooneyRivlinMaterial<P2Basis> MaterialType2; + MaterialType2 p2localEnergy(p2Basis, parameterSet.get<field_type>("E"), parameterSet.get<field_type>("nu")); + AdolcMaterial<P2Basis> p2Material(p2Basis, p2localEnergy, false); // P2 Forces VectorType p2ExtForces(p2Basis.size());