Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Using the IKLE connectivity table

Using the IKLE connectivity table 11 months 3 days ago #42793

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
Hello,

I am trying to utilize the IKLE connectivity table to locate a set of particular nodes in my mesh, the nodes adjacent to the boundary nodes. I found in the telemac2d developers manual, page 83 figure 5.5, that the nodes adjacent to boundary points can be found through the following statement,

IKLE(IELEM,1) = NG1

Where IELEM is the number of the boundary element, and NG1 is the global node number of the node in the boundary element IELEM that is itself NOT a boundary node.

In my code I am using the following statement to try and locate these nodes:

MESH%IKLE%I(IELEM,1)

But this gives me the following error:

121 | A = MESH%IKLE%I(IELEM,2)
| 1
Error: Rank mismatch in array reference at (1) (2/1)

122 | B = MESH%IKLE%I(IELEM,3)
| 1
Error: Rank mismatch in array reference at (1) (2/1)

123 | C = MESH%IKLE%I(IELEM,1)
| 1
Error: Rank mismatch in array reference at (1) (2/1)

I am not sure what is wrong here and do not know what to try next. Has anyone been able to successfully utilize the IKLE connectivity table for programming a user modified subroutine? Any help appreciated.

-Martin
The administrator has disabled public write access.

Using the IKLE connectivity table 11 months 2 days ago #42798

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1460
  • Thank you received: 563
Hello again Martin,

Be carefull with the loop on ILEM for the 1st component of IKLE, it should be between 1 and NELEM. The elements expected for IKLE are the triangles, not the boundary segments.

Anyway, I am not sure that using IKLE is the best way to do what you seem to want for the boundary segments and for sure, it is not usual in TELEMAC.

Hope this helps,

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

Using the IKLE connectivity table 10 months 1 week ago #42858

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
Hello,

I've been trying to understand where my mistake is in the above code and I think it has something to do with the fact that the IKLE table is declared as:

TYPE(BIEF_OBJ), POINTER :: IKLE

in declarations_telemac2d.f

The other variables that I am successful in referencing are declared as:

TYPE(BIEF_OBJ), TARGET :: LIUBOR,LIVBOR,LIHBOR,LITBOR

etc. It seems the issue is that I am trying to reference a 'pointer' and not a 'target', and this is somehow not allowed, I guess. I am still trying to understand why this would be the case.

I found a file that uses the IKLE table, "flux_imp3d.f", and in this file they are able to assign the value "IKLE(IELEM,1)" to an integer variable I1 as:

DO IELEM = 1,NELEM3
!
I1 = IKLE(IELEM,1)

which is exactly what I am trying to do but somehow I cannot use IKLE(IELEM,1) to set the value of a declared integer in my routine.

I am using 'USE DECLARATIONS_TELEMAC2D' for my variable declarations. Am I doing something wrong? Should I be declaring IKLE(IELEM,1) as an integer like how they do in "flux_imp3d.f"? Is the issue that IKLE is declared as a pointer?

I've been trying to figure this out by using print statements but I can't get anything to print from IKLE. for example, the statement "print *, IKLE(IELEM,3)" gives the error:

141 | print *, IKLE(IELEM,3)
| 1
Error: Syntax error in PRINT statement at (1)

But I do not understand why this is the case because IKLE(IELEM,3) should just be an integer as I understand it. It should be the integer value for the global node number of the third node in the element IELEM.

Thanks in advance,
-Martin
The administrator has disabled public write access.

Using the IKLE connectivity table 10 months 1 week ago #42861

  • jtravert
  • jtravert's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Thank you received: 23
Hello Martin,

Going briefly over your post, you mentioned doing the same as in "flux_imp3d.f":
DO IELEM = 1,NELEM3
!
I1 = IKLE(IELEM,1)

For TELEMAC-3D, NELEM3 is the number of elements in the 3D MESH, if you are using TELEMAC-2D then you should loop over the variable NELEM (the number of elements in the mesh).

I guess you paid attention to that, but maybe it can be it. And do not forget to declare IELEM as an INTEGER but I guess you did that too.

Best regards,
Jean-Paul
The administrator has disabled public write access.

