From 7098e5e4267eb9781db1f1161922d0e99a5637a6 Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Thu, 9 Sep 2021 10:17:58 +0200 Subject: [PATCH] Minor simplifications and cleanup --- src/quasiconvexity-test-micromorphic.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/quasiconvexity-test-micromorphic.cc b/src/quasiconvexity-test-micromorphic.cc index e214875..2dc74d0 100644 --- a/src/quasiconvexity-test-micromorphic.cc +++ b/src/quasiconvexity-test-micromorphic.cc @@ -183,10 +183,6 @@ int main (int argc, char *argv[]) try GridView gridView = grid->leafGridView(); #endif - // Extract all boundary vertices -// std::vector<std::pair<std::size_t, FieldVector<double,dim> > > boundaryVertices; -// BoundaryPatch<GridView> domainBoundary(gridView, true); - using namespace Dune::Functions::BasisFactory; // FE basis spanning the FE space that we are working in @@ -205,8 +201,7 @@ int main (int argc, char *argv[]) try /////////////////////////////////////////// // The entire boundary is Dirichlet boundary - BitSetVector<1> dirichletVertices(gridView.size(dim), true); - BoundaryPatch<GridView> dirichletBoundary(gridView, dirichletVertices); + BoundaryPatch<GridView> dirichletBoundary(gridView, true); BitSetVector<dim> dirichletDofs(feBasis.size(), false); constructBoundaryDofs(dirichletBoundary,feBasis,dirichletDofs); @@ -359,6 +354,12 @@ int main (int argc, char *argv[]) try // Solve! /////////////////////////////////////////////////////// + elasticEnergy->setLc(0); + std::cout << "Energy without regularization: " << assembler.computeEnergy(x) << std::endl; + elasticEnergy->setLc(parameterSet.get<double>("L_c")); + std::cout << "Energy with regularization: " << assembler.computeEnergy(x) << std::endl; + + solver.iterateNamePrefix_ = "stage1-"; solver.setInitialIterate(x); solver.solve(); -- GitLab