[MOAB-dev] general question about MOAB
Tim Tautges
tautges at mcs.anl.gov
Mon Mar 15 09:24:45 CDT 2010
iulian at mcs.anl.gov wrote:
> Hello,
>
> I have a question about MOAB, and the way it allocates data / arrays, etc. It seems that a Sequence Data and a
> Sequence manager is involved, for each type of data (node, edge, face, element, tag, sets) Every time a user creates
> a new node, for example, down deep, a type sequence manager will find an unused MBEntityHandle that can be used for
> the new node; the coordinates for the node have a very specific location, can be retrieved fast. (the sequence
> manager for the nodes takes care of everything)
>
> How is that comparing with a very simple mesh model, for which I have an array of <Node> , an array of <Triangle>
> elements, etc.
>
> The <Node> structure is rich enough to keep even a list of edges connected to it, as a <vector>, and also a list of
> triangles.
>
> I can see in the simple model a lot of memory fragmentation, as those lists can get resized during meshing.
>
That's probably the single most distinguishing characteristic of MOAB, that it manages mesh objects using more of an
array-based model than a C++ object-based model. Traditionally, the latter approach tends to result in mesh object
classes which get cluttered with member variables, which leads to memory issues for large meshes. Their advantage is
that it's usually fast/easy to add/delete entities. This is where MOAB does worst, when you're frequently
adding/removing elements. I'll hopefully have something in the User's Guide for that.
> Does something like this happen for MOAB? Or this is the whole reason why we use the Sequence manager (I would call
> it also a memory manager), to avoid memory fragmentation?
>
That's one of the reasons, the other is to coordinate access to large blocks of contiguous tag and connectivity array
memory.
> Also, AEntityFactory has a special role (A comes from Adjacency); it is very important in lots of algorithms, for
> example skinning. It can build pretty fast the adjacency lists, and it does store them if needed (so navigation from
> Nodes to Edges, to faces, to elements and back and in any combination can be fast)
>
Yes.
- tim
> Thanks, Iulian
>
--
================================================================
"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: (608) 263-8485 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
More information about the moab-dev
mailing list