Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

dd_list Class Reference

List of dd_links. More...

Inheritance diagram for dd_list:

Inheritance graph
[legend]
Collaboration diagram for dd_list:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 dd_list ()
 Default constructor.

double & E_in ()
 Common name used to access the label for this list.

void unit_base ()
 To scale the energies in the list to make 0 <= E' <= 1.

void rescale ()
 To expand the energies from unit base to min_E_out <= E' <= max_E_out.

void print ()
 Method for printing this list.

void copy (dd_list &list_2)
 Copy one list into another.

dd_listoperator+= (dd_list &list_2)
 Adds one list to another, with interpolation.

dd_listline_sum (dd_list &list_2, double tol)
 Add list_2 as discrete lines (for gammas). Here, tol measures the sameness of the energies.

void join_lines ()
 If two adjacent lines have the same frequency, this routine adds their intensities.

dd_listoperator *= (double X)
 Scales the Y value of this list.

dd_listoperator *= (dd_list &list_2)
 Multiplies the Y values by the Y values in a second list.

dd_listoperator/= (dd_list &list_2)
 Divides the Y values in one list by the values in another.

bool needs_widening ()
 Tests if data actually needs jump widening.

void widen_jumps (double cluster_min=1e-11)
 Shift duplicate x-values in the list.

void widen_cluster (dd_list::iterator cluster_start, dd_list::iterator cluster_end, int cluster_size, double jump_width, double cluster_min)
 Utility code used by widen_jumps.

void thinit ()
 Thin the list to within global tolerance (tol_1d).

void read_data (ifstream &inFile, int NP, double x_factor, double y_factor)
 Insert into the list NP data pairs from inFile.

dd_list::iterator find_next (double X)
 Find the link with the next larger x-value.

double evaluate (double X)
 Find the y-value corresponding to this x using lin-lin interpolation.

void chop (double max_E)
 Chops off values above the maximum ENDL energy.

void write_endl (int I)
 Writes the 2-column data to an ENDL file, e.g., cross sections.

double interp (double E, dd_link &left_link, dd_link &right_link, int Interp_Type)
 This function performs Interp_Type interpolation between two dd_links.

double hist_interp (double E, dd_link &left_link, dd_link &right_link)
 This function performs histogram interpolation between two dd_links.

double linlin_interp (double E, dd_link &left_link, dd_link &right_link)
 This function performs lin-lin interpolation between two dd_links.

double linlog_interp (double E, dd_link &left_link, dd_link &right_link)
 This function performs lin-log interpolation between two dd_links.

double loglin_interp (double E, dd_link &left_link, dd_link &right_link)
 This function performs log-lin interpolation between two dd_links.

double loglog_interp (double E, dd_link &left_link, dd_link &right_link)
 This function performs log-log interpolation between two dd_links.

double zeroin (double(*func)(double, double), double target, dd_link &BB, dd_link &CC, double alpha, double tol)
 Return the root with accuracy of tol + 4*tol*|root|.

bool check_interp (dd_list::iterator left_link, dd_list::iterator mid_link, dd_list::iterator right_link, double tol, double noise)
 Checks the accuracy of linear interpolation.

void expand_interp (double Max_E)
 Expand the list to permit linear-linear interpolation.

void expand_interp (int LEP, double Max_E)
void Hist_2_LinLin (dd_list::iterator left_link, double Max_E)
 Expand histogram data to linear-linear between the two cosecutive links.

void Hist_2_LinLin (dd_list::iterator first_link, dd_list::iterator last_link, double Max_E)
 Expand histogram data to linear-linear between the two links.

void LogLog_2_LinLin (dd_list::iterator left_link)
 Expand the log-log data to linear-linear between the two consecutive links.

void LogLog_2_LinLin (dd_list::iterator first_link, iterator last_link)
 Expand the log-log data to linear-linear between the two links.

void LogLog_2_LinLin ()
 This function expands log-log data to linear-linear for an entire link list.

void collect_E_in (list< double > &E_in_list)
 Appends to E_in_list the incident energies in this list.

void pad_head (double E0)
 insert zero links from E0 to the head

void pad_tail (double E0)
 insert zero links from the tail to E0

void unique ()
 remove duplicate energies, overrides list<>::unique()

void fill_with (list< double > &E_in_list)
 make sure that there are links for each energy in E_in_list


Public Attributes

double tag
 A label for the list.

double min_E_out
double max_E_out
vector< int > NBT
 Energy at which the interpolation type changes.

vector< int > INT
 Interpolation type used.


Detailed Description

