Roy, the other reason that add_system needs to be virtual is because in EquationSystems.read(), the systems are created while reading the header through the call to add_system(type, name). And so if you have a System that is not recognized by libmesh, this will always throw an error while reading the header. I hope that is a more sensible reason to make this method virtual. Its been a while since I made this change on my end and when I removed the virtual call on this method, my program started crashing and the reason became apparent.
Vijay On Wed, Jan 13, 2010 at 12:22 PM, Roy Stogner <[email protected]> wrote: > > On Wed, 13 Jan 2010, Vijay S. Mahadevan wrote: > >> In my version of EquationSystems, I have the following methods made >> virtual which I think is the minimal set needed to derive from it. >> >> void clear () >> void init () >> void reinit () >> System & add_system (const std::string &system_type, const >> std::string &name) >> bool compare (const EquationSystems &other_es, const Real threshold, >> const bool verbose) const >> std::string get_info () const >> >> Also, I derived EquationSystems from ReferenceCountedObject. Do let me >> know what you think. > > Most of that makes perfect sense. I'll add all of it in the SVN head. > > What do you do in the overridden add_system()? > --- > Roy > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
