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

Make compile and use the faster NeoHooke implementation

parent db1befe0
Branches
Tags
No related merge requests found
#include <config.h> #include <config.h>
#include <dune/fufem/utilities/adolcnamespaceinjections.hh>
#include <dune/common/parametertreeparser.hh> #include <dune/common/parametertreeparser.hh>
#include <dune/common/bitsetvector.hh> #include <dune/common/bitsetvector.hh>
...@@ -29,12 +28,11 @@ ...@@ -29,12 +28,11 @@
#include <dune/solvers/transferoperators/mandelobsrestrictor.hh> #include <dune/solvers/transferoperators/mandelobsrestrictor.hh>
#include <dune/solvers/transferoperators/truncatedcompressedmgtransfer.hh> #include <dune/solvers/transferoperators/truncatedcompressedmgtransfer.hh>
#include <dune/solvers/iterationsteps/trustregiongsstep.hh> #include <dune/solvers/iterationsteps/trustregiongsstep.hh>
#include <dune/solvers/solvers/trustregionsolver.hh>
#include <dune/elasticity/common/nonlinearelasticityproblem.hh> #include <dune/elasticity/common/nonlinearelasticityproblem.hh>
#include <dune/elasticity/common/trustregionsolver.hh>
#define LAURSEN #define LAURSEN
#include <dune/elasticity/materials/neohookeanmaterial.hh> #include <dune/elasticity/materials/neohookeanmaterial.hh>
#include <dune/elasticity/materials/neohookematerial.hh>
// The grid dimension // The grid dimension
const int dim = 3; const int dim = 3;
...@@ -143,11 +141,10 @@ int main (int argc, char *argv[]) try ...@@ -143,11 +141,10 @@ int main (int argc, char *argv[]) try
// //
typedef P1NodalBasis<GridType::LeafGridView> P1Basis; typedef P1NodalBasis<GridType::LeafGridView> P1Basis;
P1Basis p1Basis(grid->leafGridView()); P1Basis p1Basis(grid->leafGridView());
typedef NeoHookeMaterial<P1Basis> MaterialType; typedef NeoHookeanMaterial<P1Basis> MaterialType;
MaterialType material(p1Basis, MaterialType material(p1Basis,
parameterSet.get<double>("E"), parameterSet.get<double>("E"),
parameterSet.get<double>("nu"), parameterSet.get<double>("nu"));
parameterSet.get<bool>("vectorMode"));
// /////////////////////////////////////////////////// // ///////////////////////////////////////////////////
...@@ -287,10 +284,9 @@ int main (int argc, char *argv[]) try ...@@ -287,10 +284,9 @@ int main (int argc, char *argv[]) try
typedef P2NodalBasis<GridType::LeafGridView> P2Basis; typedef P2NodalBasis<GridType::LeafGridView> P2Basis;
P2Basis p2Basis(grid->leafGridView()); P2Basis p2Basis(grid->leafGridView());
typedef NeoHookeMaterial<P2Basis> MaterialTypeP2; typedef NeoHookeanMaterial<P2Basis> MaterialTypeP2;
MaterialTypeP2 p2Material(p2Basis, parameterSet.get<field_type>("E"), MaterialTypeP2 p2Material(p2Basis, parameterSet.get<field_type>("E"),
parameterSet.get<field_type>("nu"), parameterSet.get<field_type>("nu"));
parameterSet.get<bool>("vectorMode"));
// P2 Forces // P2 Forces
VectorType p2ExtForces(p2Basis.size()); 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