Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marked particles in one output didn't correspond to the same particles #3

Open
trquinn opened this issue May 3, 2014 · 0 comments
Open

Comments

@trquinn
Copy link
Member

trquinn commented May 3, 2014

Date: Wed, 18 Nov 2009 14:01:08 -0800
From: Charlotte Christensen [email protected]
To: Tom Quinn [email protected]
Subject: tipsy error

[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "ANSI_X3.4-1968" character set.  ]
[ Some characters may be displayed incorrectly. ]

Hi Tom,
This is the minor bug I found (or at least I think it is a bug). I was
using writemark and readmark to track the same particles at different times.
I found that my marked particles in one output didn't correspond to the same
particles at a different timestep. I think the code in readmark.c at lines
82 to 89 should be

else if (index < nsph + ndark && i < header.nsph + header.ndark)
{
mark_dark[i - nsph]++;
}
else if(index < nbodies && i < header.nbodies)
{
mark_star[i - nsph - ndark]++;
}

instead of

else if (index < nsph + ndark && i < header.nsph + header.ndark)
{
mark_dark[i - header.nsph]++;
}
else if(index < nbodies && i < header.nbodies)
{
mark_star[i - header.nsph - header.ndark]++;
}

Basically, nsph and hdark rather than header.nsph and header.ndark in the
index.

Charlotte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant