<div dir="ltr"><div dir="ltr">On Sat, Apr 27, 2019 at 11:41 AM TAY wee-beng via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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 bgcolor="#FFFFFF">
    <p>Hi,</p>
    <p>I need to use DMDACreate3d to create objects da and da_psr which
      have 2 different sizes:</p>
    <p>call
DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br>
      <br>
             
size_z,one,PETSC_DECIDE,PETSC_DECIDE,one,stencil_width,lx,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da_p,ierr)</p>
    <p><br>
    </p>
    <p>call
DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x_psr,size_y_psr,&<br>
      <br>
             
size_z_psr,one,PETSC_DECIDE,PETSC_DECIDE,one,stencil_width,lx,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da_p_psr,ierr)</p></div></blockquote><div>You left in 'ix' for the second call, but it cannot be right.</div><div><br></div><div>  Matt </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
    <p>size_x/y/z_psr is actually half of size_x/y/z</p>
    <p>However, running the 2nd line gave error:</p>
    <p>[0]PETSC ERROR: Arguments are incompatible<br>
      [0]PETSC ERROR: Ownership ranges sum to 76 but global dimension is
      38<br>
      [0]PETSC ERROR: See
      <a class="gmail-m_-7801018426038681549moz-txt-link-freetext" href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trou<br>
      ble shooting.</p>
    <p>size_x is 76 but size_x_prs is 38.</p>
    <p>So do I need to create 2 comm (MPI communicator) if I need to
      create da_p_psr? are using different values of
      size_x_psr,size_y_psr, size_z_psr not enough?</p>
    <div class="gmail-m_-7801018426038681549moz-signature">-- <br>
      <p>Thank you very much.<br>
        <br>
        Yours sincerely,<br>
        <br>
        ================================================<br>
        TAY Wee-Beng 郑伟明 (Zheng Weiming)<br>
        Personal research webpage: <font color="#3366ff"><u><a class="gmail-m_-7801018426038681549moz-txt-link-freetext" href="http://tayweebeng.wixsite.com/website" target="_blank">http://tayweebeng.wixsite.com/website</a></u></font><br>
        Youtube research showcase: <u><font color="#3366ff"><a class="gmail-m_-7801018426038681549moz-txt-link-freetext" href="https://goo.gl/PtvdwQ" target="_blank">https://goo.gl/PtvdwQ</a></font></u><br>
        linkedin: <u><font color="#3366ff"><a class="gmail-m_-7801018426038681549moz-txt-link-freetext" href="https://www.linkedin.com/in/tay-weebeng" target="_blank">https://www.linkedin.com/in/tay-weebeng</a></font></u><br>
        ================================================<br>
      </p>
    </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>