<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Matt,<div><br></div><div>By global vector you mean one created with</div><div><br></div><div>VecCreateMPI(..., nel, PETSC_DETERMINE,...)</div><div><br></div><div>? If so, that gives segfault (even with 1 MPI process) in user write function, which is just </div><div><br></div><div>VecView((Vec)obj,viewer);</div><div><br></div><div>which clearly indicates that I misunderstand your comment.<br><br>Would you please clarify what PETSc expect as a “global” vector in case of cell-based quantities as opposed to unknowns/fields associated with the DMDA discretization?</div><div><br><div dir="ltr">Sincerely,<div>Denis</div></div><div dir="ltr"><br><blockquote type="cite">Am 17.12.2020 um 18:58 schrieb Matthew Knepley <knepley@gmail.com>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Thu, Dec 17, 2020 at 12:18 PM Denis Davydov <<a href="mailto:davydden@gmail.com">davydden@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear all,<br>
<br>
I would like to output cell data (eg conductivity coefficient) in VTK for DMDA setup.<br>
<br>
Given that I know how many elements/cells are owned locally, I hoped that PetscViewerVTKAddField with PETSC_VTK_CELL_FIELD would do the job.<br>
However I am not sure whether provided vector should be fully distributed (no ghosts)? If not, can I get the required ghosts from DMDA created with DMDACreate3D ?<br></blockquote><div><br></div><div>I believe that it outputs global vectors, meaning that there are no ghosts.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Ps. I saw just one relevant discussion on the mailing list.<br>
<br>
Sincerely,<br>
Denis</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</div></blockquote></div></body></html>