cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
parse_sphere.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*ParseSphere parse parameters on sphere command */
4 #include "cddefines.h"
5 #include "geometry.h"
6 #include "opacity.h"
7 #include "parse.h"
8 
9 void ParseSphere(char *chCard )
10 {
11  bool lgEOL;
12  long int i;
13  double fac;
14 
15  DEBUG_ENTRY( "ParseSphere()" );
16 
17  /* compute a spherical model, diffuse field from other side included */
18  geometry.lgSphere = true;
19 
20  /* turn off electron scattering opacity */
21  opac.lgScatON = false;
22 
23  /* if "STATIC" is specified then set to case B for H lines */
24  if( nMatch("STAT",chCard) )
25  {
26  geometry.lgStatic = true;
27  opac.tlamin = 1e5;
28  /* this is option to not check on iterations, used for debugging H atom */
29  if( nMatch("(OK)",chCard) )
30  {
31  geometry.lgStaticNoIt = true;
32  }
33  }
34 
35  /* set the covering facto to full coverage */
36  geometry.covgeo = 1.;
37  geometry.covrt = 1.;
38 
39  /* check for optional covering factor, which is no longer parsed here */
40  i = 5;
41  fac = FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
42 
43  if( !lgEOL )
44  {
45  /* >>chng 01 jul 16, remove covering factor, only on covering factor command */
46  fprintf(ioQQQ," The number %g appeared on the SPHERE command.\n", fac);
47  fprintf(ioQQQ," The covering factor can no longer be set with the SPHERE command.\n");
48  fprintf(ioQQQ," The number has been ignored.\n");
49  }
50 
51  /* if the "BEAM" or "SLIT" option is specified then only part
52  * of the sphere is observed, and intensities
53  * should not be increased by r^2. There are two limiting cases, SLIT in which
54  * the slit is longer than the diameter of the nebula and the contibution to the
55  * detected luminosity goes as r^1, and BEAM when the contribution is r^0,
56  * or same as plane parallel */
57  if( nMatch("SLIT",chCard) || nMatch("BEAM",chCard) )
58  {
59  /* >>chng 01 jul 16, remove options, put on APERTURE command */
60  fprintf(ioQQQ," The SLIT and BEAM options are now part of the APERTURE command.\n");
61  fprintf(ioQQQ," The syntax is the same.\n");
62  fprintf(ioQQQ," This option has been ignored.\n");
63  }
64  return;
65 }

Generated for cloudy by doxygen 1.8.3.1