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