#include <NuclideSet.h>

Inheritance diagram for NuclideSet:

Public Types

typedef std::shared_ptr< NuclideSetSP
 
typedef std::shared_ptr< const NuclideSetSCP
 

Public Member Functions

 NuclideSet ()
 
 NuclideSet (Vec_Int ids)
 
 NuclideSet (Vec_Int ids, bool sort)
 
 NuclideSet (int, int, int, Vec_Int)
 
 NuclideSet (int, int, int, size_t, int *)
 
void set_ids_legacy (int, int, int, Vec_Int)
 
void set_ids_legacy (int, int, int, size_t, int *)
 
int sizzzaaa_at (size_t) const
 
int izzzaaa_at (size_t) const
 
int zzzaaai_at (size_t) const
 
std::string symbol_at (size_t) const
 
int s_at (size_t) const
 
int i_at (size_t) const
 
int z_at (size_t) const
 
int a_at (size_t) const
 
size_t lookup_index (int sizzzaaa, bool fortran_offset=false) const
 
size_t lookup_index_guess (int izzzaaa, bool fortran_offset=false) const
 
bool lookup_index_all (Vec_Int *index_list, int izzzaaa, bool fortran_offset=false) const
 
SP_IdMap sizzzaaa_lookup (bool fortran_offset=false) const
 map of sizzzaaa to index; More...
 
bool mapping_sets (const Vec_Int &user_ids, Vec_Int *user_to_master, Vec_Int *master_to_user, bool fortran_offset=false) const
 
bool mapping_sets (size_t nu, int const *user_ids, int *user_to_master, size_t nm, int *master_to_user, bool fortran_offset=false) const
 
bool match (const NuclideSet &) const
 
bool operator== (const NuclideSet &) const
 
std::string print_compare (const NuclideSet &) const
 Compares (and stores in string) comparison between two NuclideSets. More...
 
std::map< int, int > compare_nucl_lists (const NuclideSet &a, std::map< int, int > &loc_a, std::map< int, int > &loc_b) const
 Construct a map comparing nuclides on this set with another set. More...
 
const Vec_Intids () const
 return a const reference to ids More...
 
SCP_Vec_Int scp_ids () const
 return a shared (read-only) ids pointer More...
 
int const * ids_array () const
 return view of ids vector More...
 
size_t ids_size () const
 return size of ids vector More...
 
bool has_ids () const
 return whether the class has a non-null ids More...
 
void set_ids (const Vec_Int &)
 set the ids (copy operation) More...
 
void get_ids (Vec_Int &) const
 populate an existing Vec_Int with a copy of ids More...
 
void manageptr_ids (Vec_Int *&)
 set the ids (ownership transfer) More...
 
void getptr_ids (Vec_Int const *&) const
 retrieve pointer (read-only) to ids More...
 
void get_ids_array (size_t, int *) const
 get array of ids vector (Fortran) More...
 
void set_ids_array (size_t, int *)
 set ids vector from array (Fortran) More...
 
int ids_at (size_t) const
 get element of ids vector by index More...
 
size_t total_nuclides () const
 
bool has_sublibs () const
 
bool has_sublib (int) const
 
size_t count_sublibs () const
 
size_t num_in_sublib (int) const
 
size_t sublib_begin (int, bool fortran_offset=false) const
 
size_t sublib_end (int) const
 
std::string to_string () const
 
Scale::Json::Value to_json () const
 
virtual int serialize (Standard::AbstractStream *stream) const
 
virtual int deserialize (Standard::AbstractStream *stream)
 
virtual unsigned long getSerializedSize () const
 
virtual NuclideSetgetCopy () const
 
virtual long getUID () const
 
virtual bool childOf (long parentUID) const
 
virtual std::string toString () const
 

Static Public Member Functions

static void convert_zzzaaai_to_sizzzaaa (int, int, int, Vec_Int *)
 
static void convert_zzzaaai_to_izzzaaa (Vec_Int *)
 
static void convert_symbol_to_izzzaaa (const Vec_Str &, Vec_Int *)
 
static void convert_izzzaaa_to_symbol (const Vec_Int &, Vec_Str *)
 
static void convert_sizzzaaa_to_zzzaaai (Vec_Int *ids)
 
static int symbol_to_izzzaaa (std::string)
 
static std::string izzzaaa_to_symbol (int)
 
static size_t NOT_FOUND (bool fortran_offset=false)
 
static SP_IdMap sizzzaaa_lookup (const Vec_Int &ids, bool fortran_offset=false)
 map of sizzzaaa to index; More...
 
static SP_IdMap sizzzaaa_lookup (size_t n, const int *ids, bool fortran_offset=false)
 
