00001 /* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 /*InitCoreloadPostparse initialization at start, called from cloudy 00004 * after parser one time per core load */ 00005 #include "cddefines.h" 00006 #include "monitor_results.h" 00007 #include "dense.h" 00008 #include "init.h" 00009 #include "iso.h" 00010 #include "lines_service.h" 00011 #include "taulines.h" 00012 00013 /*InitCoreloadPostparse initialization at start, called from cloudy 00014 * after parser, one time per core load */ 00015 void InitCoreloadPostparse( void ) 00016 { 00017 00018 static int nCalled = 0; 00019 00020 DEBUG_ENTRY( "InitCoreloadPostparse()" ); 00021 00022 /* only do this once per coreload */ 00023 if( nCalled > 0 ) 00024 { 00025 return; 00026 } 00027 00028 /* this is first call, increment the nCalled counter so we never do this again */ 00029 ++nCalled; 00030 00031 for( long ipISO=ipH_LIKE; ipISO<NISO; ++ipISO ) 00032 { 00033 for( long nelem=ipISO; nelem<LIMELM; ++nelem) 00034 { 00035 /* only grab core for elements that are turned on */ 00036 if( nelem < 2 || dense.lgElmtOn[nelem] ) 00037 { 00038 iso_update_num_levels( ipISO, nelem ); 00039 ASSERT( iso_sp[ipISO][nelem].numLevels_max > 0 ); 00040 iso_sp[ipISO][nelem].st.resize( iso_sp[ipISO][nelem].numLevels_max + 1 00041 + iso_ctrl.nLyman_malloc[ipISO] ); 00042 } 00043 } 00044 } 00045 00046 return; 00047 }