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

Templatize input point data type and other point metadata #1

Open
mrzv opened this issue Jun 1, 2015 · 3 comments
Open

Templatize input point data type and other point metadata #1

mrzv opened this issue Jun 1, 2015 · 3 comments
Assignees
Labels

Comments

@mrzv
Copy link
Member

mrzv commented Jun 1, 2015

Issue by Tom Peterka
Monday Nov 17, 2014 at 02:53 GMT


@mrzv
Copy link
Member Author

mrzv commented Jun 1, 2015

Comment by Dmitriy Morozov
Saturday Nov 22, 2014 at 22:03 GMT


I think here the tricky part is how generic you want to be. Currently, tess assumes that the point coordinates are floats (this is hard-coded all over the place). At the one end of the spectrum, we could simply templatize the input point type, but assume that the coordinates are float. On the other end, we could templatize the internal representation and allow for any coordinate type the user desires to use.

@mrzv
Copy link
Member Author

mrzv commented Jun 1, 2015

Comment by Tom Peterka
Saturday Nov 22, 2014 at 22:29 GMT


The other issue is whether we want to carry metadata around with the particles. This was one of the things that Berk (Kitware) wanted for VTK. I should talk to him again about this; somehow the VTK data model lets you associate data (mass, size, etc.) in some format with the particle. The issue also came up earlier for Carolyn too, where she needed to associate a molecular species (A,B, or C) with each particle. She ended up storing those in a separate file and looking them up herself. The real question is whether we need that metadata in the exchanged points so that tets and their vertices also have their metadata all in the same place. We don't need to write it into a file, VTK will provide the file output. But we may need to carry it around in memory and hand it all off to VTK together.

@mrzv
Copy link
Member Author

mrzv commented Jun 1, 2015

Comment by Dmitriy Morozov
Saturday Nov 22, 2014 at 23:20 GMT


Ah, interesting. I misunderstood the issue, so it's good to have clarification. I think the normal way to do it would be to templatize the point type within tess by some <class T>, which would be stored inside. There is a subtlety about making it efficient if the type is empty (which should be the default) — see empty base optimization — but it's not difficult.

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

No branches or pull requests

2 participants