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[]) {
// {{{ Set up grid
using Grid = Dune::ALUGrid<dims, dims, Dune::simplex, Dune::nonconforming>;
Dune::FieldVector<typename Grid::ctype, dims> lowerLeft(0);
Dune::FieldVector<typename Grid::ctype, dims> upperRight(1);
upperRight[0] = parset.get<size_t>("body.width");
upperRight[1] = parset.get<size_t>("body.height");
Dune::FieldVector<size_t, dims> lowerLeft(0);
Dune::FieldVector<size_t, dims> upperRight(1);
upperRight[0] = 5;
upperRight[1] = 1;
std::shared_ptr<Grid> grid;
{
Dune::array<unsigned int, dims> elements;
std::fill(elements.begin(), elements.end(), 1);
elements[0] = parset.get<size_t>("body.width");
elements[1] = parset.get<size_t>("body.height");
for (size_t i = 0; i < dims; ++i)
elements[i] = upperRight[i]; // 1x1 elements
grid = Dune::StructuredGridFactory<Grid>::createSimplexGrid(
lowerLeft, upperRight, elements);
......
......@@ -10,8 +10,6 @@ finalTime = 15
youngModulus = 5e7
poissonRatio = 0.3 # The closer we get to 0.5, the more wiggly everything gets
density = 5000
height = 1
width = 5
shearViscosity = 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