Welcome, Guest
Username: Password: Remember me

TOPIC: Looking for the an array

Looking for the an array 13 years 9 months ago #1121

  • UHM
  • UHM's Avatar
Dear telemac coders,

i'm looking for an array which contains all neighbor points of a point.

e.g. like that:

AllNeighb(PointID3D, NeighbourID)

I', almost sure that something like that should already be part of the MESH structure. And I
found that NPMAX, MXPTVS might be the upper boundaries of this array.

I suspected IKLEM1 to be the right array in 3D, but somehow its always empty.

Would be nice if somebody could give me a hind.

Thanks, Uwe
The administrator has disabled public write access.

Re:Looking for the an array 13 years 9 months ago #1123

  • Chris Cawthorn
  • Chris Cawthorn's Avatar
Dear Uwe,

You're mostly correct in that IKLEM1 is the array you should be looking at. However, this array is only used when using edge-based storage (MATRIX STORAGE = 3), which might explain why it appears to be empty. The default, according to the latest manual available on this site, is MATRIX STORAGE = 1 (EBE storage).

I see two options for you:
1) Use MATRIX STORAGE = 3, which should activate the IKLEM1 array and speed up the code (a nice bonus!)

2) Retain the default options, and construct the array yourself. Depending on what you want to do with it, might it be easier just to loop through the elements and consider pairs of neighbours each time?

I hope that's useful - please ask if you need to know anything more.

Best wishes,
Chris
The administrator has disabled public write access.

Re:Looking for the an array 13 years 9 months ago #1130

  • jmhervouet
  • jmhervouet's Avatar
Hello Uwe,

Sorry, this mesh structure does not exist because actually it is a compact matrix structure, generally very cumbersome to use, and it is difficult to navigate in it. There is always a better way to do an algorithm dealing with neighbours. For example if you scan all elements and use the array IKLE you will find (several times) the neighbours of a point.
Just tell exactly what you want to do and we'll tell you the best algorithm (but I'm afraid I am leaving for holidays next Sunday...).

Regards,

Jean-Michel
The administrator has disabled public write access.

Re:Looking for the an array 13 years 8 months ago #1172

  • ogoe
  • ogoe's Avatar
Dear Uwe,

I once needed the same information and wrote a small routine which would give me an array with the number of neighbour points and their id for every node of the mesh. It was written for a 2d mesh but I think it can easily be rewritten for a 3d case.
The data array is wrapped in a module so that you can access it from anywhere in Telemac.


Have fun
Oliver
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.