On Fri, 1 Aug 2008, luyi wrote:

> Because I want to use Jacobian_free Newton_Krylov method to solve the
> problem, if I setup two EquationSystems for each domain, I will get two
> rhs and connect them, with a matrix_free preconditioner I can get the
> full implicit solver, is that advisable?

Hmmm..  That is an interesting idea, anyway.  No need to worry about
whether the sparsity pattern is constructed correctly if you're not
using a sparse matrix.

> If it is OK, the only thing I need to do is write a suitable send_list
> for parellel like the unconformed mesh?

I don't think you can do this with just a send_list.  Both systems
will assume that the DofMap has told them about every degree of
freedom they need to directly worry about, and you can't construct a
proper send_list when your systems are giving you rhs vectors that
aren't even the proper size.  You'd have to do the parallel
synchronization yourself, and considering that the partitionings of
each mesh aren't guaranteed to correspond to each other in any way, I
think it could get tricky.

On the other hand, doing things Jacobian-free makes my "define all
variables everywhere" suggestion slightly less retarded; the memory
waste in your vectors might be tolerable with no waste in a sparse
matrix to worry about.

And of course, the "right" thing to do is still to modify DofMap to
handle different variables on different subdomains, but I completely
understand if you don't want to try to figure out *that* code.  I
could do it myself, but I don't know when my schedule will permit.
I'd also need to know what sort of API/representation to use.  Assume
when variables are created that they're defined everywhere, but let
users "turn off" variables on certain subdomains before
initialization?  Store the "turned off" data as a set of pairs of
subdomain id and variable number?

> By the way, because my implicit discontinuous code need so much memory,
> so I want to use Jacobian_free Newton_Krylov method and write a matrix
> free preconditioner, can you give me some suggestions about this? Do I
> need to write a JFNK_systems inherit from the class "explicit_system"?

You might want to talk to Derek Gaston.  He's started using JFNK,
although I think he's currently keeping the sparse matrix around to
fill with an inexact Jacobian for preconditioning.  I believe he's
using NonlinearImplicitSystem and PetscNonlinearSolver to do it.

The trouble with that is the dependency on NonlinearImplicitSystem,
which inherits from ImplicitSystem and which therefore will construct
a memory-hogging matrix whether you plan to use it or not.  But
looking over the code, I don't see any reference to a
NonlinearImplicitSystem which couldn't be replaced with a reference to
System without breaking anything.  You could just make those
replacements, then create a NonlinearExplicitSystem which has the same
sort of NonlinearSolver member and ::solve() behavior as NIS.
---
Roy

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to