static bool match (const NuclideSet &, const NuclideSet &)
 
static bool has_sublibs (const Vec_Int &)
 
static bool has_sublibs (size_t, int const *)
 
static bool get_sublibs (Vec_Int *, size_t, int const *)
 
static void sort_mass (Vec_Int *izzzaaa_list)
 
static void sort_isomeric (Vec_Int *izzzaaa_list)
 
static void sort_standard (Vec_Int *sizzzaaa_list)
 
static bool looks_like_zzzaaai (const Vec_Int &ids)
 

Static Public Attributes

static const long uid = 0x96516764f6b06c5d
 

Protected Member Functions

void canonicalize_ids ()
 

Static Protected Member Functions

static bool mapping_sets (const std::vector< int > &sublibs0, size_t nu, int const *user_ids, int *user_to_master, size_t nm, SCP_IdMap master_id_map, int *master_to_user, bool fortran_offset=false)
 
static bool sublib_search_standard (const std::vector< int > &sublibs0, size_t i, int *user_to_master, SCP_IdMap master_id_map, int *master_to_user, int offset, int id)
 

Protected Attributes

SP_Vec_Int b_ids
 

Private Attributes

bool b_has_sublibs
 
Vec_Int b_sublib_range
 
SCP_IdMap b_map
 
bool b_sort
 

Friends

class ScaleUtils::IO::Accessor< NuclideSet >
 

Detailed Description

Member Typedef Documentation

typedef std::shared_ptr<NuclideSet> SP
typedef std::shared_ptr<const NuclideSet> SCP

Constructor & Destructor Documentation

NuclideSet ( Vec_Int  ids,
bool  sort 
)
NuclideSet ( int  nlt,
int  nac,
int  nfp,
Vec_Int  ids 
)
NuclideSet ( int  nlt,
int  nac,
int  nfp,
size_t  n,
int *  ids 
)

Member Function Documentation

void set_ids_legacy ( int  nlt,
int  nac,
int  nfp,
size_t  n,
int *  ids 
)
void convert_zzzaaai_to_sizzzaaa ( int  nlt,
int  nac,
int  nfp,
Vec_Int ids 
)
static
void convert_symbol_to_izzzaaa ( const Vec_Str symbols,
Vec_Int ids 
)
static
void convert_izzzaaa_to_symbol ( const Vec_Int ids,
Vec_Str symbols 
)
static
int symbol_to_izzzaaa ( std::string  symbol)
static

Referenced by Origen::thinLibrary().

std::string izzzaaa_to_symbol ( int  id)
static

Referenced by NuclideSet::symbol_at().

int sizzzaaa_at ( size_t  i) const
int zzzaaai_at ( size_t  i) const
std::string symbol_at ( size_t  j) const
int i_at ( size_t  j) const
int z_at ( size_t  j) const

References NuclideSet::b_ids.

Referenced by DecayData::mass().

int a_at ( size_t  j) const
size_t lookup_index ( int  sizzzaaa,
bool  fortran_offset = false 
) const
size_t lookup_index_guess ( int  izzzaaa,
bool  fortran_offset = false 
) const
bool lookup_index_all ( Vec_Int index_list,
int  izzzaaa,
bool  fortran_offset = false 
) const
SP_IdMap sizzzaaa_lookup ( bool  fortran_offset = false) const
SP_IdMap sizzzaaa_lookup ( const Vec_Int ids,
bool  fortran_offset = false 
)
static

map of sizzzaaa to index;

References NuclideSet::sizzzaaa_lookup().

static SP_IdMap sizzzaaa_lookup ( size_t  n,
const int *  ids,
bool  fortran_offset = false 
)
static
bool mapping_sets ( const Vec_Int user_ids,
Vec_Int user_to_master,
Vec_Int master_to_user,
bool  fortran_offset = false 
) const

master[user_to_master[u]] += user_izzzaaa[u]; master[m] += user[master_to_user[m]];

References NuclideSet::ids_size(), and NuclideSet::NOT_FOUND().

Referenced by NuclideSet::lookup_index_all(), NuclideSet::lookup_index_guess(), and NuclideSet::mapping_sets().

bool mapping_sets ( size_t  nu,
int const *  user_ids,
int *  user_to_master,
size_t  nm,
int *  master_to_user,
bool  fortran_offset = false 
) const
bool match ( const NuclideSet a,
const NuclideSet b 
)
static

References NuclideSet::match().

Referenced by NuclideSet::match().

bool match ( const NuclideSet a) const

References NuclideSet::b_ids.

bool operator== ( const NuclideSet a) const
std::string print_compare ( const NuclideSet a) const

