[Getdp] Can GetDP reuse a stiffness matrix?

John_V jvillar.john at gmail.com
Tue Jan 18 20:14:54 CET 2011


Dear Christophe,

I am attaching an example as you suggested, smaller than usual though maybe
not exactly small. (The mesh should be big enough to require at least a few
seconds. Otherwise the problem is not illustrated.)

The example represents a single instance of executing GetDP. What differs
upon the next instance is only the charge distribution, as described in
comments in the sample.pro file.

The out.txt file lists GetDP output, including the "CPU = xxx s" messages. I
interpret these as follows for this example (smaller mesh) and usual case
(several million element mesh):

Step                  Time fraction this step (this example)      Time
fraction this step (usual case)

Pre-processing                        19.7%
            30.7%
Generate Sys_Ele
12.9%                                              2.5%
RCMK renumbering
1.0%                                              0.2%
ILUTP
64.1%                                            65.7%
GMRES
1.9%                                              0.8%
Save
0.3%                                              0.1%

If my descriptions under "Step" are right, it seems GMRES is very quick.
Most of the time is spent in ILUTP (which is preconditioning, right?)
followed by pre-processing.

It seems worth a try to export the preconditioner, then import and re-use it
rather than recompute it the next time. Is it possible?

John



On Fri, Jan 14, 2011 at 7:58 AM, Christophe Geuzaine <cgeuzaine at ulg.ac.be>wrote:

> 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<http://www.montefiore.ulg.ac.be/%7Egeuzaine>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20110118/e62e5a71/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: holeExample.zip
Type: application/zip
Size: 1373443 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20110118/e62e5a71/attachment.zip>


More information about the getdp mailing list