From 65f569380aff55532668c0edd481211437e47e03 Mon Sep 17 00:00:00 2001 From: philippun Date: Wed, 12 Jul 2023 15:48:29 +0200 Subject: [PATCH] add: pseudo_example.cpp, Grid.hpp | creating new API file and pseudo example --- examples/pseudo_example.cpp | 25 +++++++++++++++++++++++++ include/tug/Grid.hpp | 0 2 files changed, 25 insertions(+) create mode 100644 examples/pseudo_example.cpp create mode 100644 include/tug/Grid.hpp diff --git a/examples/pseudo_example.cpp b/examples/pseudo_example.cpp new file mode 100644 index 0000000..09dfef2 --- /dev/null +++ b/examples/pseudo_example.cpp @@ -0,0 +1,25 @@ + +// create a new grid +// dimension is implicitly determined by number of arguments +// grid = new Grid(m=10, n=10) + +// array_x = array[] +// array_y = array[] +// grid.setAlpha_x(&array_x) +// grid.setAlpha_y(&array_y) + +// float time +// grid.setTimestep(time) + +// bc = new BoundaryCondition() +// grid.setBoundaryCondition(bc) + + + +// create new simulation run +// int iterations +// bool csv = true +// bool explicit = true +// simulation = new Simulation(grid, iterations) +// simulation.setSolver(BTCS, Thomas) +// simulation.run() \ No newline at end of file diff --git a/include/tug/Grid.hpp b/include/tug/Grid.hpp new file mode 100644 index 0000000..e69de29