[MOAB-dev] Attaching a C++ class to Mesh entities?
Anthony Scopatz
scopatz at gmail.com
Thu Oct 10 22:26:04 CDT 2013
Hello All,
This question came up on the PyNE
list<https://groups.google.com/d/topic/pyne-dev/f0qFFJqJvLI/discussion>recently
where we are trying to decide how to best represent materials on a
MOAB mesh. What we have is a Material class, which has a rich interface
that is tailored to the needs of nuclear engineering. We would like to
associate every entity with its own Material object. These materials may
change over time in the simulation. There are a handful of data fields on
this class:
composition: map<int, double>
mass: double
density: double
atoms_per_mole: double
meta: a JsonCpp instance for storing metadata
So the question is, what is the best way to do this? And what is the best
way to do this from within PyTAPS? I see two basic options:
1. Somehow flatten all of the data fields into tags and store them on the
mesh itself.
2. Keep an external dictionary / map which is keyed by the entity and
valued by Material objects
Maybe there is a third option where we can store a pointer to materials as
a tag? Any advice would be most appreciated!
Be Well
Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20131010/fb56be56/attachment.html>
More information about the moab-dev
mailing list