Yeah, I struggled with the invalid id in this case. If the id type is unsigned then casting -1 to the type is the obvious way to go, but might a signed type be useful? What if someone wants to treat all negative ids as nemuann and positive as dirichlet?
----- Original Message ----- From: Roy Stogner <[email protected]> To: Paulo Vieira <[email protected]> Cc: [email protected] <[email protected]> Sent: Wed Mar 18 19:42:56 2009 Subject: Re: [Libmesh-users] Libmesh-users Digest, Vol 34, Issue 7 On Wed, 18 Mar 2009, Paulo Vieira wrote: > Since the BoundaryInfo class will be changed, what about changing the > hard-coded "short int" of the boundary id type to a typedef? (like the > subdomain_id_type in the Elem class, recently changed). It shouldn't > take too long, assuming that short isn't used for other purposes in > libMesh. That's a good idea. > Personally I think that the invalid_id value (-1234) is a little > awkward. It would make more sense to use unsigned short int for the > type (or even unsigned char) and set invalid_id to 0. But that will > conflict with other parts of the code. It's a weird id value (unless someone was using that for debugging purposes, like the 0xDEADBEEF people will sometimes fill memory with), but it's better than 0; that's likely to be already used in many codes as a *valid* id. --- Roy ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
