Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
9ccbd0ac
Commit
9ccbd0ac
authored
Oct 18, 2012
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 2. japan scenario
parent
dd4321e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
controller.cpp
src/opengl/controller.cpp
+30
-1
controller.h
src/opengl/controller.h
+1
-1
No files found.
src/opengl/controller.cpp
View file @
9ccbd0ac
...
@@ -233,7 +233,7 @@ bool Controller::handleKeyPress( SDL_keysym *keysym) {
...
@@ -233,7 +233,7 @@ bool Controller::handleKeyPress( SDL_keysym *keysym) {
break
;
break
;
#ifdef ASAGI
#ifdef ASAGI
case
SDLK_4
:
case
SDLK_4
:
// Load scenario
3
// Load scenario
4
{
{
allowStep
=
paused
;
allowStep
=
paused
;
...
@@ -261,6 +261,35 @@ bool Controller::handleKeyPress( SDL_keysym *keysym) {
...
@@ -261,6 +261,35 @@ bool Controller::handleKeyPress( SDL_keysym *keysym) {
visualization
->
updateBathymetryVBO
(
simulation
);
visualization
->
updateBathymetryVBO
(
simulation
);
}
}
break
;
break
;
case
SDLK_5
:
// Load scenario 5
{
allowStep
=
paused
;
if
(
scenarios
[
4
]
==
0
)
{
//simulation area
float
simulationArea
[
4
];
simulationArea
[
0
]
=
-
450000
;
simulationArea
[
1
]
=
700000
;
simulationArea
[
2
]
=
-
1000000
;
simulationArea
[
3
]
=
1450000
;
scenarios
[
4
]
=
new
SWE_AsagiScenario
(
ASAGI_INPUT_DIR
"tohoku_gebco_ucsb3_500m_hawaii_bath.nc"
,
ASAGI_INPUT_DIR
"tohoku_gebco_ucsb3_500m_hawaii_displ.nc"
,
(
float
)
28800.
,
simulationArea
);
}
SWE_Scenario
*
newScene
=
scenarios
[
4
];
// define grid size and initial time step
float
dx
=
(
newScene
->
getBoundaryPos
(
BND_RIGHT
)
-
newScene
->
getBoundaryPos
(
BND_LEFT
)
)
/
SWE_Block
::
getNx
();
float
dy
=
(
newScene
->
getBoundaryPos
(
BND_TOP
)
-
newScene
->
getBoundaryPos
(
BND_BOTTOM
)
)
/
SWE_Block
::
getNy
();
SWE_Block
::
initGridData
(
SWE_Block
::
getNx
(),
SWE_Block
::
getNy
(),
dx
,
dy
);
simulation
->
loadNewScenario
(
newScene
,
NULL
);
visualization
->
updateBathymetryVBO
(
simulation
);
}
break
;
#endif // ASAGI
#endif // ASAGI
default
:
default
:
break
;
break
;
...
...
src/opengl/controller.h
View file @
9ccbd0ac
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "visualization.h"
#include "visualization.h"
/** The number of different scenarios */
/** The number of different scenarios */
#define SCENARIO_COUNT
4
#define SCENARIO_COUNT
5
class
Controller
{
class
Controller
{
public
:
public
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment