[MOAB-dev] ElemUtil madness
Tim Tautges
tautges at mcs.anl.gov
Thu Dec 13 13:34:00 CST 2012
Hi all,
In various parts of MOAB, I see:
tools/mbcoupler/ElemUtil.hpp:
namespace Element { class Map {...}; class LinearHex : public Map{...}; ...}
tools/mbcoupler/ElemUtil.cpp:
namespace ElemUtil { class VolMap{...}; class LinearHexMap : public VolMap{...}; ...}
src/moab/point_locator/element_maps:
namespace element_utility{ class Linear_hex_map{...} ...}
All with lots of duplicated functionality. It appears to me that Coupler uses the 1st one above. I'd like to clean all
that out right after the release and consolidate down to one version of these things. After thinking about templates
vs. inheritance for elements, I've come to the conclusion that we need to use the inheritance model, since we'll never
know at compile time what kind of elements we're dealing with, so there will always be function invokations via
indirection, either through virtual function tables or pointer to implementation pattern. Furthermore, I think
inheritance gives us the ability to use and override default implementation, e.g. for specializing the tet jacobian and
its inverse.
Comments?
If you're wondering, I need to sort all this out before tackling the tree searching stuff I'm about to start, since
evaluating these various elements is the last step in tree searching.
- tim
--
================================================================
"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