On Wed, 10 May 2017, Salazar De Troya, Miguel wrote:

> It seems that by default FEMSystem always assembles the matrix and
> ignores the flag System::assemble_before_solve.

This is correct.

> The DiffSolvers, NewtonSolver and PetscDiffSolver always call
> System::assembly(false,true). The workarounds I see would be to
> create my own TimeSolver to override TimeSolver::solve () and call
> some solver that can call System::assembly(false,
> System::assemble_before_false). Either that or rewrite the
> DIffSolvers to call System::assembly() like that.

I'd say modify the DiffSolver subclasses.  I'd certainly accept a
patch which does so.

> I think the question should be: Is FEMSystem designed to only handle
> nonlinear equations?

It's designed to primarily handle nonlinear equations.  If you have a
linear problem and you want to be efficient with it, then you
basically want to set the DiffSolver options to only take a single
quasi-Newton step, to use a sufficiently tight tolerance for that
step, and to not bother assembling and testing the residual after that
step.

However, if the user has disabled assemble_before_solve, I don't think
it's unreasonable to trust that the user is doing consistent things
with their other solver options too.
---
Roy

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to