Skip to content
Snippets Groups Projects
Commit 7098e5e4 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Minor simplifications and cleanup

parent e97dadab
No related branches found
No related tags found
No related merge requests found
...@@ -183,10 +183,6 @@ int main (int argc, char *argv[]) try ...@@ -183,10 +183,6 @@ int main (int argc, char *argv[]) try
GridView gridView = grid->leafGridView(); GridView gridView = grid->leafGridView();
#endif #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; using namespace Dune::Functions::BasisFactory;
// FE basis spanning the FE space that we are working in // FE basis spanning the FE space that we are working in
...@@ -205,8 +201,7 @@ int main (int argc, char *argv[]) try ...@@ -205,8 +201,7 @@ int main (int argc, char *argv[]) try
/////////////////////////////////////////// ///////////////////////////////////////////
// The entire boundary is Dirichlet boundary // The entire boundary is Dirichlet boundary
BitSetVector<1> dirichletVertices(gridView.size(dim), true); BoundaryPatch<GridView> dirichletBoundary(gridView, true);
BoundaryPatch<GridView> dirichletBoundary(gridView, dirichletVertices);
BitSetVector<dim> dirichletDofs(feBasis.size(), false); BitSetVector<dim> dirichletDofs(feBasis.size(), false);
constructBoundaryDofs(dirichletBoundary,feBasis,dirichletDofs); constructBoundaryDofs(dirichletBoundary,feBasis,dirichletDofs);
...@@ -359,6 +354,12 @@ int main (int argc, char *argv[]) try ...@@ -359,6 +354,12 @@ int main (int argc, char *argv[]) try
// Solve! // 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.iterateNamePrefix_ = "stage1-";
solver.setInitialIterate(x); solver.setInitialIterate(x);
solver.solve(); solver.solve();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment