Hello- I'm thinking my question may be basic C++, so sorry if it is, but at this point I think I might be having trouble with libMesh syntax as well.
Anyway, I have a TransientNonlinearImplicitSystem & system, and this has as a member an AutoPtr<NonlinearSolver<Number> > nonlinear_solver. Since I'm using PETSc, this is actually getting initiated as an AutoPtr<PetscNonlinearSolver<Number> >. Now, I'm trying to access the SNES object in PETSc, and the PetscNonlinearSolver class has the member function snes() to return this, but to get to that I need to do a dynamic_cast of nonlinear_solver. But for some reason the line PetscNonlinearSolver<Number>* p_solver = dynamic_cast<PetscNonlinearSolver<Number>*>(&system.nonlinear_solver); is giving me the error that the expression system.nonlinear_solver must have class type. I usually get this when I misuse . and ->, but I've tried various things and I can't get anything to work. So, now I'm wondering if there is something specifically about it being an AutoPtr that is giving me troubles. Any thoughts? Thank you so much in advance! Andrea ------------------------------------------------------------------------------ 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-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users