cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
iterations.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2017 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 #include "cddefines.h"
4 #include "iterations.h"
5 
7 
9 {
10  for( long i=0; i < iter_malloc; i++ )
11  {
12  IterPrnt[i] = 10000;
13  }
14  itermx = 0;
15  /* this implements set coverage command */
16  lgConverge_set = false;
17  iteration = 0;
18 
19  /* this is default number of zones
20  * >>chng 96 jun 5, from 400 to 500 for thickest corners4 grid */
21  /* >>chng 04 jan 30, from 600 to 800, code uses finer zoning today */
22  /* >>chng 04 dec 24, from 800 to 1400, so that HII region - molecular cloud
23  * sims do not need set nend - all sims in test suite will run ok without set nend */
24  nEndDflt=1400;
25  lgEndDflt = true;
26 
27  for( long i=0; i < iter_malloc; i++ )
28  {
29  nend[i] = nEndDflt;
30  /*>>chng 03 nov 13, from 1e30 to 1e31, because default inner radius raised to 1e30 */
31  StopThickness[i] = 1e31;
32  StopRadius[i] = -1.;
33  }
34 }
36 {
37  /* this is number of iterations that have been malloced - we could
38  * increase this if more iterations are needed */
39  iter_malloc = 200;
40  IterPrnt.resize((size_t)iter_malloc);
41  nend.resize( (size_t)iter_malloc);
42  StopThickness.resize((size_t)iter_malloc);
43  StopRadius.resize((size_t)iter_malloc);
44 }
void alloc()
Definition: iterations.cpp:35
long int iter_malloc
Definition: iterations.h:40
vector< long int > nend
Definition: iterations.h:71
bool lgEndDflt
Definition: iterations.h:65
vector< double > StopThickness
Definition: iterations.h:77
bool lgConverge_set
Definition: iterations.h:60
void zero()
Definition: iterations.cpp:8
long int iteration
Definition: cddefines.cpp:16
vector< long int > IterPrnt
Definition: iterations.h:43
long int nEndDflt
Definition: iterations.h:68
t_iterations iterations
Definition: iterations.cpp:6
long int itermx
Definition: iterations.h:37
vector< double > StopRadius
Definition: iterations.h:80