Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
8293e6a3
Commit
8293e6a3
authored
Apr 12, 2011
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ModSim ass3: Source code cleanup.
parent
da8076a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
7 deletions
+8
-7
modsim/ass3/.gitignore
modsim/ass3/.gitignore
+1
-0
modsim/ass3/compare_osc.sh
modsim/ass3/compare_osc.sh
+4
-4
modsim/ass3/main.c
modsim/ass3/main.c
+3
-3
modsim/ass3/report/osc_euler.pdf
modsim/ass3/report/osc_euler.pdf
+0
-0
modsim/ass3/report/osc_rk2.pdf
modsim/ass3/report/osc_rk2.pdf
+0
-0
modsim/ass3/report/osc_rk4.pdf
modsim/ass3/report/osc_rk4.pdf
+0
-0
No files found.
modsim/ass3/.gitignore
View file @
8293e6a3
...
...
@@ -2,3 +2,4 @@ test
main
*.sgv
*.png
*.data
modsim/ass3/compare_osc.sh
View file @
8293e6a3
./main 0
cat
report/osc_euler
| ./plot.py report/osc_euler.pdf
cat
report/osc_rk2
| ./plot.py report/osc_rk2.pdf
cat
report/osc_rk4
| ./plot.py report/osc_rk4.pdf
#rm report/osc_euler report/osc_rk2 report/osc_rk4
cat
osc_euler.data
| ./plot.py report/osc_euler.pdf
cat
osc_rk2.data
| ./plot.py report/osc_rk2.pdf
cat
osc_rk4.data
| ./plot.py report/osc_rk4.pdf
rm
*
.data
modsim/ass3/main.c
View file @
8293e6a3
...
...
@@ -35,15 +35,15 @@ int main(int argc, char **argv) {
case
0
:
y0
[
0
]
=
10
.
0
;
y0
[
1
]
=
20
.
0
;
logfile
=
fopen
(
"
report/osc_euler
"
,
"w"
);
logfile
=
fopen
(
"
osc_euler.data
"
,
"w"
);
puts
(
"Integrating Euler method..."
);
INTEGRATE
(
Euler
,
.
0
,
100
.
0
,
COMPARE_DT
,
2
,
osc
);
logger_close
();
logfile
=
fopen
(
"
report/osc_rk2
"
,
"w"
);
logfile
=
fopen
(
"
osc_rk2.data
"
,
"w"
);
puts
(
"Integrating Runge-Kutta 2 method..."
);
INTEGRATE
(
RungeKutta2
,
.
0
,
100
.
0
,
COMPARE_DT
,
2
,
osc
);
logger_close
();
logfile
=
fopen
(
"
report/osc_rk4
"
,
"w"
);
logfile
=
fopen
(
"
osc_rk4.data
"
,
"w"
);
puts
(
"Integrating Runge-Kutta 4 method..."
);
INTEGRATE
(
RungeKutta4
,
.
0
,
100
.
0
,
COMPARE_DT
,
2
,
osc
);
break
;
...
...
modsim/ass3/report/osc_euler.pdf
View file @
8293e6a3
No preview for this file type
modsim/ass3/report/osc_rk2.pdf
View file @
8293e6a3
No preview for this file type
modsim/ass3/report/osc_rk4.pdf
View file @
8293e6a3
No preview for this file type
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