From: <pco...@ue...> - 2008-02-21 20:01:53
|
>>> I want to solve a pde equation involving a parameter to be incremented >>> sucessively. After obtaining a solution I want to use it as a guess >>> for >>> the system to be solved next. How can I implement this? > >> I'm not an expert on Libmesh, but I recall that PETSC allows one to >> set the iinitial guess. If PETSc can be accessed through the libmesh >> interface then it should be possible quite easily. > > Indeed it is -- this is in fact the default behavior in libMesh. Whatever > is in the System.solution vector is handed off to the linear solver as the > initial guess. You should be able to verify this by calling > > equation_systems.solve(); > equation_systems.solve(); > > And seeing that the second solve converges in 0 iterations. In fact I obtain: ---------------------------------------------------------------------------- | Matrix Assembly Performance: Alive time=0.587006, Active time=0.543755 ---------------------------------------------------------------------------- | Event nCalls Total Avg Percent of | | Time Time Active Time | |----------------------------------------------------------------------------| | | | BCs 1536 0.0074 0.000005 1.36 | | Ke 512 0.0040 0.000008 0.74 | | elem init 512 0.0096 0.000019 1.76 | | side integration 1536 0.5228 0.000340 96.14 | ---------------------------------------------------------------------------- | Totals: 4096 0.5438 100.00 | ---------------------------------------------------------------------------- Transport_2 linear solver converged at step: 14, final residual: 9.89093e-06 ---------------------------------------------------------------------------- | Matrix Assembly Performance: Alive time=0.844928, Active time=0.803292 ---------------------------------------------------------------------------- | Event nCalls Total Avg Percent of | | Time Time Active Time | |----------------------------------------------------------------------------| | | | BCs 1536 0.0082 0.000005 1.02 | | Ke 512 0.0042 0.000008 0.52 | | elem init 512 0.0097 0.000019 1.21 | | side integration 1536 0.7812 0.000509 97.25 | ---------------------------------------------------------------------------- | Totals: 4096 0.8033 100.00 | ---------------------------------------------------------------------------- Transport_2-A linear solver converged at step: 14, final residual: 9.89093e-06 It seems there is no change... > > -Ben > |