[MOAB-dev] Reader/Writer filename extension access

Steve Jackson sjackson at cae.wisc.edu
Fri Apr 30 13:48:42 CDT 2010


On Apr 30, 2010, at 13:22 , Tim Tautges wrote:

> I think sometimes you want to know ahead of time which will be used.

From the perspective of DagMC in its current form, knowing ahead of time would be cosmetically better, but it's not essential.  Knowing which loader was used afterwards is important.

It would be *cosmetically* better to know the file reader ahead of time because DagMC passes some CGM-specific options to load_file().  If the CGM reader is not the one that's used to load the input, then these options cause load_file() to return the MB_UNHANDLED_OPTION error code.  This means load_file() returns an error whenever a mesh file is specified.  I'd rather this error only appeared under strange/unexpected circumstances, instead of all the time.  

This cosmetic issue isn't a big enough deal to warrant any substantial API changes.  But it would certainly be good from DagMC's perspective if there was a way to check which reader was used after the load.  DagMC needs to know if CGM was used to load data, and right now it's doing that in a somewhat hacky way (i.e. by checking CGM's data structures for content after the loading is finished).
~S


More information about the moab-dev mailing list