On Jun 8, 2011, at 1:07 PM, John Peterson wrote:

> On Wed, Jun 8, 2011 at 1:02 PM, Cody Permann <[email protected]> wrote:
>> 
>> On Jun 8, 2011, at 12:56 PM, Roy Stogner wrote:
>> 
>>> 
>>> On Wed, 8 Jun 2011, John Peterson wrote:
>>> 
>>>> On Wed, Jun 8, 2011 at 8:49 AM, Cody Permann <[email protected]> wrote:
>>>>> I've just about finished up the patch to allow us to configure
>>>>> subdomain_id_type with ./configure.  The current syntax I'm using
>>>>> is "--with-subdomain-id-bytes=<1|2|4>" defaulting to "2".
>>> 
>>> This looks good, unless you want to switch it to string arguments to
>>> correspond with John's portability suggestion below.
>>> 
>> I'll take a look at this
>> 
>>>> I think we should change the ExodusII code to map 0 to
>>>> 
>>>> numeric_limits<int>::max()
>>>> 
>>>> when writing, regardless of the subdomain_id_type, since that value
>>>> will always be valid for Exodus.
>>>> 
>>>> When reading, we initially read the subdomain ID into an int, then
>>>> check to see if that int value is >=
>>>> numeric_limits<subdomain_id_type>::max().  If it is, then that
>>>> subdomain ID gets mapped to 0 within libmesh.
>>>> 
>>>> If we encounter more than one subdomain ID when reading which is >=
>>>> numeric_limits<subdomain_id_type>::max(), then that's an error: you
>>>> can't read the current exodus file with the currently configured
>>>> libmesh; we could print an error message to that effect.
>>> 
>>> This sounds ideal for now.
>> 
>> This probably makes the most sense when libMesh is running but doesn't solve 
>> the problem I mentioned.  The actual solution file on disk will contain an 
>> ID that changes based on how libMesh is configured.  (i.e. if you have it 
>> configured with subdomain_id_type = unsigned char, and use the libMesh mesh 
>> generation routine for building say a cube, your mesh file on disk will have 
>> ID 255 in it.  If you have your subdomain_id_type set to unsigned short and 
>> run the problem again the output solution file will contain 65535 and so on 
>> for the 4 byte case.  This makes it more difficult to use an offline 
>> comparison tool to compare solution files.
> 
> No, what I proposed fixes that problem.  Regardless of how you have
> libmesh configured, the ID will be written to file as
> numeric_limits<int>::max().

Oh yes - I see now

> 
> --
> John


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to