[MOAB-dev] Detecting file types

Jason Kraftcheck kraftche at cae.wisc.edu
Mon Nov 30 15:59:20 CST 2009


Steve Jackson wrote:
> On Nov 30, 2009, at 15:36 , Jason Kraftcheck wrote:


>>> Cosmetic reason: DagMC passes some file loading options to
>>> MBInterface::load_file. These
>>> options go unhandled by MOAB's native file reader, causing load_file to
>>> return the MB_UNHANDLED_OPTION error code. This isn't really an error
>>> condition, though; we wouldn't pass the options in the first place if we
>>> knew the file was going to be handled by MOAB's native loader.
>> Returning the loaded file type after the fact is unlikely to be helpful in
>> this case,
> 
> It might be helpful, even in this case. We expect the options to go
> unhandled for MOAB native file types. But if the options go unhandled for a
> different file type, that's unexpected, and it would be polite to issue a
> warning to the user. It's still a cosmetic issue, though, and probably does
> not merit an interface change.

It would be even better to allow the caller to specify options that apply to
specific file formats, eliminating the need for the caller and only report
an error for unhandled options that apply to the read format or all formats.
 E.g.: rather than FACTET_TOLERANCE=1e-6, CUBIT:FACET_TOLERANCE=1e-6.

- jason




More information about the moab-dev mailing list