[MOAB-dev] Attaching a C++ class to Mesh entities?
Tim Tautges
tautges at mcs.anl.gov
Fri Oct 11 11:03:10 CDT 2013
Hi Anthony,
As I've stated before, it would be better to view the material modeling problem as another interface, a sibling to
MOAB/iMesh, and relate entities in each of those interfaces through iRel/Lasso. Using the fundamental data model from
iMesh/MOAB and iGeom/CGM (entities, tags, sets, interface) also makes a certain amount of sense for materials, and
provides the scaffolding to which Lasso could connect and bind these interfaces together.
So, a question back to you: how thoroughly have you thought out your Materials class, and do you think it's a good
start at abstracting an interface to materials, at least for Pyne-type applications? If you have and it is, that could
be a good start, and you should tie it in to MOAB with that in mind. I keep thinking I should write a whitepaper on
this notion and put it somewhere... I'm convinced that this is the key to the stability of API/data model in MOAB &
friends, which has greatly simplified building applications like dagmc and others.
As for the option to flatten and store as tags... this is analogous to storing fields/operators as tags, I think. The
semantics of the fields are lost when we do that (the cost), while the benefit is putting the data in the same place as
the mesh and, in many cases (mostly when we use implicit data types) the ability to store and later visualize or
otherwise use that data.
- tim
On 10/10/2013 10:26 PM, Anthony Scopatz wrote:
> 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
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory
(tautges at mcs.anl.gov) (telecommuting from UW-Madison)
phone (gvoice): (608) 354-1459 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
More information about the moab-dev
mailing list