Skip to content
Snippets Groups Projects
Commit d229081d authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Switch to Mooney Rivlin with Adol-C material

parent 03794bdf
Branches
Tags
No related merge requests found
#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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment