Read CFD --- read a sample data (for CFD) author : KGT (Kubota Graphics Technologies) Inc. Makefile.osf1 for DEC Alpha/osf1 Makefile.sun2 for SUN Solaris2.3 f77 special f77 read_cfd.f source file setfield.c source file (used for allocation (to set character)) read_cfd.net sample network sample.dat sample data This module reads a sample data(not AVS format). read_cfd.txt Module Reference Note : You have to use "f77" in this directory to create the module. # make -f Makefile.*** Name Read CFD --- read a sample data(CFD) from disk file Summary Name Read CFD Type data Outputs field 3-space real irregular Parameters Name Type Default Min/Max CFD samplefile string /usr/avs Description You can use this module for example in the field of CFD. The "Read CFD" module reads a sample data. The format of a sample data(CFD) is discussed below in the "Data format". It is the most populer format of CFD. Parameters CFD samplefile Specifies the name of the file to be read. Data format This module reads a ascii data. If you want to use a binary data, change the part of source (read(11,*)). (see "if binary" comment line) format ("Sample.dat") -------------------- write(*,*) ndim,veclen ndim = number of dimensions write(*,*) idim(i),i=1,ndim veclen = number of components at each points ni = idim(1) idim(*) = dimension of each axis nj = idim(2) xyz(i,j,k,3) = coordinate X Y Z nk = 1 data(veclen,i,j,k) = data value (components) if(ndim.eq.3) nk = idim(3) do k = 1,nk do j = 1,nj do i = 1,ni write(*,*) (xyz(i,j,k,L),L=1,3) enddo enddo enddo do k = 1,nk do j = 1,nj do i = 1,ni write(*,*) data(L,i,j,k),L=1,nvlen) enddo enddo enddo Example This example needs a sample data (Sample.dat). Read CFD | +---------+-----------+ | | extract scalar | | | orthgonal slicer | | volume bounds generate colormap | | | | | +----+ | | | | | field to mesh | | | +----------+----------+ | geometry viewer (The forth component of this sample data is the flag data.) (See also CFD_object/CFD_objectline/CFD_objectcont.) Example Read CFD | +-----------------+-------------+ | | | extract vector extract scalar | generate | | | colormap | | volume bounds | | CFD object | | orthgonal slicer (CFD objectline) | | | | | +-----+ | | | | | | | Contour Mesh | | (Contour Lines) | | | | | +-----------------+-------------+ | geometry viewer Read CFD : reads sample.dat extract vector : selects channel 0 and channel 3 (sets dial=2) extract scalar : selects channel 3