Hi Yu, Sorry, what I wrote above is not correct at some part. Whe using KINSOL, one needs to prepare call back functions to assemble residual and jacobian. At the beginning of these functions, I made a copy of the non-ghosted solution to a ghosted vector because KINSOL passes a non-ghosted solution vector to these functions. The following assembly part is done with the ghosted solution vector. In addition, when calling KINSOL::solve(), I changed my code to pass a non-ghosted solution vector instead of a ghosted one.
Best, Nori 2023年10月27日金曜日 11:22:28 UTC+9 Norihiro Watanabe: > Hi Yu, > > Though I'm not sure this is optimum, how I solved the problem was > 1) prepare two MPI vectors for stroring initial solutions. One is with > ghost elements and another one is without ghost (I guess you have alredy > one of them). Values of the vectors should be same. > 2) assemble residual and/or jacobian using the solution vector with ghost > 3) pass the non-ghosted solution vector to KINSOL and solve the nonlinear > 4) copy the KINSOL's returned non-ghosed solution vector to the ghosted > solution vector > 5) go back to step 2 to evalulate new residual > > Details about ghosted vectors are explained in, for example, > > https://www.dealii.org/current/doxygen/deal.II/DEALGlossary.html#GlossGhostedVector > https://www.dealii.org/current/doxygen/deal.II/group__distributed.html > > Best, > Nori > > 2023年10月27日金曜日 11:10:44 UTC+9 Tiny Y: > >> HI Norihiro Watanabe, >> Hello, I am a novice in Dealii. I have encountered a similar problem to >> yours. Have you solved this problem? How did you solve it?Can you explain >> what do you mean by ' create a ghosted copy in the assemble '.Thank you >> very much! >> Best, >> Yu >> >> -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/a05ba38e-8d23-4b52-8273-1f5a388d25ddn%40googlegroups.com.