On Wed, 11 Feb 2009, Derek Gaston wrote: > I'm adding the PreconditionerType string_to_enum / enum_to_string > specializations... but the PreconditionerTypes are a bit different > from the rest since they all have _PRECOND appended to the enum. For > instance AMG is AMG_PRECOND. > > This isn't really a problem... but I'm thinking that doing the > string_to_enum it might be nice to have both "AMG" and "AMG_PRECOND" > map to AMG_PRECOND.
Yes, definitely. > What do you guys think? Anyone see any problems with that? Check out the hack I recently added to build_reverse_map in string_to_enum.C. The idea was that I wanted both "EDGE" and "EDGE2" to map to EDGE2, but I needed to keep the same (or at least some consistent) behavior in the enum_to_string function. So now the definition of the reverse map is that we compare multiple preimages with "<" and pick the biggest. So even if you map "AMG"->AMG_PRECOND, you'll get AMG_PRECOND->"AMG_PRECOND" out. But as long as that behavior's fine with you, no other problems. --- Roy ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