Compares (and stores in string) comparison between two NuclideSets.

Parameters
TheNuclideSet to compare to.

References NuclideSet::compare_nucl_lists().

std::map< int, int > compare_nucl_lists ( const NuclideSet a,
std::map< int, int > &  loc_a,
std::map< int, int > &  loc_b 
) const

Construct a map comparing nuclides on this set with another set.

Parameters
aNuclideSet to compare to.
Returns
A map containing the results.

The resulting map will contain pairs that have the same IZA in the first and second position on if the nuclide exists on both sets. If it exists on only the first set, the second value on the pair will be -1. If it exists on only the second set, the second value on the pair will be -2.

References NuclideSet::b_ids.

Referenced by NuclideSet::print_compare().

SCP_Vec_Int scp_ids ( ) const

return a shared (read-only) ids pointer

Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().

Examples:
tstNuclideSet.cpp.

Referenced by TEST().

Vec_Int::value_type const * ids_array ( ) const

return view of ids vector

Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().

Referenced by StateSetIO_s62b::write().

bool has_ids ( ) const

return whether the class has a non-null ids

Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().

void set_ids ( const Vec_Int ids)

set the ids (copy operation)

Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().

Examples:
tstConcentrations.cpp, tstNuclideSet.cpp, and tstStateSet.cpp.

Referenced by Origen::populateLibraryHeader_YieldResource(), StateSetIO_bof::read(), StateSetIO_s62b::read(), LibraryIO_bof::read(), TEST(), and TEST_P().

void get_ids ( Vec_Int ids) const

populate an existing Vec_Int with a copy of ids

Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().

Referenced by Origen::diffConcentrations(), TransitionMatrixUpdater::load(), and LibraryIO_s61::write().

void manageptr_ids ( Vec_Int *&  ids)

set the ids (ownership transfer)

Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().

void getptr_ids ( Vec_Int const *&  ids) const

retrieve pointer (read-only) to ids

Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().

Examples:
tstNuclideSet.cpp.
void get_ids_array ( size_t  ,
int *   
) const

get array of ids vector (Fortran)

void set_ids_array ( size_t  ,
int *   
)

set ids vector from array (Fortran)

Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().

size_t sublib_begin ( int  s,
bool  fortran_offset = false 
) const
size_t sublib_end ( int  s) const
bool has_sublibs ( const Vec_Int ids)
static
bool has_sublibs ( size_t  n,
int const *  ids 
)
static
bool get_sublibs ( Vec_Int sublibs,
size_t  n,
int const *  ids 
)
static
std::string to_string ( ) const
Examples:
tstNuclideSet.cpp.

References NuclideSet::to_json().

Referenced by TEST().

Json::Value to_json ( ) const
int serialize ( Standard::AbstractStream *  stream) const
virtual
Examples:
tstNuclideSet.cpp.

Referenced by TEST().

int deserialize ( Standard::AbstractStream *  stream)
virtual
Examples:
tstNuclideSet.cpp.

Referenced by TEST().

unsigned long getSerializedSize ( ) const
virtual
NuclideSet * getCopy ( ) const
virtual
long getUID ( ) const
virtual
bool childOf ( long  parentUID) const
virtual
std::string toString ( ) const
virtual
void sort_mass ( Vec_Int izzzaaa_list)
static

Referenced by main().

void sort_isomeric ( Vec_Int izzzaaa_list)
static
void sort_standard ( Vec_Int sizzzaaa_list)
static
bool looks_like_zzzaaai ( const Vec_Int ids)
static
bool mapping_sets ( const std::vector< int > &  sublibs,
size_t  nu,
int const *  user_ids,
int *  user_to_master,
size_t  nm,
SCP_IdMap  master_id_map,
int *  master_to_user,
bool  fortran_offset = false 
)
staticprotected

master[user_to_master[u]] += user_izzzaaa[u]; master[m] += user[master_to_user[m]];

References NuclideSet::has_sublibs(), NuclideSet::NOT_FOUND(), and NuclideSet::sublib_search_standard().

bool sublib_search_standard ( const std::vector< int > &  sublibs0,
size_t  i,
int *  user_to_master,
SCP_IdMap  master_id_map,
int *  master_to_user,
int  offset,
int  id 
)
staticprotected

References Origen::SUBLIB_1LT.

Referenced by NuclideSet::mapping_sets().

Friends And Related Function Documentation

friend class ScaleUtils::IO::Accessor< NuclideSet >
friend

Member Data Documentation

const long uid = 0x96516764f6b06c5d
static

Referenced by NuclideSet::to_json().

bool b_has_sublibs
private
bool b_sort
private

The documentation for this class was generated from the following files: