[Index for ./FDCONT] [Return to Master Index]

genbfd

(./FDCONT/genbfd.m)


Function Synopsis

[xy,nnx,nny]=gen_fd_points(nx,ny,fem_grid_struct)

Help text

GENBFD generate a "basis function data" file for FD contouring 
   GENBFD computes an information file for contouring FEM
   node-based data using FD sampled points and MATLAB's
   contourf routine.  The FD-based plotting tools are part
   of the FDCONT toolkit.

   Input: fem_grid_struct - FEM domain
   	   xylist - FD point list (n X 2) or a 1x2 vector
   		    containing [nx ny], the number of FD
   		    points in (x,y) to discretize the area.
   		    See below.
   	   outflag - flag to output .bfd file to disk
   		     if outflag==1, the bfd matrix is output to
   		     the current directory with the name
   		     <gridname>.bfd.
   		     if outflag==0, the bfd matrix is returned
   		     workspace.
   	   bfdfilename - optional filename to write bfd matrix to.

   	   Arguments 1-3 are required.

   	   If xylist is passed in as [nx ny], GENBFD generates
   	   the FD points convering an area equal to the
   	   total extent of the FEM domain.  If only 1 integer
   	   is passed in, then nx=ny, GENBFD takes the smaller
   	   of [(xmax-xmin),(ymax-ymin)] for equal spacing.

   Output: The result of GENBFD is a matrix
   containing the following information.

   For each FD point:
    x y elem n1 n2 n3 b1 b2 b3 depth

   where x,y = FD point coordinate
   	  elem = FE element containing x y (==0 if outside FE mesh)
   	  n1,n2,n3 = node numbers of containing element (or closest)
   	  b1,b2,b3 = basis function values (or 1 0 0 if outside FEM)
   	  depth = depth at xy (or depth of closest node)

   For any given FD discretization, the bfd matrix need only be
   computed once.  The bfd matrix is passed to FE2FD to perform
   the actual FE to FD interpolation.

   Call:  bfd=genbdf(fem_grid_struct,xylist,outflag)
     OR   bfd=genbdf(fem_grid_struct,xylist,outflag,bfdfilename)
     OR   bfd=genbdf(fem_grid_struct,[nx ny],outflag,bfdfilename)

   Written by: Brian Blanton (Spring 99) to implement
   Chris Naimie's "bfd" file in MATLAB.


Produced by mat2html on Tue Feb 2 16:15:45 EST 1999
Cross-Directory links are: OFF