00001 /* This file is part of Cloudy and is copyright (C)1978-2007 by Gary J. Ferland 00002 * For conditions of distribution and use see copyright notice in license.txt */ 00003 /*OpacityZero zero out opacity save arrays, save old opacity in OldOpacSave array */ 00004 #include "cddefines.h" 00005 #include "rfield.h" 00006 #include "opacity.h" 00007 00008 void OpacityZero(void) 00009 { 00010 long int i; 00011 00012 DEBUG_ENTRY( "OpacityZero()" ); 00013 00014 00015 for( i=0; i < rfield.nupper; i++ ) 00016 { 00017 opac.opacity_sct[i] = 0.; 00018 /* save the current opacities */ 00019 opac.OldOpacSave[i] = opac.opacity_abs[i]; 00020 opac.opacity_abs[i] = 0.; 00021 } 00022 00023 /* only zero out the static array if we are going to 00024 * totally redo the static part */ 00025 if( opac.lgRedoStatic ) 00026 { 00027 /*fprintf(ioQQQ," OpacityZero is zeroing out the static opacities\n");*/ 00028 for( i=0; i < rfield.nupper; i++ ) 00029 { 00030 opac.OpacStatic[i] = 0.; 00031 } 00032 } 00033 00034 DEBUG_EXIT( "OpacityZero()" ); 00035 return; 00036 } 00037 00038 /* set old opac array to current versin during search phase */ 00039 void OpacityZeroOld(void) 00040 { 00041 long int i; 00042 00043 DEBUG_ENTRY( "OpacityZeroOld()" ); 00044 00045 00046 for( i=0; i < rfield.nupper; i++ ) 00047 { 00048 /* save the current opacities */ 00049 opac.OldOpacSave[i] = opac.opacity_abs[i]; 00050 } 00051 00052 DEBUG_EXIT( "OpacityZeroOld()" ); 00053 return; 00054 } 00055