On Thu, 10 Jan 2013, Robert wrote:

> I need to get the norm of the solution (local variable norm_delta) of the 
> current
> newton step after each solve in NewtonSolver::solve(). What would be the
> best way to extend NewtonSolver to get this value in my application
> code?

You'd want it after each linear solve, or before or after each
proposed step, or before or after each completed step?

> I was thinking of a callback-approach, where I could add a
> function-pointer to NewtonSolver and the solve routine calls this
> function with the wanted value.
> Would this be a solution which could make it into the official libmesh?
> Does anyone has a better solution for this (beside parsing the output).

We've been using subclassable functors for callbacks lately, which is
strictly more flexible than using global callback functions.  It's
sometimes more tedious to code, though, so I'll leave the decision up
to you.  Would you also pass norm_total and any other easy-to-grab
parameters too?  If we're going to add a new API to expose internals
we should make it as useful as possible.

Thanks,
---
Roy

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to