Page 1 of 1

tecnod112 OK, tecnode112 not OK

Posted: Tue Jul 02, 2013 10:38 am
by Dennis Jespersen
I have a simple test case with a hexahedral mesh (FEBRICK) and
a scalar variable defined at cell centers. I use tecio starting with the sequence
tecini112
teczne112
tecdat112 // x-coordinates
tecdat112 // y coordinates
tecdat112 // z-coordinates
tecdat112 // scalar variable

I have the cell connectivity defined. If I follow the above with
tecnod112
then everything is fine (tecio doesn't complain, I can plot the data
and it looks good), but if I use instead
tecnode112
then I get an error message when I call tecend112. The message is
Err: (TECEND112) File 1 is being closed without writing connectivity data.
Zone 1 was defined with a Classic FE zone type but TECNODE112() was not called for all node chunks.

Is there a known problem with tecnode112?
Is there something I'm doing wrong?
I have a little test code (Fortran) which I can send illustrating what I am doing;
it's 200 lines and it might not be a good idea to post the code here.

I would like to use tecnode112 because the ultimate goal is to run a
multiple-processor code and to gather and write data in chunks rather
than all at once.

Re: tecnod112 OK, tecnode112 not OK

Posted: Tue Jul 02, 2013 2:59 pm
by JerimiahLee
Hello Dennis,

Could you just provide me with the line that you are using to call TECNODE112? In our Data Format Guide it provides the following Syntax:

INTEGER*4 FUNCTION TECNODE112(N, NData)
INTEGER*4 N
INTEGER*4 NData (T, M)

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 4:50 am
by Dennis Jespersen
The call to TECNODE112 uses an array ELT2NODE dimensioned (8,JD-1,KD-1,LD-1)
where the box grid has (JD,KD,LD) points in the 3 directions. I have NCELLS set to
(JD-1)*(KD-1)*(LD-1) and the call is

I = TECNODE112 ( NCELLS,ELT2NODE )

For completeness, the call to TECNOD112 is
I = TECNOD112 ( ELT2NODE )

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 9:48 am
by JerimiahLee
Dennis,

Could you set the debug flag to 1, rerun the application and send us the output?

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 11:41 am
by JerimiahLee
Dennis,

It appears that TECNODE112 needs to use NCELLS*8 instead of just NCELLS for the first parameter. Try that and let us know if anything changes.

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 12:57 pm
by Dennis Jespersen
I changed the call
I = TECNODE112 ( NCELLS,ELT2NODE )
to
I = TECNODE112 ( NCELLS*8,ELT2NODE )
but this doesn't fix the problem. Output is:

Using TECNODE112
Scratch File #1: ./tp1x7PsGB
Dest File #1: testtecio.plt
NumVars=4
TECINI112 RETURNS 0
Writing Zone 1:
Title = Simple brick mesh
Type = FEBRICK
IMax = 210
JMax = 120
KMax = 0
DupList = 0,0,0,0
TECZNE112 RETURNS 0
Writing 210 values to file 1.
X:TECDAT112 RETURNS 0
Writing 210 values to file 1.
Y:TECDAT112 RETURNS 0
Writing 210 values to file 1.
Z:TECDAT112 RETURNS 0
Writing 120 values to file 1.
WD:TECDAT112 RETURNS 0
TECNODE112 RETURNS 0
Err: (TECEND112) File 1 is being closed without writing connectivity data.
Zone 1 was defined with a Classic FE zone type but TECNODE112() was not called for all node chunks.
File 1 closed.
********************************************
1 Errors occurred on this file
********************************************
TECEND112 RETURNS -1

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 1:34 pm
by JerimiahLee
Apologies Dennis, I mean multiply the NCELLS value by 8 when you declare it. It seems that the TECNODE112 is looking for the number of nodes and not the number of cells.

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 1:58 pm
by Dennis Jespersen
Sorry, I don't follow what you're saying. I have a 3D rectangular mesh with
dimensions (JD,KD,LD), so there are JD*KD*LD points and (JD-1)*(KD-1)*(LD-1)
cells. I have arrays X,Y,Z dimensioned (JD,KD,LD). a cell-centered array
WD dimensioned (JD-1,KD-1,LD-1), and the connectivity array ELT2NODE dimensioned
(8,JD-1,KD-1,LD-1). I have NCELLS set to (JD-1)*(KD-1)*(LD-1) and NPTS
set to JD*KD*LD. I set up the arrays X,Y,Z,WD, ELT2NODE and have the calls

I = TECINI112( 'Centroid Z coordinate'//C_NULL_CHAR,...
I = TECZNE112 ( 'Simple brick mesh'//C_NULL_CHAR,...
I = TECDAT112 ( NPTS,X,ISDOUBLE )
I = TECDAT112 ( NPTS,Y,ISDOUBLE )
I = TECDAT112 ( NPTS,Z,ISDOUBLE )
I = TECDAT112 ( NCELLS,WD,ISDOUBLE )
I = TECNODE112 ( NCELLS,ELT2NODE )
I = TECEND112 ( )

I'm not sure where a multiplication by 8 is supposed to occur.

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 2:28 pm
by JerimiahLee
Dennis,

My apologies for this confusion. Because the error is not telling us how much connectivity is being written compared to how much it is expecting to be written, we are able to determine that there is not enough connectivity being written. (If you had more connectivity than it expected it would explicitly tell us.) This tells us that either NCELLS is too small or ELT2NODE is too large. Because ELT2NODE works for TECNOD112, NCELLS must be smaller than what is actually expected. Because ELT2NODE is an 8xM matrix, NCELLS needs to be equal to 8 times M.

Another way to think about it is that you have (JD-1)*(KD-1)*(LD-1) number of cells. Each of these cells has 8 connections. TECEND112 is looking for 8*(JD-1)*(KD-1)*(LD-1) connections, but is only seeing (JD-1)*(KD-1)*(LD-1).

Does this make more sense?

Re: tecnod112 OK, tecnode112 not OK

Posted: Wed Jul 03, 2013 2:36 pm
by Dennis Jespersen
Thanks, I finally got it, I do need to have the tecnode112 call as:
I = TECNODE112 ( NCELLS*8,ELT2NODE )