Welcome, Guest
Username: Password: Remember me

TOPIC: Access local coordinates in USER_SL in parallel

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41580

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
Good afternoon.

I want to define a SL value in USER_SL that is function of space. How can access X and Y in this function in parallel?

Thank you for your help!
The administrator has disabled public write access.

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41581

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi Olivier
with declarations_telemac2d you should have access to MESH structure in which you will have X and Y

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: o.gourgue

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41587

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
Thank you Christophe.

Isn't it a problem that I only have access to the global number of point N in this function?

In parallel, I have the impression that MESH%X(N) will not work. Is there a way to easily convert N to the local number? Or is it better to work then with user_bord.f rather than user_sl.f?
The administrator has disabled public write access.

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41588

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
It should be MESH%X%R if I remember well...
In a subdomain, you work on local nodes and there is KNOLG who gives you the local_to_global numbering

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: o.gourgue

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41589

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
Thanks. But here I have the global number N and I need the local one to feed MESH%X%R, don't I? Is there a KNOGL (global-to-local numbering)?
The administrator has disabled public write access.

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41590

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
No knogl because this should have the dimension of the global mesh ...
But there is a function for that:
global_to_local_point.f in bief ...
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: o.gourgue

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41591

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
Thank your for your help Christophe!

In case that's useful for other users in the future, here is the final solution:

X(GLOBAL_TO_LOCAL_POINT(N, MESH))

This gives the x-coordinate of the considered boundary point in the SL subroutine.
The administrator has disabled public write access.

Access local coordinates in USER_SL in parallel 2 years 3 days ago #41605

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Olivier,

Note that you may spend some time with GLOBAL_TO_LOCAL_POINT if you have a big mesh.

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: o.gourgue

Access local coordinates in USER_SL in parallel 2 years 2 days ago #41613

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
I'm now testing with a small mesh. But, indeed, at the end, I will use it wit a quite big mesh (1+ million nodes).

For something more efficient, I was wondering about the following lines in bord.f (lines 206-207, v8.2.0):

IF(NCSIZE.GT.1) N=MESH%KNOLG%I(N)
Z = SL(IFRLIQ,N)

Is it safe to comment the first line, so that N remains the local point number and I can simply use X(N) instead of X(GLOBAL_TO_LOCAL_POINT(N, MESH)) in sl.f?

In this application, all my liquid boundaries are forced with an imposed water surface level (which varies in time and space). I have no other liquid boundary condition.

Thanks for your help!
The administrator has disabled public write access.

Access local coordinates in USER_SL in parallel 2 years 2 days ago #41615

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
I would say NO for the comment of the first line but this should be investigated in detail in your case...
By the way, maybe you could just manage a call to GLOBAL_TO_LOCAL_POINT at the first time step and keep the result in a local array you could use at the other time steps...
Christophe
The administrator has disabled public write access.
Moderators: pham

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