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

[Cleanup] No reason to have width/height configurable

Also do not assign a double to an integer
parent ca0833dd
No related branches found
No related tags found
No related merge requests found
...@@ -112,17 +112,16 @@ int main(int argc, char *argv[]) { ...@@ -112,17 +112,16 @@ int main(int argc, char *argv[]) {
// {{{ Set up grid // {{{ Set up grid
using Grid = Dune::ALUGrid<dims, dims, Dune::simplex, Dune::nonconforming>; using Grid = Dune::ALUGrid<dims, dims, Dune::simplex, Dune::nonconforming>;
Dune::FieldVector<typename Grid::ctype, dims> lowerLeft(0); Dune::FieldVector<size_t, dims> lowerLeft(0);
Dune::FieldVector<typename Grid::ctype, dims> upperRight(1); Dune::FieldVector<size_t, dims> upperRight(1);
upperRight[0] = parset.get<size_t>("body.width"); upperRight[0] = 5;
upperRight[1] = parset.get<size_t>("body.height"); upperRight[1] = 1;
std::shared_ptr<Grid> grid; std::shared_ptr<Grid> grid;
{ {
Dune::array<unsigned int, dims> elements; Dune::array<unsigned int, dims> elements;
std::fill(elements.begin(), elements.end(), 1); for (size_t i = 0; i < dims; ++i)
elements[0] = parset.get<size_t>("body.width"); elements[i] = upperRight[i]; // 1x1 elements
elements[1] = parset.get<size_t>("body.height");
grid = Dune::StructuredGridFactory<Grid>::createSimplexGrid( grid = Dune::StructuredGridFactory<Grid>::createSimplexGrid(
lowerLeft, upperRight, elements); lowerLeft, upperRight, elements);
......
...@@ -10,8 +10,6 @@ finalTime = 15 ...@@ -10,8 +10,6 @@ finalTime = 15
youngModulus = 5e7 youngModulus = 5e7
poissonRatio = 0.3 # The closer we get to 0.5, the more wiggly everything gets poissonRatio = 0.3 # The closer we get to 0.5, the more wiggly everything gets
density = 5000 density = 5000
height = 1
width = 5
shearViscosity = 0 shearViscosity = 0
bulkViscosity = 0 bulkViscosity = 0
......
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