Yuanwu,
              There is a variable of system that you can set to use the
same Ke, its called assemble_before_solve, so simply set this variable to
false using the equation systems object you have. That will take care of
the multiple assembles. To avoid the multiple solves, please use the
following steps:

1) // Get the system's linear solver object to set the preconditioner reuse
flag
     LinearSolver<Number> *linear_solver = system.get_linear_solver();

2)  // Set the reuse_preconditioner variable to true
     linear_solver->reuse_preconditioner(true);

Give that a try.

On Tue, Aug 28, 2012 at 9:36 PM, 蔡园武 <[email protected]> wrote:

> Good. Anything else I should set in es or system in my code to use the
> same matrix K for different Fe, besides 'pc_type lu' in command?
> Temporarily I assemble K for each Fe. But if I use LU, there's no need
> to assemble K for multiple times.
>
> 2012/8/29 Vikram Garg <[email protected]>:
> > Well, if you use lu, then there should be no 'residual' provided the
> matrix
> > is invertible.
> >
>
> --
> Cai Yuanwu  蔡园武
> Dept. of Engineering Mechanics,
> Dalian University of Technology,
> Dalian 116024, China
>



-- 
Vikram Garg

http://users.ices.utexas.edu/~vikram/
http://www.runforindia.org/runners/vikramg
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to