[MOAB-dev] Attaching a C++ class to Mesh entities?

Jed Brown jedbrown at mcs.anl.gov
Fri Oct 11 11:17:35 CDT 2013


Anthony Scopatz <scopatz at gmail.com> writes:
> There are a handful of data fields on this class:
>
> composition: map<int, double>

You want to allocate dynamically for each cell in your mesh?  (This
isn't necessarily bad; dynamic allocation isn't all that expensive and
it depends what else you are doing.)

> mass: double
> density: double
> atoms_per_mole: double
> meta: a JsonCpp instance for storing metadata

Again, a different instance for each cell, or is there a lot of
repetition across cells?

> 2. Keep an external dictionary / map which is keyed by the entity and
> valued by Material objects

Arrays work well for this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20131011/ffea6d9f/attachment.pgp>


More information about the moab-dev mailing list