This is our most popular linked list. It is used to store pointwise two-dimensional data.

Definition at line 117 of file list_1d.hpp.


Constructor & Destructor Documentation

dd_list::dd_list  )  [inline]
 

Definition at line 144 of file list_1d.hpp.

References INT, max_E_out, min_E_out, NBT, and tag.


Member Function Documentation

bool dd_list::check_interp dd_list::iterator  left_link,
dd_list::iterator  mid_link,
dd_list::iterator  right_link,
double  tol,
double  noise
 

Parameters:
left_link start check at this link
mid_link link in the middle
right_link end check at this link
tol tolerance to be maintained (needs to be replaced with global parameter)
noise anything below this value is ignored (needs to be replaced by global)
This function insures the accuracy of linear interpolation to within some tolerance for values above some threshold.

Definition at line 944 of file list_1d.cpp.

References linlin_interp().

Referenced by thinit().

void dd_list::chop double  max_E  ) 
 

Definition at line 655 of file list_1d.cpp.

References ENDL_EPSILON(), evaluate(), and SevereError().

Referenced by one_d_table::read_data(), and write_endl().

void dd_list::collect_E_in list< double > &  E_in_list  ) 
 

Definition at line 1341 of file list_1d.cpp.

References E_in().

Referenced by Legendre_list::add_lines().

void dd_list::copy dd_list list_2  ) 
 

Parameters:
list_2 the list to copy
Makes a copy of a list.

Definition at line 642 of file list_1d.cpp.

References tag.

Referenced by one_d_isotropic::copy(), one_d_Legendre::copy(), one_d_Madland::copy(), one_d_Watt::copy(), one_d_Maxwell::copy(), one_d_evap::copy(), one_d_table::copy(), and one_d_table::list_interp().

double& dd_list::E_in  )  [inline]
 

Definition at line 147 of file list_1d.hpp.

References tag.

Referenced by distrib_base::check_equiprob(), collect_E_in(), one_d_Maxwell::f(), one_d_evap::f(), fill_with(), MF12_base::init_list(), one_d_isotropic::initiate(), one_d_Madland::initiate(), one_d_Maxwell::initiate(), one_d_evap::initiate(), one_d_charge::initiate(), MF14_list::insert_Legendre(), one_d_Watt::intermediate_b(), distrib_base::list_interp(), one_d_Legendre::list_interp(), one_d_Madland::list_interp(), one_d_Watt::list_interp(), one_d_Maxwell::list_interp(), one_d_evap::list_interp(), one_d_table::list_interp(), MF14_list::master(), MF12_deexcite::master(), mf6_table::one_E_in(), MF14_list::one_line(), distrib_base::print(), distrib_base::renorm(), and one_d_Watt::set_EUa().

double dd_list::evaluate double  X  ) 
 

Parameters:
X a value along the "x" axis of the list
Returns the "y" value at any value of "x".

Definition at line 905 of file list_1d.cpp.

References find_next(), linlin_interp(), pastenum(), SevereError(), and Warning().

Referenced by two_d_list< multiplicity >::check_interp(), chop(), two_d_list< multiplicity >::fill_in_list(), two_d_Madland::insert(), two_d_Watt::insert(), two_d_Maxwell::insert(), two_d_evap::insert(), one_d_table::list_interp(), two_d_charge::master(), mf5_table::one_E_in(), operator *=(), operator/=(), MF14_list::read_data(), two_d_Watt::set_b(), MF12_list::set_mf15_wt(), MF14_list::set_norms(), C55_gammas::set_weights(), MF12_base::set_weights(), and MF12_base::weight_mult().

void dd_list::expand_interp int  LEP,
double  Max_E
 

This version is used for gammas, in which LEP is the interpolation type Max_E is the maximum energy for histogram data.

Definition at line 1015 of file list_1d.cpp.

References ENDL_EPSILON(), pastenum(), SevereError(), and Unimplemented().

void dd_list::expand_interp double  Max_E  ) 
 

Expand the list to permit linear-linear interpolation. Max_E is the maximum energy for histogram data.

Reimplemented in one_d_table.

Definition at line 960 of file list_1d.cpp.

References Hist_2_LinLin(), INT, LogLog_2_LinLin(), NBT, pastenum(), and Unimplemented().

Referenced by one_d_table::expand_interp(), two_d_Madland::read_data(), two_d_Watt::read_data(), two_d_Maxwell::read_data(), two_d_evap::read_data(), and mf5_table::read_data().

void dd_list::fill_with list< double > &  E_in_list  ) 
 

