On Tue, 21 Sep 2010, Roy Stogner wrote:

> Call this Possibility #7:
>
> int SystemSubset::set_revision gets incremented every time the dof
> list changes.  LinearImplicitSystem::last_set_revision stores the
> set_revision that was used to create the current preconditioner.
> Before solving, we check to see whether the set_revisions no longer
> match; if they don't then we clear the preconditioner.

I found a different solution now, that is

Possibility #9: PetscLinearSolver::restrict_solve_to() calls 
PetscLinearSolver::clear(), which clears the preconditioner if it is a 
default preconditioner.  LinearImplicitSystem::solve() (which is not 
to be confused with PetscLinearSolver::solve()) will, if a subset is 
currently active, call LinearSolver::restrict_solve_to(dofs) before 
the solve and call LinearSolver::restrict_solve_to(NULL) after.  This 
also ensures that the solver is not left in subset mode after being 
used by the System.

@Derek: The preconditioner does not have to do something special at 
all.  Well, of course, if somebody is using a custom preconditioner 
for a subset solve, he would have to reset the preconditioner manually 
whenever the subset changes, but that's what he will do anyway, won't 
he?  The point is that, as long as he is using a *default* 
preconditioner, everything happens automatically.

By the way: My application does both: a subset solve with a default 
preconditioner and a subset solve with a custom preconditioner.  When 
the subset changes, I manually reset my custom preconditioner, and 
everything works.

Best Regards,

Tim

-- 
Dr. Tim Kroeger
CeVis -- Center of Complex Systems and Visualization
University of Bremen              [email protected]
Universitaetsallee 29             [email protected]
D-28359 Bremen                             Phone +49-421-218-7710
Germany                                    Fax   +49-421-218-4236

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to