<div dir="ltr"><div>Hello,</div><div>I'm trying to import a simple CGNS file representing a simple 3D unstructured box, but i keep getting the same error:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>[0]PETSC ERROR: Error in external library<br>[0]PETSC ERROR: CGNS file must have a single section, not 2<br></div></blockquote><div><br></div><div>I'm using the following script:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div>#include <petscdmplex.h><br>#include <cgnslib.h><br><br><br>int main(int argc, char **argv){<br>    <br>    char MeshFileName[2048];<br>    MPI_Comm comm;<br>    DM dm;<br>    PetscErrorCode ierr;<br>    PetscBool flg;<br>    <br>    ierr = PetscInitialize(&argc, &argv, NULL,NULL);if (ierr) return ierr;<br>    ierr = PetscOptionsGetString(NULL,NULL,"-file",MeshFileName,sizeof(MeshFileName),&flg);CHKERRQ(ierr);<br>    comm= PETSC_COMM_WORLD;<br>    if(!flg){<br>               SETERRQ(comm,PETSC_ERR_ARG_NULL,"please specify a fine mesh file \n");<br>    };<br><br>    ierr = DMPlexCreateCGNSFromFile(comm, MeshFileName, PETSC_FALSE, &dm);CHKERRQ(ierr);<br>   <br>    ierr = DMDestroy(&dm);CHKERRQ(ierr);<br>    ierr = PetscFinalize();CHKERRQ(ierr);<br><br>return ierr;<br>}<br></div></blockquote><div><br></div><div><br></div><div>I'm not using a multiblock mesh, i just created a single unstructured block volume in pointwise, exported as adf (using hdf i got a crash during file opening so i switched). I tried with different exportation options (node to node, cell to cell, face to face) but nothing seems to work.</div><div>I got the same identical error also downloading files from official CGNS site:</div><div><a href="http://cgns.sourceforge.net/CGNSFiles.html">http://cgns.sourceforge.net/CGNSFiles.html</a></div><div>It's obvious there's something I'm missing. <br></div><div><br></div><div>-Where is my mistake?</div><div>-Is there any notable limitation in the importation of CGNS file? (e.g. multiblock files can't be imported as dmplex objects)<br></div><div><br></div><div>Thanks in advance for your kind help.</div><div><br></div><div>Valerio<br></div></div>