Thank you, Fande. I've seen you in moose usergroup before.
I've just learned about SLEPC, and I wonder if I want to do neutron eigenvalue calculations and use finite difference to discrete grids, would it be difficult to implement it in SLEPC? Is there such an example(finite difference + linear eigenvalue)?Because I don't know much about finite element.Or am I still using a loop of KSP in PETSc?I'm a newcomer to petsc, please give me some advice Thanks, Yingjie Fande Kong <fdkong...@gmail.com> 于2018年9月27日周四 上午12:25写道: > I have implemented this algorithm in SLEPC. Take a look at this example > http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex34.c.html > > The motivation of the algorithm is also for neutron calculations (a > moose-based application). > > Fande, > > On Wed, Sep 26, 2018 at 10:02 AM Yingjie Wu <yjw...@gmail.com> wrote: > >> Dear Petsc developer: >> Hi, >> >> Thank you very much for your previous reply, they really helped me a >> lot. >> >> I've been doing neutron calculations recently, and I want to use the >> power Iteration method to calculate the neutron flux, essentially to solve >> linear equations, but after each solution is done, a scalar *K* is >> updated to form a new right end term *b*, and the next linear equation >> system is solved until the convergence criterion is satisfied. The flow of >> the source iteration algorithm is as follows: >> >> >> 1: *Φ*(0) = arbitrary nonzero vector 2: K(0) = arbitrary nonzero >> constant 3: *for* n = 1; 2; 3; ::: do 4: *b *= 1 / K(n-1) *F * Φ(n-1) >> 5: *Φ*(n) * M = *b* 6: K(n) = k(n-1)* (F * *Φ*(n) ,F *Φ*(n) ) / (F >> *Φ*(n-1) ,F *Φ*(n-1) ) >> >> 7: check convergence of eigenvalue and eigenvector 8: *end for* >> >> >> (F , M are the coefficient matrix.) >> >> >> The difficulty is that I need to set up an extra loop to regulate KSP. >> Does PETSc have such an example? How do I implement this algorithm in >> PETsc? Please tell me the key functions if possible. >> >> >> Thanks, >> >> Yingjie >> >> >>