Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F75519002
main.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 2, 17:34
Size
750 B
Mime Type
text/x-c
Expires
Sun, Aug 4, 17:34 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19562614
Attached To
rTSUNAMIPROJECT PHPC-TSUNAMI-PROJECT
main.cpp
View Options
#include <iostream>
#include <sstream>
#include "simulation.h"
#define G 127267.200000000
// Gravity, 9.82*(3.6)^2*1000 in [km / hr^2]
#define SIZE 500
// Size of map, Size*Size [km]
#define NX 2001
// Number of cells in each direction on the grid
#define TEND 0.05
// Simulation time in hours [hr]
#define DIR "../MatlabSource/"
int
main
()
{
double
DX
=
SIZE
*
1.0
/
NX
;
std
::
cout
<<
G
<<
" "
<<
SIZE
<<
" "
<<
NX
<<
" "
<<
TEND
<<
" dx: "
<<
DX
<<
std
::
endl
;
Simulation
simu
(
NX
,
G
,
SIZE
,
TEND
,
DX
,
DIR
);
float
l2
;
int
k
;
std
::
tie
(
l2
,
k
)
=
simu
.
compute
();
std
::
cout
<<
"nb steps "
<<
k
<<
" [l2 = "
<<
l2
<<
"]"
<<
std
::
endl
;
return
0
;
}
Event Timeline
Log In to Comment