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

Material ids are not output correctly when using field_dump #149

Open
jjaraalm opened this issue Oct 29, 2021 · 0 comments
Open

Material ids are not output correctly when using field_dump #149

jjaraalm opened this issue Oct 29, 2021 · 0 comments

Comments

@jjaraalm
Copy link
Contributor

Trying to output material_ids is broken

vpic/src/vpic/dump.cc

Lines 643 to 644 in cd46b8a

const uint32_t * fref = reinterpret_cast<uint32_t *>(&f(i,j,k));
fileIO.write(&fref[varlist[v]], 1);

and

vpic/src/vpic/dump.cc

Lines 659 to 660 in cd46b8a

const uint32_t * fref = reinterpret_cast<uint32_t *>(&f(ioff,joff,koff));
fileIO.write(&fref[varlist[v]], 1);

assume that all fields of a field_t are 4 bytes wide, but material_id is only 2 bytes. The resulting output is not as expected.

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