Definition at line 1419 of file list_1d.cpp.

References E_in(), linlin_interp(), dd_link::x, and dd_link::y.

Referenced by Legendre_list::add_lines().

dd_list::iterator dd_list::find_next double  X  ) 
 

Definition at line 883 of file list_1d.cpp.

Referenced by evaluate(), mf6_table::one_E_in(), and Legendre_list::read_data().

void dd_list::Hist_2_LinLin dd_list::iterator  first_link,
dd_list::iterator  last_link,
double  Max_E
 

Expand histogram data to linear-linear between the two links first_link and last_link.

Definition at line 1149 of file list_1d.cpp.

References Hist_2_LinLin(), and SevereError().

void dd_list::Hist_2_LinLin dd_list::iterator  left_link,
double  Max_E
 

Expand histogram data to linear-linear between the two consecutive links. If we need a jump, insert a new link

Definition at line 1085 of file list_1d.cpp.

References ENDL_EPSILON(), SevereError(), dd_link::x, and dd_link::y.

Referenced by expand_interp(), and Hist_2_LinLin().

double dd_list::hist_interp double  E,
dd_link left_link,
dd_link right_link
 

Parameters:
E the point at which the interpolation is calculated
left_link the lower link used to perform the interpolation
right_link the upper link to use in the extrapolation
Performs interpolation for histogram type data.

Definition at line 90 of file list_1d.cpp.

References SevereError(), dd_link::x, and dd_link::y.

Referenced by interp().

double dd_list::interp double  E,
dd_link left_link,
dd_link right_link,
int  Interp_Type
 

Parameters:
E the point at which the interpolation is calculated
left_link the lower link used to perform the interpolation
right_link the upper link to use in the extrapolation
Interp_Type the ENDF numeric tag for the type of interpolation to use
This function is used to interpolation between two links using the specified interpolation method. The tolerance for the interpolation is a global parameter.

Definition at line 57 of file list_1d.cpp.

References hist_interp(), linlin_interp(), linlog_interp(), loglin_interp(), loglog_interp(), pastenum(), and Unimplemented().

Referenced by two_d_Watt::set_b().

void dd_list::join_lines  ) 
 

If two adjacent lines have the same frequency, this routine adds their intensities.

Definition at line 820 of file list_1d.cpp.

dd_list & dd_list::line_sum dd_list list_2,
double  tol
 

Definition at line 772 of file list_1d.cpp.

References dd_link::x, and dd_link::y.

double dd_list::linlin_interp double  E,
dd_link left_link,
dd_link right_link
 

Parameters:
E the point at which the interpolation is calculated
left_link the lower link used to perform the interpolation
right_link the upper link to use in the extrapolation
Performs linear-linear interpolation at a specified point between two links.

Definition at line 104 of file list_1d.cpp.

References dd_link::E_out(), pastenum(), Warning(), and dd_link::y.

Referenced by check_interp(), evaluate(), fill_with(), interp(), and distrib_base::thicken().

double dd_list::linlog_interp double  E,
dd_link left_link,
dd_link right_link
 

Parameters:
E the point at which the interpolation is calculated
left_link the lower link used to perform the interpolation
right_link the upper link to use in the extrapolation
Performs linear-logarithmic interpolation at a specified point between two links.

Definition at line 156 of file list_1d.cpp.

References SevereError(), dd_link::x, and dd_link::y.

Referenced by interp().

double dd_list::loglin_interp double  E,
dd_link left_link,
dd_link right_link
 

Parameters:
E the point at which the interpolation is calculated
left_link the lower link used to perform the interpolation
right_link the upper link to use in the extrapolation
Performs logarithmic-linear interpolation at a specified point between two links.

Definition at line 130 of file list_1d.cpp.

References pastenum(), SevereError(), dd_link::x, and dd_link::y.

Referenced by interp().

void dd_list::LogLog_2_LinLin  ) 
 

This function expands a one dimensional list originally given in log-log pointwise interpolable form and adds enough points so that the list is linear-linear pointwise interpolable to within some tolerance set at runtime. See the related page Log-Log Interpolation

Referenced by expand_interp().

void dd_list::LogLog_2_LinLin dd_list::iterator  first_link,
dd_list::iterator  last_link
 

Parameters:
first_link expansion starts with this link
last_link expansion ends at this link
This function expands data between the two given links.

Definition at line 1253 of file list_1d.cpp.

void dd_list::LogLog_2_LinLin dd_list::iterator  left_link  ) 
 

Parameters:
left_link Expansion starts at this link and goes to the next
This function expands data between two adjacent links, starting with the given link.

