XANSYS Message: 76 [Go back to message list]
[bookmark on del.icio.us]
No rating yet
Rate item:

Subject: Re: *vwrite command, integer format character that w orks on a HP and SUN machine
Author: Tony Artiles
Date: 1998-12-17 12:26:00

In Windows NT 4.0 SP 3, and ANSYS Release 5.5.1 UP19981001,
ii=1
x=2.3456789
*vwrite,ii,x
(' node = ',I8,1X,F10.5)
produces:
node = ******** 2.34568

*** WARNING *** CP= 1.182 TIME=
12:15:46
Data output error, probably bad FORMAT
(' node = ',I8,1X,F10.5).

James' fix,
(' node = ',F8.0,tl1,' ',1X,F10.5)
works:
node = 1 2.34568

Dr. Tony Artiles, Technology Development Staff Consultant
Flowserve Corporation, Fluid Sealing Division
2100 Factory St., Kalamazoo MI 49001-4163
(616)226-3641 fax: (616)226-3417 e-mail: TArtiles@f...
http://www.flowserve.com

> -----Original Message-----
> From: Kosloski, James [SMTP:koslosj@p...]
> Sent: Tuesday, December 15, 1998 4:47 PM
> To: 'xansys@o...'
> Subject: [xansys] Re: *vwrite command, integer format character that
> works on a HP and SUN machine

> From: "Kosloski, James"

> A: One way to eliminate the decimal point is to use the FORTRAN
> descriptor TL
> (tab left) and put a space where the decimal point was. For example:

> *vwrite,dat(1)
> (f10.0,tl1,' ')

> This works on a SUN machine, I have not tried it on other platforms

> James J. Kosloski
> ANSYS Technical Support
> (860) 557-3461
> Engineering Bldg, 3rd fl. Col. E-2

> > From: jz9hn2@a...[SMTP:jz9hn2@a...]
> > Sent: Tuesday, December 15, 1998 2:24PM
> > To: xansys@o...
> > Subject: [xansys] *vwrite command, integer format character that
> works on a HP and SUN machine

> > From: jz9hn2@a... ( Joseph A Rasche 230-3796 3892)

> > Question: On the *vwrite command, what format character should be used
> to write
> > out an integer. ANSYS 5.4 version running on HP and SUN.

> > Background:
> > The documentation clearly states that the "*" and "I" characters do not
> work for
> > the *vwrite command. This is not totally true. The "I" format
> statement
> > character does work on HP machines. On Sun machines, it does not.

> > I'm hoping that there is a secret command of some sort that I can put
> into the
> > *vwrite format statement line that will allow Integers to be printed
> out. I do
> > not want to put in F10.0 or something like that. There should be an
> integer
> > format statement that will work on all machines.

> > Does anyone know of a format statement that will allow me to directly
> output an
> > integer on the SUN machines.

> > If this has been covered before I apologize for taking your time.

> > An example of the "I" format character. This works for HP but not SUN.
> Test it
> > out and see.

> > fini
> > /prep7
> > *get,mxnode,node,,num,max
> > *get,ndcount,node,,count
> > *get,minnode,node,,num,min
> > *dim,nddata,array,ndcount,4,1
> > *do,i,1,ndcount
> > nddata(i,1)=minnode
> > nddata(i,2)=nx(minnode)
> > nddata(i,3)=ny(minnode)
> > nddata(i,4)=nz(minnode)
> > minnode=ndnext(minnode)
> > *enddo
> > *cfopen,glist
> > *vwrite,nddata(1,1),nddata(1,2),nddata(1,3),nddata(1,4)
> > (' node = ',I8,1X,F10.5,1X,F10.5,1X,F10.5)
> > *cfclose,glist
> > *list,glist