[petsc-users] DMDACreate3d for 2 different sizes

TAY wee-beng zonexo at gmail.com
Sat Apr 27 10:39:49 CDT 2019


Hi,

I need to use DMDACreate3d to create objects da and da_psr which have 2 
different sizes:

call 
DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&

size_z,one,PETSC_DECIDE,PETSC_DECIDE,one,stencil_width,lx,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da_p,ierr)


call 
DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x_psr,size_y_psr,&

size_z_psr,one,PETSC_DECIDE,PETSC_DECIDE,one,stencil_width,lx,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da_p_psr,ierr)


size_x/y/z_psr is actually half of size_x/y/z

However, running the 2nd line gave error:

[0]PETSC ERROR: Arguments are incompatible
[0]PETSC ERROR: Ownership ranges sum to 76 but global dimension is 38
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
for trou
ble shooting.

size_x is 76 but size_x_prs is 38.

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?

-- 

Thank you very much.

Yours sincerely,

================================================
TAY Wee-Beng 郑伟明 (Zheng Weiming)
Personal research webpage: _http://tayweebeng.wixsite.com/website_
Youtube research showcase: _https://goo.gl/PtvdwQ_
linkedin: _https://www.linkedin.com/in/tay-weebeng_
================================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190427/6bb13468/attachment.html>


More information about the petsc-users mailing list