[petsc-users] Using slepc MFN

Jose E. Roman jroman at dsic.upv.es
Thu Dec 15 15:52:26 CST 2022


You don't need to destroy the solver object, it should be sufficient to just call MFNSetOperator() with the new matrix.

Jose


> El 15 dic 2022, a las 21:56, Guglielmo, Tyler Hardy via petsc-users <petsc-users at mcs.anl.gov> escribió:
> 
> Not sure if there are many slepc users here, but I have a question regarding MFN in slepc.
>  
> Essentially I am running a loop over time steps, and at each step I would like to compute a matrix exponential, however the matrix that I am computing the exponential of changes in a non-trivial way at each time step.
>  
> It seems like the proper way to implement this is to build and destroy an MFN object at each time step.  However, this doesn’t seem terribly efficient as most Krylov methods I have looked at (Expokit) require a large amount of workspace memory allocation at runtime.
>  
> Is there a safe way to change the operator appearing in the MFN object without having to destroy and recreate?
>  
> Best,
> Tyler
>  
> +++++++++++++++++++++++++++++
> Tyler Guglielmo
> Postdoctoral Researcher
> Lawrence Livermore National Lab
> Office: 925-423-6186
> Cell: 210-480-8000
> +++++++++++++++++++++++++++++



More information about the petsc-users mailing list