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

Allow the width/height to be set

parent 7ce6cd85
No related branches found
No related tags found
No related merge requests found
......@@ -148,9 +148,13 @@ int main(int argc, char *argv[]) {
typedef Dune::ALUGrid<dim, dim, Dune::simplex, Dune::nonconforming>
GridType;
Dune::FieldVector<typename GridType::ctype, dim> lowerLeft(0);
Dune::FieldVector<typename GridType::ctype, dim> upperRight(1);
Dune::FieldVector<typename GridType::ctype, dim> upperRight(1); // depth 1
upperRight[0] = parset.get<size_t>("body.width");
upperRight[1] = parset.get<size_t>("body.height");
Dune::array<unsigned int, dim> elements;
std::fill(elements.begin(), elements.end(), 1);
elements[0] = parset.get<size_t>("body.width");
elements[1] = parset.get<size_t>("body.height");
auto grid = Dune::StructuredGridFactory<GridType>::createSimplexGrid(
lowerLeft, upperRight, elements);
......
......@@ -19,6 +19,8 @@ refinements = 4
E = 5e7
nu = 0.3 # The closer we get to 0.5, the more wiggly everything gets
density = 5000
height = 1
width = 1
[solver]
tolerance = 1e-10
......
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