On Thu, 18 Dec 2008, jurak wrote:
> time_solver->old_nonlinear_solution(index)
>
> Now, "time_solver" is an AutoPtr< TimeSolver > in
> "DifferentiableSystem" and
> function "old_nonlinear_solution" is not virtual in abstract class
> "TimeSolver".
> So I get a compilation error
> (" undefined reference to `TimeSolver::old_nonlinear_solution(unsigned
> int) const' ").
>
> My question is should "old_nonlinear_solution" be virtual in "TimeSolver"?
Actually, old_nonlinear_solution should be nonexistant in TimeSolver.
When we refactored out the UnsteadySolver branch class, we should have
gotten rid of it. Not all TimeSolver objects have an old solution
even allocated; for a SteadySolver the concept is meaningless.
I'll get rid of it in SVN now.
> Or I have to access "old_nonlinear_solution" in a different way.
>
> For now I get raw pointer form "time_solver" and do dynamic cast to
> "EulerSolver" pointer.
Dynamic cast to a UnsteadySolver pointer. That way if you change
time integration schemes later the cast won't start failing.
---
Roy
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users