Hi Yu,
The code I wrote are something like this:
TrilinosWrappers::MPI::Vector vector_without_ghost;
vector_without_ghost.reinit(jacobian.locally_owned_range_indices(),
jacobian.get_mpi_communicator());
vector_without_ghost = vector_with_ghost;
In the above, I used a jacobian matrix object to g
Hi Nori,
I'm sorry to bother you again. I would like to know which function you used
to obtain vectors without ghost element from vectors with ghost element. If
convenient, could you please share the code in this area or your ideas for
implementing this process. Thank you very much for your ki
Hi Nori,
Thank you for your reply. Your method is very enlightening to me.
Best,
Yu
在2023年10月27日星期五 UTC+8 10:41:27 写道:
> 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 be
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 sol
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
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
Hi Luca,
Many thanks for the reply! You are right that I should create a ghosted
copy in the assembly.
Best,
Nori
2023年8月16日水曜日 20:19:15 UTC+9 Luca Heltai:
> The vector you pass to kinsol must be non-ghosted. In the residual
> assembly you must create a local ghosted copy. Just as you would
The vector you pass to kinsol must be non-ghosted. In the residual assembly you
must create a local ghosted copy. Just as you would if you were doing things
manually. (I.e., After a solve, you copy to a ghosted vector to output or to
compute error estimators. Here it is the same. )
Luca
> Il g
Hi,
I got the below error when calling KINSOL::solve() with Trilinos MPI vectors.
It looks KINSOL tried to call scale() for a ghosted vector.
The vector has ghost elemets probably because I passed
a ghost vector as "initial_guess_and_solution" argument to solve().
I can pass a non-ghosted vect