Steve-OH / lap_water

Moisture models for wood drying and wood movement
MIT License
3 stars 0 forks source link

Gmsh "Requesting more near neighbors than data points" on oak_hole.pro #1

Closed JC3 closed 8 years ago

JC3 commented 8 years ago

I have posted this to the gmsh mailing list but am also posting it here.

Using:

When I do the following (this is a fresh install, first time running this software):

  1. Start gmsh.
  2. Load the .pro file.
  3. Select cutX, Y, and Z in GetDP -> Post-Processing
  4. Press Run, select path to getdp, accept.

Gmsh runs for about 2-3 seconds then silently exits (verified gmsh.exe terminated immediately with task manager). The last message printed to the terminal (I set message verbosity to "100" arbitrarily) is:

ANN: ERROR------->Requesting more near neighbors than data points<-------------ERROR

Partial gmsh debug log is attached: log.txt

How should I proceed?

Steve-OH commented 8 years ago

Open the .geo file in gmsh first. This will regenerate the mesh file (.msh). (The .msh files aren't included in the repository because they're so huge.)

Once a .msh file has been created for the geometry that you're interested in, you don't need to generate it again (unless you want to change the meshing parameters, of course), and you can use the .pro file from that point on.

Let me know if this works for you.

JC3 commented 8 years ago

Thanks. When I do this:

  1. Open oak_hole.geo in gmsh.
  2. File -> Save Mesh

It generates oak_hole.msh, which appears to be empty, consisting only of:

$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
0
$EndNodes
$Elements
0
$EndElements

It does the same with all of the other .geo files.

I do see a model in the viewport that I can interact with, if it matters:

oakhole

Steve-OH commented 8 years ago

It hasn't actually constructed the mesh yet (the gmsh UI isn't the most intuitive thing in the world). Try this:

  1. Open the .geo file in gmsh.
  2. Click the plus sign next to "Solver" in the tree. This should display GetDP, since you've already set that up.
  3. Click GetDP. This should open up the various GetDP options.
  4. Select the cutX, cutY and cutZ post-processing views as before.
  5. Click Run.

This should cause the mesh to be generated (you'll see "Meshing 1D..." in the status line). Once it has been generated, which takes about a minute on my machine, GetDP will start processing the data.

JC3 commented 8 years ago

Thanks. Sadly, that had the same failed results. "Meshing 1D" is actually the same point that the original set of steps fail at, so it must be a getdp problem not a gmsh problem. In both cases the log finishes with:

Info    : Done reading 'C:\Programs\woodemc\lap_water-master\models\oak_hole.geo'
Info    : Meshing 1D...
Info    : Meshing curve 101 (Line)
ANN: ERROR------->Requesting more near neighbors than data points<-------------ERROR

Maybe something in gmsh/getdp changed in a version since you originally made the models. Do you recall what versions of the programs you used when you had it working last?

Steve-OH commented 8 years ago

Hmm. Meshing is a gmsh process. I'm using a slightly older version of gmsh; let me try with the newer version and see if I can replicate the results.

Steve-OH commented 8 years ago

I was able to reproduce the problem with gmsh 2.11.0. Of course, I don't know why it's happening, but I'll investigate...

Steve-OH commented 8 years ago

It looks like the error message is coming from some code in this library: [https://www.cs.umd.edu/~mount/ANN/], but that's all I know at the moment.

For the time being, I suggest reverting to earlier versions of gmsh/getdp. A combination that works for me is gmsh 2.9.3 and getdp 2.5.1. You can download installers for the former from [http://gmsh.info/bin/Windows/] and the latter from [http://getdp.info/bin/Windows/]. (As long as you install to a different location, you don't need to uninstall the other versions.)

There's a bit of a trick to getting gmsh to "forget" its connection to the existing version of getdp:

  1. Start gmsh.
  2. Select Help|Restore All Options to Default Settings.
  3. Click on Solver in the tree, then on GetDP, and it will ask you to enter the path.
JC3 commented 8 years ago

Thanks. No need for you to spend your time debugging this futher. From the gmsh mail list just now:

From: Christophe Geuzaine Date: Wed, Feb 3, 2016 at 11:58 AM Subject: Re: [Gmsh] Gmsh exits immediately after run, "Requesting more near neighbors than data points"

Jason - Thanks for the report; this is indeed a regression, that I just fixed in SVN r22568.

Christophe

So at some point presumably a stable build will have this working again. In the mean time I'll try it with the versions you mentioned.

I'm closing the issue. Thanks for all your help, and for the models in the first place. I found it via http://blog.lostartpress.com/2014/03/17/water-vs-wood-grudge-match/ via http://woodworking.stackexchange.com/a/3234. Very enlightening.

Steve-OH commented 8 years ago

Good to hear that Cristophe has it figured out.

Feel free to contact me directly if you have any questions: steve@donacobi.us. About drying wood, that is, not gmsh/getdp. ;-)

-Steve