<div dir="auto">Thank you Matt for your advice, i will let you know if something pops out from the mist.<div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 08 giu 2018 20:49, "Matthew Knepley" <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="quoted-text">On Fri, Jun 8, 2018 at 8:45 AM, Valerio Barnabei <span dir="ltr"><<a href="mailto:valerio.barnabei@gmail.com" target="_blank" rel="noreferrer">valerio.barnabei@gmail.com</a>></span> wrote:<br><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>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</div></blockquote></div></blockquote><div><br></div></div><div>CGNS support stinks because I never used it and no one else has requested it. Also the format is not workable in parallel.</div><div>Here is the code</div><div><br></div><div> <a href="https://bitbucket.org/petsc/petsc/src/58edc67f565b6826877b6037e2237b6b17930a07/src/dm/impls/plex/plexcgns.c#lines-149" target="_blank" rel="noreferrer">https://bitbucket.org/petsc/petsc/src/58edc67f565b6826877b6037e2237b6b17930a07/src/dm/impls/plex/plexcgns.c#lines-149</a></div><div><br></div><div>You can see I am just asking CGNS how many sections it has in the the zone. I do not really know</div><div>what a section is, so I am limiting it to one section. The files you have must have multiple sections</div><div>for reason that are not clear to me.</div><div><br></div><div>Here are some meshes I can read:</div><div><br></div><div> <a href="https://bitbucket.org/petsc/petsc/src/master/share/petsc/datafiles/meshes/" target="_blank" rel="noreferrer">https://bitbucket.org/petsc/petsc/src/master/share/petsc/datafiles/meshes/</a></div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div class="elided-text"><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 dir="ltr"><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" target="_blank" rel="noreferrer">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><span class="m_7115556549438446375gmail-HOEnZb"><font color="#888888"><div><br></div><div>Valerio<br></div></font></span></div>
</blockquote></div></div><div class="signature-text"><br><br clear="all"><div><br></div>-- <br><div class="m_7115556549438446375gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank" rel="noreferrer">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div></div>
</blockquote></div><br></div>