Using the IKLE connectivity table 10 months 1 week ago #42865

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
Thanks for your reply Jean-Paul,

Yes, I translated the telemac3D variables into their appropriate telemac2D counterparts and I have made sure to declare IELEM as an integer. My do loop looks like:

DO IELEM = 1, MESH%NELEM
A = IKLE(IELEM,2)
B = IKLE(IELEM,3)
C = IKLE(IELEM,1)
IF(LIHBOR%I(A).EQ.5.AND.LIUBOR%I(A).EQ.6)THEN
IF(LIHBOR%I(B).EQ.5.AND.LIUBOR%I(B).EQ.6)THEN
countout = countout+1
Uout(countout) = U%R(C)
Vout(countout) = V%R(C)
ENDIF
ENDIF
ENDDO

Which gives me the error:


122 | A = IKLE(IELEM,2)
| 1
Error: Unclassifiable statement at (1)

It seems it does not like assigning the value of IKLE(IELEM,2) to an integer variable
The administrator has disabled public write access.

Using the IKLE connectivity table 10 months 1 week ago #42866

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
The smiley faces are B's, they were converted automatically
The administrator has disabled public write access.

Using the IKLE connectivity table 9 months 3 weeks ago #42916

  • jtravert
  • jtravert's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Thank you received: 23
Hello Martin,

Do you you have other errors when compiling the Fortran?
How has been declared the IKLE object in your Fortran code, and do you use 'USE DECLARATIONS_TELEMAC2D' (that could cause conflicts) or not?

Best regards,
Jean-Paul
The administrator has disabled public write access.
The following user(s) said Thank You: MartinPHYS

Using the IKLE connectivity table 9 months 3 weeks ago #42940

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
Hi Jean-Paul,

There are no other errors when I compile my fortran file. I am compiling with gfortran, just FYI.

I have tried declaring IKLE a number of different ways.

I've tried declaring it as an integer (without the line 'USE DECLARATIONS_TELEMAC2D') as:

INTEGER, INTENT(IN) :: IKLE(NELEM,3)

also as,

INTEGER, INTENT(INOUT) :: IKLE(NELEM,3)

and as,

INTEGER :: IKLE(NELEM,3)

For these, I get an error message that complains that 'IKLE is not a dummy variable'.

I have also tried using the 'USE DECLARATIONS_TELEMAC2D' option, (while commenting out all of the new declarations in the user_bord subroutine). This gives me the error that I have previously described.

-Martin
The administrator has disabled public write access.

Using the IKLE connectivity table 9 months 3 weeks ago #42941

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3632
  • Thank you received: 1010
Hi
IKLE is an alias for MESH%IKLE declared in declarations_telemac2d.
Both are pointers...
It depends in which subroutine you add your code but did you try to replace
A = IKLE(IELEM,2)
B = IKLE(IELEM,3)
C = IKLE(IELEM,1)
by
A = MESH%IKLE(IELEM,2)
B = MESH%IKLE(IELEM,3)
C = MESH%IKLE(IELEM,1)
?

Regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: MartinPHYS

Using the IKLE connectivity table 10 months 3 days ago #42888

  • MartinPHYS
  • MartinPHYS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
  • Thank you received: 1
Hello,

I am still having a hard time utilizing the IKLE table to identify the global node numbers of the adjacent nodes to the liquid boundary nodes. I've been looking into alternative strategies to accomplish this, and I found a post on this forum from long ago (post #11699) which suggests the use of the IFABOR table for a similar task. However, I am struggling to find any documentation on how to use IFABOR. The only thing I can find on IFABOR is in the reference descriptions for BIEF_OBJ structures in the developer's manual which says:

IFABOR: TABLE GIVING ELEMENTS BEHIND FACES OF A TRIANGLE
TYPE(BIEF_OBJ), POINTER :: IFABOR

Can anyone give me more information on IFABOR and how I might use it to find the global node number of a node adjacent to the liquid boundary nodes?

Are there any files in the telemac system that use IFABOR that I can view?

I've attached an image (annotated figure 5.5 from the developer's manual) identifying the global node numbers I am trying to find/utilize.

Thank you in advance and sorry to keep pestering about this,

-Martin
Attachments:
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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