<div dir="ltr"><div dir="ltr">On Sun, Aug 28, 2022 at 8:51 AM Mike Michell <<a href="mailto:mi.mike1021@gmail.com">mi.mike1021@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"><div dir="ltr"><div>Hi, thank you for the reply. </div><div><br></div><div>I was able to manage mapping from cell-center to vertex. Basically, in Fortran, it seems DMCreateInterpolation() requires the optional scaling vector as a mandatory argument, which is strange.</div></div></blockquote><div><br></div><div>It needs a custom Fortran wrapper to check for the NULL input from Fortran.</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"><div dir="ltr"><div>My dmplex has zero overlap layer over the procs, and there is no ghost cell inside physical boundary. In this case, it seems mapping between cell center to vertex returns zero (in case the global cell vector initialized to zero) value at the nodes, which are located at physical boundary. To manage this problem, is it mandatory to have ghost cells. Is this correct understanding?</div></div></blockquote><div><br></div><div>I cannot quite understand. Are you saying that you have inhomogeneous Dirichlet conditions on the boundary, and a 0 guess in the interior, and you get all zeros from interpolation? Yes, we have no way of getting boundary values into the operator. You could conceivably make an operator that mapped between local vectors, but it is hard to see why you would want this. In the solver, we usually just care about the unknowns we are solving for.</div><div><br></div><div>Did I understand your question, or is it about something else?</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"><div dir="ltr"><div>Also, my mapping accuracy itself seems to be improved. For simple test, cell-center's x-coordinate value of each cell mapped to node and printed to the vertex field as .vtu format, and the mapped x-vertex-coordinate is quite different with the actual nodal coordinate values what PETSc intrinsically provides through DMGetCoordinatesLocal(). I believe I am doing something wrong, probably arguments in PetscFECreateLagrange() can improve the mapping accuracy in finite-element space?</div></div></blockquote><div><br></div><div>Yes, a cellwise field is much less accurate than a linear field. Pushing the values up to a linear field does not make them more accurate.</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"><div dir="ltr"><div>Thanks,</div><br><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"><div dir="ltr"><div dir="ltr"><br>On Thu, Aug 25, 2022 at 7:12 PM Mike Michell <<a href="mailto:mi.mike1021@gmail.com" target="_blank">mi.mike1021@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"><div dir="ltr">Hi, this is a duplication of <div><a href="https://lists.mcs.anl.gov/pipermail/petsc-users/2022-August/046746.html" target="_blank">https://lists.mcs.anl.gov/pipermail/petsc-users/2022-August/046746.html</a> <div>for in-depth question.<br></div><div><br></div><div>I wrote a short code as attached to test interpolation between two DMPlex objects. Goal is to map solution field defined on cell-centroid(DMPlex-1) into vertex(DMPlex-2) field or vice versa. <br><br>Basically, DMCreateInterpolation() fails in the example code and it was not allowed to get useful error messages. The DMPlex is created by loading a 2D square box in Gmsh. Can I get some comments on that?<br></div></div></div></blockquote><div><br></div><div>Sure, I am looking at it.</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"><div dir="ltr"><div><div>Thanks,<br></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><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>
</blockquote></div></div>
</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>