[Getdp] Can GetDP reuse a stiffness matrix?
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Fri Jan 14 13:58:13 CET 2011
On 13/01/11 15:20, John_V wrote:
> I am using GetDP to repeatedly solve electrostatic problems on the same
> mesh. The only thing that changes from one solution to the next is the
> distribution of charges. That is, GetDP is solving K.V = S for V, where
> the stiffness matrix K is every time the same and only S changes. In
> this circumstance it is not in principle necessary to build K from the
> mesh every time. It could just be built the first time and then reused.
>
> I have two questions:
>
> 1. Does GetDP presently implement any mechanism to do this? For example,
> is there a way to export the matrix to a file after it is computed, and
> then import it for use the next time GetDP is used?
>
Yes (see the Print command), but I don't think it would help, as
currently the matrix and the right hand side are assembled during the
same process.
> 2. Is this likely to save any (or much) time? Each resolution is taking
> about 15 to 50 minutes on my computer, but I don't know what fraction of
> this is spent building the K matrix and what fraction is actually
> solving the system of equations. I know from watching the output that
> all of the [0% - 10% - ... 90% - Done] convergence messages appear in
> the last minute or so. If those coincide with the solution of the
> equations then it may be that a significant amount of the time is spent
> computing K, in which case this could lead to a big time savings.
>
For low order interpolation (1st order), solving the linear system
should take much longer than assembling the matrix (unless there are
some really complex expressions to be evaluated to build the operator).
To keep the preconditionner from one solution to the other, you can use
"SolveAgain" instead of "Solve" in the operations.
If this does not help, could you send a small example?
Thanks,
Christophe
> John
>
>
> _______________________________________________
> getdp mailing list
> getdp at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp
>
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine