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

Solve another problem

parent 1bdc2ad1
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ void setup_boundary(GridView const &gridView, ...@@ -74,7 +74,7 @@ void setup_boundary(GridView const &gridView,
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) { } else if (coordinates[0] == 0 || coordinates[0] == end_points[0]) {
++neumann_nodes; ++neumann_nodes;
size_t const id = myVertexMapper.map(*it); size_t const id = myVertexMapper.map(*it);
neumannNodes[id] = true; neumannNodes[id] = true;
...@@ -94,8 +94,8 @@ void assemble_neumann(GridView const &gridView, FEBasis const &feBasis, ...@@ -94,8 +94,8 @@ void assemble_neumann(GridView const &gridView, FEBasis const &feBasis,
BoundaryPatch<GridView> neumannBoundary(gridView, neumannNodes); BoundaryPatch<GridView> neumannBoundary(gridView, neumannNodes);
LocalVectorType SampleVector(0); LocalVectorType SampleVector(0);
// FIXME: random values // FIXME: random values
SampleVector[0] = 1 + run / 1000; SampleVector[0] = 1 + run / 200;
SampleVector[1] = 2; SampleVector[1] = 0;
ConstantFunction<LocalVectorType, LocalVectorType> fNeumann(SampleVector); ConstantFunction<LocalVectorType, LocalVectorType> fNeumann(SampleVector);
NeumannBoundaryAssembler<GridType, LocalVectorType> neumannBoundaryAssembler( NeumannBoundaryAssembler<GridType, LocalVectorType> neumannBoundaryAssembler(
fNeumann); fNeumann);
...@@ -136,11 +136,11 @@ int main() { ...@@ -136,11 +136,11 @@ int main() {
// FIXME: Random values // FIXME: Random values
size_t const runs = 1000; size_t const runs = 1000;
double const E = 5e3; double const E = 1e4;
double const nu = 0.3; double const nu = 0.3;
int const refinements = 3; int const refinements = 5;
size_t const solver_maxIterations = 10000; size_t const solver_maxIterations = 100000;
double const solver_tolerance = 1e-4; double const solver_tolerance = 1e-6;
// {{{ Set up grid // {{{ Set up grid
typedef Dune::YaspGrid<dim> GridType; typedef Dune::YaspGrid<dim> GridType;
...@@ -214,13 +214,13 @@ int main() { ...@@ -214,13 +214,13 @@ 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(), 2.0); std::fill(normalStress.begin(), normalStress.end(), 0.1);
// TODO: Random value // TODO: Random value
std::vector<double> coefficientOfFriction; std::vector<double> coefficientOfFriction;
coefficientOfFriction.resize(grid.size(grid.maxLevel(), dim)); coefficientOfFriction.resize(grid.size(grid.maxLevel(), dim));
std::fill(coefficientOfFriction.begin(), coefficientOfFriction.end(), std::fill(coefficientOfFriction.begin(), coefficientOfFriction.end(),
1.0); 0.75);
Dune::GlobalNonlinearity<dim, Dune::LinearFunction> myGlobalNonlinearity( Dune::GlobalNonlinearity<dim, Dune::LinearFunction> myGlobalNonlinearity(
coefficientOfFriction, normalStress, nodalIntegrals); coefficientOfFriction, normalStress, nodalIntegrals);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment