add: pseudo_example.cpp, Grid.hpp | creating new API file and pseudo example
This commit is contained in:
parent
40573b81b2
commit
65f569380a
25
examples/pseudo_example.cpp
Normal file
25
examples/pseudo_example.cpp
Normal file
@ -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()
|
||||
0
include/tug/Grid.hpp
Normal file
0
include/tug/Grid.hpp
Normal file
Loading…
x
Reference in New Issue
Block a user