cloudy trunk
Loading...
Searching...
No Matches
parse_sphere.cpp
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2013 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 "parser.h"
8
10{
11 double fac;
12
13 DEBUG_ENTRY( "ParseSphere()" );
14
15 /* compute a spherical model, diffuse field from other side included */
16 geometry.lgSphere = true;
17
18 /* turn off electron scattering opacity */
19 opac.lgScatON = false;
20
21 /* if "STATIC" is specified then set to case B for H lines */
22 if( p.nMatch("STAT") )
23 {
24 geometry.lgStatic = true;
25 opac.tlamin = 1e5;
26 /* this is option to not check on iterations, used for debugging H atom */
27 if( p.nMatch("(OK)") )
28 {
29 geometry.lgStaticNoIt = true;
30 }
31 }
32
33 /* set the covering facto to full coverage */
34 geometry.covgeo = 1.;
35 geometry.covrt = 1.;
36
37 /* check for optional covering factor, which is no longer parsed here */
38 fac = p.FFmtRead();
39
40 if( !p.lgEOL() )
41 {
42 /* >>chng 01 jul 16, remove covering factor, only on covering factor command */
43 fprintf(ioQQQ," The number %g appeared on the SPHERE command.\n", fac);
44 fprintf(ioQQQ," The covering factor can no longer be set with the SPHERE command.\n");
45 fprintf(ioQQQ," The number has been ignored.\n");
46 }
47
48 /* if the "BEAM" or "SLIT" option is specified then only part
49 * of the sphere is observed, and intensities
50 * should not be increased by r^2. There are two limiting cases, SLIT in which
51 * the slit is longer than the diameter of the nebula and the contibution to the
52 * detected luminosity goes as r^1, and BEAM when the contribution is r^0,
53 * or same as plane parallel */
54 if( p.nMatch("SLIT") || p.nMatch("BEAM") )
55 {
56 /* >>chng 01 jul 16, remove options, put on APERTURE command */
57 fprintf(ioQQQ," The SLIT and BEAM options are now part of the APERTURE command.\n");
58 fprintf(ioQQQ," The syntax is the same.\n");
59 fprintf(ioQQQ," This option has been ignored.\n");
60 }
61 return;
62}
FILE * ioQQQ
Definition cddefines.cpp:7
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
double FFmtRead(void)
Definition parser.cpp:353
bool nMatch(const char *chKey) const
Definition parser.h:135
bool lgEOL(void) const
Definition parser.h:98
t_geometry geometry
Definition geometry.cpp:5
t_opac opac
Definition opacity.cpp:5
void ParseSphere(Parser &p)