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
4148e298
Commit
4148e298
authored
12 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
fix typo.
Former-commit-id: f9472e7287d9e07411297475cb378bfc29530acb
parent
e9ff1a7e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/debug.c
+31
-0
31 additions, 0 deletions
src/debug.c
with
31 additions
and
0 deletions
src/debug.c
+
31
−
0
View file @
4148e298
...
...
@@ -65,3 +65,34 @@ void printParticle ( struct part *parts , long long int id, int N ) {
}
/**
* @brief Looks for the particle with the given id and prints its information to the standard output.
*
* @param parts The array of particles.
* @param id The id too look for.
* @param N The size of the array of particles.
*
* (Should be used for debugging only as it runs in O(N).)
*/
void
printParticle_single
(
struct
part
*
p
)
{
printf
(
"## Particle: id=%lld, x=[%e,%e,%e], v=[%.3e,%.3e,%.3e], a=[%.3e,%.3e,%.3e], h=%.3e, h_dt=%.3e, wcount=%.3e, m=%.3e, rho=%.3e, rho_dh=%.3e, div_v=%.3e, u=%.3e, dudt=%.3e, bals=%.3e, POrho2=%.3e, v_sig=%.3e, dt=%.3e
\n
"
,
p
->
id
,
p
->
x
[
0
],
p
->
x
[
1
],
p
->
x
[
2
],
p
->
v
[
0
],
p
->
v
[
1
],
p
->
v
[
2
],
p
->
a
[
0
],
p
->
a
[
1
],
p
->
a
[
2
],
p
->
h
,
p
->
force
.
h_dt
,
p
->
density
.
wcount
,
p
->
mass
,
p
->
rho
,
p
->
rho_dh
,
p
->
density
.
div_v
,
p
->
u
,
p
->
force
.
u_dt
,
p
->
force
.
balsara
,
p
->
force
.
POrho2
,
p
->
force
.
v_sig
,
p
->
dt
);
}
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