Thanks, Roy. According to your advice. Maybe, it should be better to clear
the solution vector after finishing the rhs.
Regards,
Yujie
On Tue, Feb 23, 2010 at 7:48 PM, Roy Stogner <roystgnr@...>wrote:
>
> On Tue, 23 Feb 2010, Yujie wrote:
>
> Without mesh refinement, how to solve the linear equation with multiple
>> rhses. In current libmesh framework,
>>
>> one can use "equation_systems.get_system("system").solve()" to get the
>> solution with one rhs.
>>
>> In .solve(), there are assemble() and solver() functions. rhs can be
>> replaced in assemble(). However, which parameters need to be reinitialized
>> after finishing one rhs? Whether it is ok to call
>> equation_systems.reinit()
>> to reinitialize necessary parameters for multiple rhses? Thanks a lot.
>>
>
> Depends on how complicated your system is, but in general you
> shouldn't need to reset anything except (perhaps) the solution (which
> gets used as a starting guess in iterative solvers) before solving
> with a new right hand side. Take a look at the parameter sensitivity
> methods in implicit_system.C for some examples; since we use multiple
> solution and rhs vectors there we don't have to reinitialize anything
> at all.
> 
> Roy
>
