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,
size_t const id = myVertexMapper.map(*it);
frictionalNodes[id] = true;
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;
size_t const id = myVertexMapper.map(*it);
neumannNodes[id] = true;
......@@ -94,8 +94,8 @@ void assemble_neumann(GridView const &gridView, FEBasis const &feBasis,
BoundaryPatch<GridView> neumannBoundary(gridView, neumannNodes);
LocalVectorType SampleVector(0);
// FIXME: random values
SampleVector[0] = 1 + run / 1000;
SampleVector[1] = 2;
SampleVector[0] = 1 + run / 200;
SampleVector[1] = 0;
ConstantFunction<LocalVectorType, LocalVectorType> fNeumann(SampleVector);
NeumannBoundaryAssembler<GridType, LocalVectorType> neumannBoundaryAssembler(
fNeumann);
......@@ -136,11 +136,11 @@ int main() {
// FIXME: Random values
size_t const runs = 1000;
double const E = 5e3;
double const E = 1e4;
double const nu = 0.3;
int const refinements = 3;
size_t const solver_maxIterations = 10000;
double const solver_tolerance = 1e-4;
int const refinements = 5;
size_t const solver_maxIterations = 100000;
double const solver_tolerance = 1e-6;
// {{{ Set up grid
typedef Dune::YaspGrid<dim> GridType;
......@@ -214,13 +214,13 @@ 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.1);
// TODO: Random value
std::vector<double> coefficientOfFriction;
coefficientOfFriction.resize(grid.size(grid.maxLevel(), dim));
std::fill(coefficientOfFriction.begin(), coefficientOfFriction.end(),
1.0);
0.75);
Dune::GlobalNonlinearity<dim, Dune::LinearFunction> myGlobalNonlinearity(
coefficientOfFriction, normalStress, nodalIntegrals);
......
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