#cls
text(In-Form objects: sphere and box
title
libref=772
  DISPLAY

  This In-Form case creates a non-moving In-Form object, either
  a box or a sphere, in either a cartesian or a cylindrical-polar
  grid
  
  The three In-Form-specific commands are:

  1. PATCH(PATCH1,CELL,1,NX,1,NY,1,NZ,1,LSTEP)  
     which defines the space within which the object will be placed;
                                           
  2. (INFOB at PATCH1 is SPHERE(:xce:,:yce:,:zce:,:radius:)$
      with INFOB_1)                                    
     which defines the sphere by way of its centre coordinates and
     radius; and
     
  3. (STORED of MARK at PATCH1 is 1. with INFOB_1)
     which sets the value of a variable named MARK to the value 1,0
     within the object IBFOB_1 within PATCH1 .
     
  Of course, PIL statement are also provided which:
  * define the grid,
  * declare xce, yce, zce, and radius as character variables,
  * ascribe values to them,
  * STORE, and assign a zero initial value to, MARK .  
  ENDDIS  

    GROUP 1. Run title and other preliminaries
TEXT(In-Form, sphere in polar coordinates: 772
    GROUP 3. X-direction grid specification
CARTES=F;GRDPWR(X,40,2.*3.14,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,40,10.,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,40,20.,1.0)
    GROUP 7. Variables stored, solved & named
STORE(MARK)
    GROUP 11. Initialization of variable or porosity fields
FIINIT(MARK)=0.0
 *** Patch for sphere
PATCH(PATCH1,CELL,1,NX,1,NY,1,NZ,1,LSTEP)  ! i.e. the whole domain
  Note: xce,yce and zce are the x,z and z coordinates of sphere centre.
        They are character variables which are evaluated in 
        the in-form statements because  they are enclosed within colons.
  INFORM11BEGIN                                           
char(xce,yce,zce,radius)
xce=10.; yce=10.; zce=10.; radius=5.
(INFOB at PATCH1 is SPHERE(:xce:,:yce:,:zce:,:radius:)$
 with INFOB_1)                                    
  INFORM11END
  *** Setting of MARK values inside spheres
  INFORM7BEGIN
(STORED of MARK at PATCH1 is 1. with INFOB_1)
  INFORM7END
    GROUP 15. Termination of sweeps
LSWEEP=1
DISTIL=T
EX(MARK)=1.975E-01
  PHOTON USE
  p;;;;;
  
  GR Z 1;gr ou z m
  con mark x 1 fil;.01   
  msg press ENTER to continue
  pause
  con mark x 20 fil;.01 
  pause
  con mark z 20 fil;.01 ;gr ou z 20
  pause
  surf mark x 0.99 ; gr ou z m     
  ENDUSE
STOP