Welcome, Guest
Username: Password: Remember me

TOPIC: Finding list of neighboring elements of any particular element

Finding list of neighboring elements of any particular element 10 years 10 months ago #11699

  • gourish
  • gourish's Avatar
Hi,

I want to find the list of neighboring elements of any particular element in the mesh, is there any method to do so.

By finding the list of neighboring elements I wish to search for a particle in a domain based on the previous location (i.e previous known element), since knowing the previous location there is a greater probability that new location of the diffused particle may be near the previous element neighbors. And thus iterating along the neighbors. This I think may provide a faster searching method.

Will it be a feasible method to do so? Has anyone tried it yet?

I have noticed that in the subroutine ADD_PARTICLE, in source file util/beif/streamline.f the iteration is
DO IELEM=1,NELEM2
....
....
ENDDO

The above mentioned code could be replaced by iterating the neighbors, as something like
DO WHILE(FOUND)
	DO I=1,NB_NEIGH_EL(PELEM)
	.
	.
	ENDDO
ENDDO

Thanks,
Gourish
The administrator has disabled public write access.

Finding list of neighboring elements of any particular element 10 years 10 months ago #11706

  • riadh
  • riadh's Avatar
Hello
There are lots of ways to achieve such task.
One way is the use of IFAPAR array which is described at the Guide to programming of TELEMAC as:
" IFAPAR is used by the method of characteristics to compute the paths or trajectories when they cross interfaces between sub-domains. The size is IFAPAR(6,NELEM2), as only 2-dimensional data is required. IFAPAR(1:3,IELEM) gives the processor numbers behind the 3 edges of a triangle. IFAPAR(4:6,IELEM) gives, for the same edges, the local number in its processor of the element behind the edge."
So I think that you have everything you need for your request.

I hope that this is helpful.
With my best regards

Riadh ATA
The administrator has disabled public write access.

Finding list of neighboring elements of any particular element 10 years 10 months ago #11707

  • gourish
  • gourish's Avatar
Hi Riadh,

Thanks for the reply. The method which you suggested gives a quick way to resolve the problem.

Another method which I was thinking earlier is to create a look-up table based on the method used in file voisin31.f, but this would require to allocate some extra memory.

Apparently in the method which you suggested, there is already look-up table defined which can be directly used.

Thanks and Regards,
Gourish
The administrator has disabled public write access.

Finding list of neighboring elements of any particular element 10 years 10 months ago #11714

  • jmhervouet
  • jmhervouet's Avatar
Hello,

To complement Riadh post. There is no such list in all the Telemac system, except perhaps for the frontal matrix-vector product. This kind of list is used for compact storage of matrices, but it leads to very slow algorithms. Every time someone asks me for a list of points neighbouring points, I have a precise look at the goal and generally you can find a better and more efficient algorithm. For example, for navigating in the mesh, the IFABOR and/or IFAPAR in parallel, as mentioned by Riadh, is much better and is used for the method of characteristics.

Regards,

Jean-Michel Hervouet
The administrator has disabled public write access.
Moderators: pham

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