Definition at line 1168 of file list_1d.cpp.

References Global, maxE_loglog(), SevereError(), GlobalParameterClass::Value(), dd_link::x, dd_link::y, and zeroin().

double dd_list::loglog_interp double  E,
dd_link left_link,
dd_link right_link
 

Parameters:
E the point at which the interpolation is calculated
left_link the lower link used to perform the interpolation
right_link the upper link to use in the extrapolation
Performs logarithmic-logarithmic interpolation at a specified point between two links.

Definition at line 182 of file list_1d.cpp.

References SevereError(), dd_link::x, and dd_link::y.

Referenced by interp().

bool dd_list::needs_widening  ) 
 

Definition at line 429 of file list_1d.cpp.

References ENDL_EPSILON().

dd_list & dd_list::operator *= dd_list list_2  ) 
 

Mulitplies the "y" values of the first list by the values in another on a union grid.

Definition at line 849 of file list_1d.cpp.

References evaluate().

dd_list & dd_list::operator *= double  X  ) 
 

Scales all the "y" values in a list by some factor.

Definition at line 839 of file list_1d.cpp.

dd_list & dd_list::operator+= dd_list list_2  ) 
 

Adds the "y" values of the second list to the first list on a union grid.

Definition at line 755 of file list_1d.cpp.

References fill_in_lists().

dd_list & dd_list::operator/= dd_list list_2  ) 
 

Divides the "y" values of the first list by the values in another on a union grid.

Definition at line 860 of file list_1d.cpp.

References evaluate(), and Warning().

void dd_list::pad_head double  E0  ) 
 

Definition at line 1353 of file list_1d.cpp.

References ENDL_EPSILON(), dd_link::x, and dd_link::y.

Referenced by Legendre_list::add_lines().

void dd_list::pad_tail double  E0  ) 
 

Definition at line 1376 of file list_1d.cpp.

References ENDL_EPSILON(), dd_link::x, and dd_link::y.

Referenced by Legendre_list::add_lines().

void dd_list::print  ) 
 

A function used to print out the contents of a dd_list.

Reimplemented in distrib_base, and cascade.

Definition at line 413 of file list_1d.cpp.

References ENDLClass::data(), and ENDL.

Referenced by distrib_base::print().

void dd_list::read_data ifstream &  inFile,
int  NP,
double  x_factor,
double  y_factor
 

Parameters:
inFile the intermediate ENDF input file
NP the number of data pairs to read
x_factor the scale factor for all "x" values read in
y_factor the scale factor for all "y" values read in
Reads the NP data pairs into a dd_list after scaling the x and y values by x_factor and y_factor.

Definition at line 389 of file list_1d.cpp.

References read_dd(), dd_link::x, and dd_link::y.

Referenced by two_d_Madland::read_data(), two_d_Watt::read_data(), two_d_Maxwell::read_data(), two_d_evap::read_data(), and mf5_table::read_data().

void dd_list::rescale  ) 
 

Definition at line 376 of file list_1d.cpp.

References max_E_out, and min_E_out.

void dd_list::thinit  ) 
 

Definition at line 538 of file list_1d.cpp.

References check_interp(), ENDL, ENDLClass::F, Global, and GlobalParameterClass::Value().

Referenced by one_d_Madland::initiate(), one_d_table::list_interp(), and multiplicity::scale_by_xs().

void dd_list::unique  ) 
 

Definition at line 1400 of file list_1d.cpp.

Referenced by LoadMF3Data().

void dd_list::unit_base  ) 
 

Definition at line 355 of file list_1d.cpp.

References max_E_out, and min_E_out.

void dd_list::widen_cluster dd_list::iterator  cluster_start,
dd_list::iterator  cluster_end,
int  cluster_size,
double  jump_width,
double  cluster_min
 

Definition at line 483 of file list_1d.cpp.

References pastenum(), and Warning().

Referenced by widen_jumps().

void dd_list::widen_jumps double  cluster_min = 1e-11  ) 
 

Definition at line 443 of file list_1d.cpp.

References ENDL_EPSILON(), ENDL_JUMP_WIDTH(), and widen_cluster().

Referenced by MF12_list::do_movers(), MF12_list::just_statics(), distrib_base::list_interp(), LoadMF3Data(), fission_delay::manager(), MF12_list::move_w_contin(), MF12_list::plus_contin(), one_d_table::read_data(), two_d_list< multiplicity >::weight_jumps(), MF13_list::write_continuum(), MF12_list::write_continuum(), and write_endl().

void dd_list::write_endl int  I  ) 
 

Definition at line 688 of file list_1d.cpp.

References chop(), ENDLClass::data(), ENDL, ENDLClass::eof_line, ENDLClass::F, ENDLClass::file_name, ENDLClass::header_line_1, ENDLClass::header_line_2, Info(), ENDLClass::Max_E_in, ENDLClass::new_file(), pastenum(), ENDLClass::set_I_number(), Warning(), widen_jumps(), and ENDLClass::write_file.

Referenced by three_d_Kalbach::check_i10(), MF12_list::do_movers(), two_d_charge::get_xs(), MF12_list::just_statics(), LoadFissionData(), LoadMF3Data(), LoadMF6Data(), fission_delay::manager(), MF14_table::master(), MF14_list::master(), MF12_list::move_w_contin(), fission_delay::one_mult(), MF12_list::plus_contin(), MF13_list::write_continuum(), and MF12_list::write_continuum().

double dd_list::zeroin double(*  func)(double, double),
double  target,
dd_link BB,
dd_link CC,
double  alpha,
double  tol
 

Parameters:
func the function to take the root of
target the desired equality
BB the minimum value to consider
CC the maximum value to consider
alpha the dependent variable
tol the parameter used to set the tolerance of the seek
The root of the function is computed in some interval to some tolerance.

Definition at line 211 of file list_1d.cpp.

References EPS, SevereError(), Warning(), dd_link::x, and dd_link::y.

Referenced by one_d_Watt::extrema(), and LogLog_2_LinLin().


Member Data Documentation

dd_list::INT
 

Interpolation methods for the different interpolation regions.

Referenced by MF14_list::continuum(), MF13_list::continuum(), MF12_list::continuum(), dd_list(), multiplicity::divide_by_xs(), phase_space::expand_data(), expand_interp(), one_d_table::expand_interp(), LoadFissionData(), LoadMF3Data(), LoadMF6Data(), MF14_table::master(), MF13_list::master(), MF15_list::one_e_dist(), fission_delay::one_gen_evap(), MF12_raw::one_line(), fission_delay::one_mult(), ENDL_table::read_data(), two_d_Madland::read_data(), two_d_Watt::read_data(), two_d_Maxwell::read_data(), two_d_evap::read_data(), mf5_table::read_data(), MF15_list::read_data(), fission_delay::read_mf1(), MF12_base::read_mult(), two_d_charge::read_xs(), multiplicity::scale_by_xs(), and two_d_Watt::set_b().

double dd_list::max_E_out
 

Definition at line 126 of file list_1d.hpp.

Referenced by dd_list(), one_d_Watt::extrema(), one_d_Maxwell::extrema(), one_d_evap::extrema(), one_d_Watt::f(), one_d_hat::initiate(), one_d_Watt::initiate(), one_d_Maxwell::initiate(), one_d_evap::initiate(), one_d_Watt::intermediate_b(), one_d_table::read_data(), rescale(), one_d_Watt::set_EUa(), and unit_base().

double dd_list::min_E_out
 

Definition at line 125 of file list_1d.hpp.

Referenced by dd_list(), one_d_hat::initiate(), one_d_Maxwell::initiate(), one_d_evap::initiate(), one_d_Watt::intermediate_b(), one_d_table::read_data(), rescale(), one_d_Watt::set_EUa(), and unit_base().

dd_list::NBT
 

Interpolation regions.

Referenced by MF14_list::continuum(), MF13_list::continuum(), MF12_list::continuum(), dd_list(), multiplicity::divide_by_xs(), expand_interp(), one_d_table::expand_interp(), LoadFissionData(), LoadMF3Data(), LoadMF6Data(), MF14_table::master(), MF13_list::master(), MF15_list::one_e_dist(), fission_delay::one_gen_evap(), MF12_raw::one_line(), fission_delay::one_mult(), two_d_Madland::read_data(), two_d_Watt::read_data(), two_d_Maxwell::read_data(), two_d_evap::read_data(), mf5_table::read_data(), MF15_list::read_data(), fission_delay::read_mf1(), MF12_base::read_mult(), two_d_charge::read_xs(), multiplicity::scale_by_xs(), and two_d_Watt::set_b().

double dd_list::tag
 

Definition at line 123 of file list_1d.hpp.

Referenced by copy(), dd_list(), multiplicity::E_gamma(), distrib_base::E_gamma(), E_in(), and distrib_base::mu().


Generated on Thu Sep 7 10:38:42 2006 for fete -- From ENDFB6 To ENDL by doxygen 1.3.4