00001 /* 00002 * ******** fete: From ENDF To ENDL ********* 00003 * 00004 * Copyright (c) 2006, The Regents of the University of California. 00005 * All rights reserved. 00006 * 00007 * Produced at the Lawrence Livermore National Laboratory. 00008 * Written by David A. Brown, Gerry Hedstrom, Tony Hill 00009 * 00010 * This file is part of fete v1.0 (UCRL-CODE-218718) 00011 * 00012 * Please read the COPYING file for "Our Notice and GNU General 00013 * Public License" in the root of this software distribution. 00014 * 00015 * This program is free software; you can redistribute it and/or modify 00016 * it under the terms of the GNU General Public License (as published by 00017 * the Free Software Foundation) version 2, dated June 1991. 00018 * 00019 * This program is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms 00022 * and conditions of the GNU General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License along 00025 * with this program; if not, write to the Free Software Foundation, Inc., 00026 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00027 * 00028 * $Revision: 1892 $ 00029 * $Date: 2006-09-07 10:29:17 -0700 (Thu, 07 Sep 2006) $ 00030 * $Author: dbrown $ 00031 * $Id: mf14classes.hpp 1892 2006-09-07 17:29:17Z dbrown $ 00032 * 00033 * ******** fete: From ENDF To ENDL ********* 00034 */ 00035 00036 // header for the MF=14 translation code 00037 00038 #ifndef MF14CLASSES 00039 #define MF14CLASSES 00040 00041 #include "ENDF_file.hpp" 00042 #include "mf12classes.hpp" 00043 #include "mf15classes.hpp" 00044 00045 using namespace std; 00046 00047 // ----------- class MF14_list ----------------- 00048 //! Class for anisotropic gamma distributions given as Legendre expansions 00049 class MF14_list 00050 { 00051 private: 00052 mf12_file *inFile; 00053 mf14_file *angle_file; // angular distributions 00054 mf15_file contin_file; // continuum energy distributions 00055 00056 vector<MF12_base> coefs_; 00057 MF15_list continuum_dist; // continuum distribution 00058 00059 multiplicity multiple; // the total gamma multiplicity 00060 00061 double AWR; 00062 double mf14_EG; // next anisotropic gamma 00063 int mf14_NR; // number of mf14 interpolation regions 00064 int mf14_NE; // number of mf14 incident energies 00065 int order_; // maximum Legendre order 00066 int mf14_NI; // number of isotropic gammas 00067 int mf14_NK; // total number of mf14 gammas, including continuum 00068 int mf12_NK; // total number of mf12 gammas, including continuum 00069 int num_aniso; // number of anisotropic gammas 00070 int aniso_count; // numer of anisotropic gammas read 00071 bool with_mf15; // is there an mf15 continuum data file? 00072 00073 public: 00074 //! Default constructor 00075 MF14_list( ): inFile(0), angle_file(0), contin_file(), coefs_(0), 00076 continuum_dist(), multiple(), AWR(0.0), mf14_EG(0.0), 00077 mf14_NR(0), mf14_NE(0), order_(0), mf14_NI(0), 00078 mf14_NK(0), mf12_NK(0), num_aniso(0), aniso_count(0), with_mf15(false){} 00079 00080 //! Constructor with given files and number of distributions 00081 // NI: number of isotropic distributions 00082 // NK: total number of gamma distributions 00083 // order: order of Legendre expansion 00084 MF14_list( int NI, int NK, int order, mf12_file *InFile, 00085 mf14_file *Angle_File ); 00086 00087 //! Default destructor 00088 ~MF14_list(); 00089 00090 //! Controls the processing of these data. 00091 // mf12_NK is the number of lines (including continuum). 00092 void master( int mf12_NK ); 00093 00094 //! Reads in gamma probabilities and their Legendre expansions 00095 void read_data( ); 00096 00097 //! Reads in data for one gamma line 00098 void one_line( double EG, double *prev_E_in, int NR, int NP, 00099 bool do_shift); 00100 00101 //! Inserts an (EG, probability) pair into a list 00102 void insert_pair( dd_link& XYdata, MF12_base::iterator e_in_link ); 00103 00104 //! Reads Legendre data for one gamma from an mf14 file 00105 void read_Legendre( double *coef_buff, double **Coef_ptrs ); 00106 00107 //! Inserts the Legendre data for one gamma from an mf14 file into our lists 00108 // Coef_ptrs[ j ] points to the j-th m14 incident energy, and this is 00109 // followed by order_ Legendre coefficients 00110 void insert_Legendre( double e_in, dd_link& XYdata, 00111 double prev_E_in, double **Coef_ptrs ); 00112 00113 // strip any incident energy points that have 0 multiplicity from 00114 // both the mulitplicity and outgoing angular distributions 00115 void strip_zero_multiplicity( ); 00116 00117 //! Widens the delta functions for the discrete spectrum 00118 void widen_delta( ); 00119 00120 //! Widens the jump discontinuities 00121 void widen_jumps( ); 00122 00123 //! Removes redundant data points 00124 void thinit( ); 00125 00126 //! Reads the mf15 file on continuum energy distributions 00127 void continuum( int NR, int NP ); 00128 00129 //! Combines the continuous spectrum with the discrete lines 00130 void add_lists( ); 00131 00132 //! Deletes any extra continuum incident energies. 00133 void extra_contin( ); 00134 00135 //! Ensures that we have the same list of E_gamma values for all Legendre orders. 00136 void check_Legendre( bool halt_on_error = true ); 00137 00138 //! Prints the lists for debugging purposes 00139 void print( ); 00140 00141 //! Sets the norms of the spectra according to the given multiplicities 00142 void set_norms( ); 00143 00144 //! Normalizes the probabilities to 1 00145 void renorm( ); 00146 00147 //! Writes an ENDL i=4 file. 00148 void write_endl( ); 00149 00150 }; 00151 00152 // ----------- class MF14_split ----------------- 00153 //! Class for anisotropic gamma distributions and discrete lines given as Legendre expansions 00154 class MF14_split : public MF12_list 00155 { 00156 private: 00157 mf14_file *angle_file; // angular distributions 00158 00159 public: 00160 //! Default constructor 00161 MF14_split( ) 00162 { 00163 } 00164 00165 //! Default destructor 00166 ~MF14_split() 00167 { 00168 } 00169 00170 //! read and process the data 00171 // NI: number of isotropic distributions 00172 // NK: total number of gamma distributions 00173 void master( double awr, int NK, mf12_file *InFile, mf14_file *Angle_File ); 00174 00175 }; 00176 // ----------- class MF14_c55_list ----------------- 00177 //! Class to handle anisotropic MF=14 file and write ENDL c=55 file 00178 class MF14_c55_list 00179 { 00180 public: 00181 //! Default constructor 00182 MF14_c55_list(); 00183 00184 //! Default destructor 00185 ~MF14_c55_list(); 00186 00187 //! Controls the processing of the MF=14 data 00188 // LTT: Legendre flag 00189 // NK: total number of lines 00190 // NI: number of isotropic lines 00191 void master( mf14_file& inFile, int LTT, int NK, int NI ); 00192 00193 //! Makes a Legendre list for one gamma and returns the gamma energy 00194 double make_Legendre( mf14_file& inFile, two_d_Legendre& Legendre ); 00195 00196 //! Makes a table list for one gamma and returns the gamma energy 00197 double make_table( mf14_file& inFile, mf4_table& table ); 00198 }; 00199 00200 #endif