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
aad9e43b
"git@gitlab.cosma.dur.ac.uk:swift/swiftsim.git" did not exist on "95d9c22afb4302d44d8154064d279397978e7d9e"
Commit
aad9e43b
authored
7 years ago
by
lhausamm
Committed by
Loic Hausammann
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug fix, log_all now update last_offset
parent
6f8fe075
No related branches found
No related tags found
1 merge request
!502
Logger
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/logger.c
+4
-3
4 additions, 3 deletions
src/logger.c
src/logger.h
+1
-1
1 addition, 1 deletion
src/logger.h
with
5 additions
and
4 deletions
src/logger.c
+
4
−
3
View file @
aad9e43b
...
...
@@ -177,17 +177,18 @@ int logger_size(unsigned int mask) {
/**
* @brief log all particles
*
* This function update the last_offset in #part
*
* @param p List of all the #part to log
* @param Np Number of particle to log
* @param dump The #dump in which to log the particle data
*/
void
logger_log_all
(
const
struct
part
*
p
,
const
long
long
Np
,
struct
dump
*
dump
)
{
void
logger_log_all
(
struct
part
*
p
,
const
long
long
Np
,
struct
dump
*
dump
)
{
const
unsigned
int
mask
=
logger_mask_x
|
logger_mask_v
|
logger_mask_a
|
logger_mask_u
|
logger_mask_h
|
logger_mask_rho
|
logger_mask_consts
;
for
(
long
long
i
=
0
;
i
<
Np
;
i
++
)
{
size_t
offset
=
p
[
i
].
last_offset
;
logger_log_part
(
&
p
[
i
],
mask
,
&
offset
,
dump
);
logger_log_part
(
&
p
[
i
],
mask
,
&
p
[
i
].
last_offset
,
dump
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/logger.h
+
1
−
1
View file @
aad9e43b
...
...
@@ -120,7 +120,7 @@ extern const unsigned int logger_data_size[];
/* Function prototypes. */
int
logger_size
(
unsigned
int
mask
);
void
logger_log_all
(
const
struct
part
*
p
,
void
logger_log_all
(
struct
part
*
p
,
const
long
long
Np
,
struct
dump
*
dump
);
void
logger_log_part
(
const
struct
part
*
p
,
const
unsigned
int
mask
,
size_t
*
offset
,
struct
dump
*
dump
);
...
...
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