Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
c316ffa1
Commit
c316ffa1
authored
6 years ago
by
Loic Hausammann
Browse files
Options
Downloads
Patches
Plain Diff
formating
parent
be51df56
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!671
Remove logger_parameters and update the header
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/logger.c
+22
-24
22 additions, 24 deletions
src/logger.c
with
22 additions
and
24 deletions
src/logger.c
+
22
−
24
View file @
c316ffa1
...
...
@@ -65,27 +65,25 @@
char
logger_version
[
logger_version_size
]
=
"0.1"
;
const
struct
mask_data
logger_mask_data
[
logger_count_mask
]
=
{
/* Particle's position */
{
3
*
sizeof
(
double
),
1
<<
logger_x
,
"positions"
},
/* Particle's velocity */
{
3
*
sizeof
(
float
),
1
<<
logger_v
,
"velocities"
},
/* Particle's acceleration */
{
3
*
sizeof
(
float
),
1
<<
logger_a
,
"accelerations"
},
/* Particle's entropy */
{
sizeof
(
float
),
1
<<
logger_u
,
"entropy"
},
/* Particle's smoothing length */
{
sizeof
(
float
),
1
<<
logger_h
,
"smoothing length"
},
/* Particle's density */
{
sizeof
(
float
),
1
<<
logger_rho
,
"density"
},
/* Particle's constants: mass (float) and ID (long long) */
{
sizeof
(
float
)
+
sizeof
(
long
long
),
1
<<
logger_consts
,
"consts"
},
/* Simulation time stamp: integertime and double time (e.g. scale
factor or time) */
{
sizeof
(
integertime_t
)
+
sizeof
(
double
),
1
<<
logger_timestamp
,
"timestamp"
}};
const
struct
mask_data
logger_mask_data
[
logger_count_mask
]
=
{
/* Particle's position */
{
3
*
sizeof
(
double
),
1
<<
logger_x
,
"positions"
},
/* Particle's velocity */
{
3
*
sizeof
(
float
),
1
<<
logger_v
,
"velocities"
},
/* Particle's acceleration */
{
3
*
sizeof
(
float
),
1
<<
logger_a
,
"accelerations"
},
/* Particle's entropy */
{
sizeof
(
float
),
1
<<
logger_u
,
"entropy"
},
/* Particle's smoothing length */
{
sizeof
(
float
),
1
<<
logger_h
,
"smoothing length"
},
/* Particle's density */
{
sizeof
(
float
),
1
<<
logger_rho
,
"density"
},
/* Particle's constants: mass (float) and ID (long long) */
{
sizeof
(
float
)
+
sizeof
(
long
long
),
1
<<
logger_consts
,
"consts"
},
/* Simulation time stamp: integertime and double time (e.g. scale
factor or time) */
{
sizeof
(
integertime_t
)
+
sizeof
(
double
),
1
<<
logger_timestamp
,
"timestamp"
}};
/**
* @brief Write the header of a chunk (offset + mask).
...
...
@@ -157,11 +155,11 @@ int logger_compute_chunk_size(unsigned int mask) {
}
else
{
for
(
int
i
=
0
;
i
<
logger_count_mask
;
i
++
)
{
for
(
int
i
=
0
;
i
<
logger_count_mask
;
i
++
)
{
if
(
mask
&
logger_mask_data
[
i
].
mask
)
{
size
+=
logger_mask_data
[
i
].
size
;
size
+=
logger_mask_data
[
i
].
size
;
}
}
}
}
return
size
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment