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
efd03369
Commit
efd03369
authored
Apr 10, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added logger_open().
parent
a391a1ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
modsim/ass3/logger.h
modsim/ass3/logger.h
+1
-0
modsim/ass3/main.c
modsim/ass3/main.c
+3
-3
No files found.
modsim/ass3/logger.h
View file @
efd03369
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdio.h>
#include <errno.h>
#include <errno.h>
void
logger_open
(
const
char
*
filename
);
void
logger
(
double
t
,
int
N
,
double
*
y
);
void
logger
(
double
t
,
int
N
,
double
*
y
);
void
logger_close
();
void
logger_close
();
...
...
modsim/ass3/main.c
View file @
efd03369
...
@@ -33,15 +33,15 @@ int main(int argc, char **argv) {
...
@@ -33,15 +33,15 @@ int main(int argc, char **argv) {
switch
(
atoi
(
argv
[
1
])
)
{
switch
(
atoi
(
argv
[
1
])
)
{
case
0
:
case
0
:
log
file
=
fopen
(
"report/osc_euler"
,
"w
"
);
log
ger_open
(
"report/osc_euler
"
);
puts
(
"Integrating Euler method..."
);
puts
(
"Integrating Euler method..."
);
INTEGRATE
(
Euler
,
.
0
,
40
.
0
,
COMPARE_DT
,
2
,
osc
);
INTEGRATE
(
Euler
,
.
0
,
40
.
0
,
COMPARE_DT
,
2
,
osc
);
logger_close
();
logger_close
();
log
file
=
fopen
(
"report/osc_rk2"
,
"w
"
);
log
ger_open
(
"report/osc_rk2
"
);
puts
(
"Integrating Runge-Kutta 2 method..."
);
puts
(
"Integrating Runge-Kutta 2 method..."
);
INTEGRATE
(
RungeKutta2
,
.
0
,
40
.
0
,
COMPARE_DT
,
2
,
osc
);
INTEGRATE
(
RungeKutta2
,
.
0
,
40
.
0
,
COMPARE_DT
,
2
,
osc
);
logger_close
();
logger_close
();
log
file
=
fopen
(
"report/osc_rk4"
,
"w
"
);
log
ger_open
(
"report/osc_rk4
"
);
puts
(
"Integrating Runge-Kutta 4 method..."
);
puts
(
"Integrating Runge-Kutta 4 method..."
);
INTEGRATE
(
RungeKutta4
,
.
0
,
40
.
0
,
COMPARE_DT
,
2
,
osc
);
INTEGRATE
(
RungeKutta4
,
.
0
,
40
.
0
,
COMPARE_DT
,
2
,
osc
);
break
;
break
;
...
...
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