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

Two-dimensional problem:

 * Dirichlet boundary at the top,
 * Neumann boundary on the left
 * Frictional boundary at the bottom
parent ad657193
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <dune/tectonic/myconvexproblem.hh> #include <dune/tectonic/myconvexproblem.hh>
#include <dune/tectonic/myblockproblem.hh> #include <dune/tectonic/myblockproblem.hh>
int const dim = 3; int const dim = 2;
template <class GridView> template <class GridView>
void setup_boundary(GridView const &gridView, void setup_boundary(GridView const &gridView,
...@@ -65,19 +65,19 @@ void setup_boundary(GridView const &gridView, ...@@ -65,19 +65,19 @@ void setup_boundary(GridView const &gridView,
Dune::GeometryType const gt = it->type(); Dune::GeometryType const gt = it->type();
assert(it->geometry().corners() == 1); assert(it->geometry().corners() == 1);
Dune::FieldVector<double, dim> const coordinates = it->geometry().corner(0); Dune::FieldVector<double, dim> const coordinates = it->geometry().corner(0);
if (coordinates[0] == end_points[0]) { if (coordinates[1] == end_points[0]) {
++dirichlet_nodes; ++dirichlet_nodes;
size_t const id = myVertexMapper.map(*it); size_t const id = myVertexMapper.map(*it);
ignoreNodes[id] = true; ignoreNodes[id] = true;
} else if (coordinates[1] == 0) { } else if (coordinates[1] == 0) {
++neumann_nodes;
size_t const id = myVertexMapper.map(*it);
neumannNodes[id] = true;
} else if (coordinates[0] == 0) {
++frictional_nodes; ++frictional_nodes;
size_t const id = myVertexMapper.map(*it); size_t const id = myVertexMapper.map(*it);
frictionalNodes[id] = true; frictionalNodes[id] = true;
ignoreNodes[id][1] = true; // Zero displacement in direction y ignoreNodes[id][1] = true; // Zero displacement in direction y
} else if (coordinates[0] == 0) {
++neumann_nodes;
size_t const id = myVertexMapper.map(*it);
neumannNodes[id] = true;
} }
} }
std::cout << "Number of Neumann nodes: " << neumann_nodes << std::endl; std::cout << "Number of Neumann nodes: " << neumann_nodes << std::endl;
...@@ -135,7 +135,7 @@ int main() { ...@@ -135,7 +135,7 @@ int main() {
// FIXME: Random values // FIXME: Random values
size_t const runs = 1000; size_t const runs = 1000;
double const E = 1e4; double const E = 5e3;
double const nu = 0.3; double const nu = 0.3;
int const refinements = 3; int const refinements = 3;
size_t const solver_maxIterations = 10000; size_t const solver_maxIterations = 10000;
...@@ -207,7 +207,7 @@ int main() { ...@@ -207,7 +207,7 @@ int main() {
// TODO: Random value // TODO: Random value
std::vector<double> normalStress; std::vector<double> normalStress;
normalStress.resize(grid.size(grid.maxLevel(), dim)); normalStress.resize(grid.size(grid.maxLevel(), dim));
std::fill(normalStress.begin(), normalStress.end(), 0.0); std::fill(normalStress.begin(), normalStress.end(), 2.0);
// TODO: Random value // TODO: Random value
std::vector<double> coefficientOfFriction; std::vector<double> coefficientOfFriction;
......
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