Skip to content
Snippets Groups Projects
Commit 2f30c080 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Solve a bigger problem

parent f89016a9
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@
#include "boost/format.hpp"
int const dim = 2;
int const dim = 3;
template <class GridView>
void setup_boundary(GridView const &gridView,
......@@ -93,7 +93,7 @@ void assemble_neumann(GridView const &gridView, FEBasis const &feBasis,
Dune::BlockVector<LocalVectorType> &
f) { // constant sample function on neumann boundary
BoundaryPatch<GridView> neumannBoundary(gridView, neumannNodes);
LocalVectorType SampleVector;
LocalVectorType SampleVector(0);
// FIXME: random values
SampleVector[0] = 1;
SampleVector[1] = 2;
......@@ -135,11 +135,11 @@ int main() {
typedef Dune::BlockVector<SmallVector> VectorType;
// FIXME: Random values
size_t const runs = 3;
double const E = 1;
size_t const runs = 1000;
double const E = 1e4;
double const nu = 0.3;
int const refinements = 5;
size_t const solver_maxIterations = 100;
int const refinements = 3;
size_t const solver_maxIterations = 10000;
double const solver_tolerance = 1e-4;
// {{{ Set up grid
......@@ -194,6 +194,7 @@ int main() {
leafView, p1Basis, frictionalNodes, nodalIntegrals);
for (size_t run = 1; run <= runs; ++run) {
std::cout << "Run: " << run << std::endl;
// b = neumann
assemble_neumann<GridType, GridType::LeafGridView, SmallVector, P1Basis>(
leafView, p1Basis, neumannNodes, b);
......@@ -205,7 +206,7 @@ int main() {
// TODO: Random value
std::vector<double> normalStress;
normalStress.resize(grid.size(grid.maxLevel(), dim));
std::fill(normalStress.begin(), normalStress.end(), 2.0);
std::fill(normalStress.begin(), normalStress.end(), 0.0);
// TODO: Random value
std::vector<double> coefficientOfFriction;
......@@ -225,7 +226,7 @@ int main() {
LoopSolver<VectorType> solver(&nonlinearGSStep, solver_maxIterations,
solver_tolerance, &energyNorm,
Solver::FULL); // Solver::QUIET);
Solver::QUIET); // Solver::QUIET);
solver.solve();
Dune::VTKWriter<GridType::LeafGridView> writer(leafView);
......@@ -247,7 +248,7 @@ int main() {
LoopSolver<VectorType> solver(&blockGSStep, solver_maxIterations,
solver_tolerance, &energyNorm,
Solver::FULL); // Solver::QUIET);
Solver::QUIET); // Solver::QUIET);
solver.solve();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment