diff --git a/src/quasiconvexity-test-micromorphic.cc b/src/quasiconvexity-test-micromorphic.cc index e214875c764a9f4dd60917e89fce979b12ef6ccd..2dc74d0f5b22705dfa58c258d4448afee49bfa46 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();