Welcome, Guest
Username: Password: Remember me

TOPIC: Global meshnode number in subdomain (//) calculations

Global meshnode number in subdomain (//) calculations 7 years 7 months ago #26162

  • JBS
  • JBS's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 3
Hello,

I apologise in advance in case this question was already addressed somewhere else in the forum (I couldn't find it).

Working with user fortran files for TELEMAC2D (but also TELEMAC3D) parallel calculations, I would need to know the global (2D) node number from the local node index and processor number. I know the BOUNDARY_COLOUR variable helps for boundary nodes, but what about interior nodes?

More concretely, say the global mesh contains 10000 nodes and TELEMAC is run on 12 procs, considering a local loop index I=1,NPOIN(local,<10000) running on the subdomain related to processor J, I would need to know the global node index K=f(I,J) described by index I in subdomain J, with K ranging from 1 to NPOIN(global,=10000) and f is the function I am looking for.

Is that possible?

Thank you in advance for your help.
JBS.
The administrator has disabled public write access.

Global meshnode number in subdomain (//) calculations 7 years 7 months ago #26168

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
Hello,

Every telemac module has a variable named MESH (or something like that).

This variable is a user-defined type with other variables inside it. The ones you are looking for are KNOGL (Global to Local) and KNOLG (Local to Global).

A Global node number is the number of your entire mesh, as you created it. A Local node number is the number of the node in each parallel mesh.

So, in order to convert a global mesh node to a local one (and vice versa) you use these two variables.
DO IP = 1,NPOIN2
  NODE(IP) = MESH%KNOGL%I(IP)
ENDDO

I don't quite remember which variable converts global to local, but the usage is the same, so you only have to test which one is the one you need.

Best Regards,

Phelype
The administrator has disabled public write access.

Global meshnode number in subdomain (//) calculations 7 years 7 months ago #26169

  • JBS
  • JBS's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 3
Thank you Phelype. It seems to work!

In the user subroutine (meteo.f here), I introduced the variable MESH (in 'USE DECLARATIONS_TELEMAC2D,ONLY : ...') and used :

do i=1,NPOIN
  igl=MESH%KNOLG%I(i)
  ...
enddo

The results look good so I guess it did the job!

Best regards.
JBS.
The administrator has disabled public write access.
Moderators: pham

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