/home66/gary/public_html/cloudy/c08_branch/source/parse_sphere.cpp

Go to the documentation of this file.
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
00002  * others.  For conditions of distribution and use see copyright notice in license.txt */
00003 /*ParseSphere parse parameters on sphere command */
00004 #include "cddefines.h"
00005 #include "geometry.h"
00006 #include "opacity.h"
00007 #include "parse.h"
00008 
00009 void ParseSphere(char *chCard )
00010 {
00011         bool lgEOL;
00012         long int i;
00013         double fac;
00014 
00015         DEBUG_ENTRY( "ParseSphere()" );
00016 
00017         /* compute a spherical model, diffuse field from other side included */
00018         geometry.lgSphere = true;
00019 
00020         /* turn off electron scattering opacity */
00021         opac.lgScatON = false;
00022 
00023         /* if "STATIC" is specified then set to case B for H lines */
00024         if( nMatch("STAT",chCard) )
00025         {
00026                 geometry.lgStatic = true;
00027                 opac.tlamin = 1e5;
00028                 /* this is option to not check on iterations, used for debugging H atom */
00029                 if( nMatch("(OK)",chCard) )
00030                 {
00031                         geometry.lgStaticNoIt = true;
00032                 }
00033         }
00034 
00035         /* set the covering facto to full coverage */
00036         geometry.covgeo = 1.;
00037         geometry.covrt = 1.;
00038 
00039         /* check for optional covering factor, which is no longer parsed here */
00040         i = 5;
00041         fac = FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00042 
00043         if( !lgEOL )
00044         {
00045                 /* >>chng 01 jul 16, remove covering factor, only on covering factor command */
00046                 fprintf(ioQQQ," The number %g appeared on the SPHERE command.\n", fac);
00047                 fprintf(ioQQQ," The covering factor can no longer be set with the SPHERE command.\n");
00048                 fprintf(ioQQQ," The number has been ignored.\n");
00049         }
00050 
00051         /* if the "BEAM" or "SLIT" option is specified then only part 
00052          * of the sphere is observed, and intensities
00053          * should not be increased by r^2.  There are two limiting cases, SLIT in which
00054          * the slit is longer than the diameter of the nebula and the contibution to the
00055          * detected luminosity goes as r^1, and BEAM when the contribution is r^0, 
00056          * or same as plane parallel */
00057         if( nMatch("SLIT",chCard) || nMatch("BEAM",chCard) )
00058         {
00059                 /* >>chng 01 jul 16, remove options, put on APERTURE command */
00060                 fprintf(ioQQQ," The SLIT and BEAM options are now part of the APERTURE command.\n");
00061                 fprintf(ioQQQ," The syntax is the same.\n");
00062                 fprintf(ioQQQ," This option has been ignored.\n");
00063         }
00064         return;
00065 }

Generated on Mon Feb 16 12:01:26 2009 for cloudy by  doxygen 1.4.7