#include <Concentrations.h>

Container for Concentrations data. More...
Public Types | |
typedef std::shared_ptr< Concentrations > | SP |
typedef std::shared_ptr< const Concentrations > | SCP |
Public Member Functions | |
Concentrations () | |
default constructor (default MOLE units, 0.0 cm^3 volume) More... | |
Concentrations (ConcentrationUnit units) | |
constructor with units (1.0 cm^3 volume) More... | |
Concentrations (NuclideSet nucset) | |
std::string | to_string () const |
Scale::Json::Value | to_json () const |
const NuclideSet & | nuclide_set () const |
return a const reference to nuclide_set More... | |
SCP_NuclideSet | scp_nuclide_set () const |
return a shared (read-only) nuclide_set pointer More... | |
bool | has_nuclide_set () const |
return whether the class has a non-null nuclide_set More... | |
void | set_nuclide_set (const NuclideSet &) |
set the nuclide_set (copy operation) More... | |
void | get_nuclide_set (NuclideSet &) const |
populate an existing NuclideSet with a copy of nuclide_set More... | |
void | manageptr_nuclide_set (NuclideSet *&) |
set the nuclide_set (ownership transfer) More... | |
void | getptr_nuclide_set (NuclideSet const *&) const |
retrieve pointer (read-only) to nuclide_set More... | |
size_t | total_nuclides () const |
void | set_vals (double) |
SCP_Vec_Dbl | scp_vals () const |
return a shared (read-only) vals pointer More... | |
const Vec_Dbl & | vals () const |
return a const reference to vals More... | |
double const * | vals_array () const |
return view of vals vector More... | |
size_t | vals_size () const |
return size of vals vector More... | |
bool | has_vals () const |
return whether the class has a non-null vals More... | |
void | set_vals (const Vec_Dbl &) |
set the vals (copy operation) More... | |
void | get_vals (Vec_Dbl &) const |
populate an existing Vec_Dbl with a copy of vals More... | |
void | manageptr_vals (Vec_Dbl *&) |
set the vals (ownership transfer) More... | |
void | getptr_vals (Vec_Dbl const *&) const |
retrieve pointer (read-only) to vals More... | |
void | get_vals_array (size_t, double *) const |
get array of vals vector (Fortran) More... | |
void | set_vals_array (size_t, double *) |
set vals vector from array (Fortran) More... | |
double | vals_at (size_t) const |
get element of vals vector by index More... | |
double | lookup_val (int id, double not_found=BAD_DOUBLE) const |
bool | match (const Concentrations &b) const |
bool | approx_eq (const Concentrations &b, double tol=1e-12) const |
bool | set_units (ConcentrationUnit) |
ConcentrationUnit | units () const |
bool | convert_units (ConcentrationUnit, Vec_Dbl *) const |
bool | convert_units (ConcentrationUnit, double volume, Vec_Dbl *) const |
void | set_volume (double) |
set the scalar volume More... | |
double | volume () const |
return the scalar volume More... | |
void | get_volume (double &) const |
void | scale (double wt) |
double | sum () const |
double | sum_hm (int min_z=90, double *total_hm=nullptr) const |
void | normalize (double target_total=1.0) |
void | normalize_hm (double target_hm_total=1.0, int min_z=90) |
void | accumulate (const Vec_Dbl &vals, double wt=1.0) |
void | accumulate (size_t n, const double *vals, double wt=1.0) |
bool | accumulate_concs (const Vec_Int &ids, const Vec_Dbl &vals, double wt=1.0) |
bool | accumulate_concs (size_t, const int *, const double *, double wt=1.0) |
bool | accumulate_concs (const Concentrations &, double wt=1.0) |
bool | set_concs (const Vec_Int &ids, const Vec_Dbl &vals, double wt=1.0) |
bool | set_concs (size_t, const int *, const double *, double wt=1.0) |
bool | set_concs (const Concentrations &, double wt=1.0) |
SCP_NuclideResource | nuclide_resource () const |
return shared (read-only) nuclide_resource resource \ More... | |
bool | has_nuclide_resource () const |
whether this instantiation of class has the nuclide_resource resource \ More... | |
void | set_nuclide_resource (SCP_NuclideResource) |
set a new shared (read-only) nuclide_resource resource (non-const version) \ More... | |
SCP_DecayResource | decay_resource () const |
return shared (read-only) decay_resource resource \ More... | |
bool | has_decay_resource () const |
whether this instantiation of class has the decay_resource resource \ More... | |
void | set_decay_resource (SCP_DecayResource) |
set a new shared (read-only) decay_resource resource (non-const version) \ More... | |
virtual int | serialize (Standard::AbstractStream *stream) const |
virtual int | deserialize (Standard::AbstractStream *stream) |
virtual unsigned long | getSerializedSize () const |
virtual Concentrations * | getCopy () const |
virtual long | getUID () const |
virtual std::string | toString () const |
Static Public Member Functions | |
static bool | match (const Concentrations &a, const Concentrations &b) |
Static Public Attributes | |
static const long | uid = 0x96425654f6b06c5d |
Protected Member Functions | |
bool | isEqualConcentrations (const Concentrations &a) const |
virtual bool | isEqual (const Standard::Serializable &b) const |
void | canonicalize_vals () |
void | canonicalize_nuclide_set () |
Protected Attributes | |
ConcentrationUnit | b_units |
SP_NuclideSet | b_nuclide_set |
SP_Vec_Dbl | b_vals |
double | b_volume |
SCP_NuclideResource | r_nuclide_resource |
SCP_DecayResource | r_decay_resource |
Friends | |
class | ScaleUtils::IO::Accessor< Concentrations > |
class | State |
class | StateSet |
Detailed Description
Container for Concentrations data.
The conc data container manages a set of nuclide ids and their respective values in a given set of units.
- Examples:
- tstConcentrations.cpp, tstState.cpp, and tstStateSet.cpp.
Member Typedef Documentation
typedef std::shared_ptr<Concentrations> SP |
typedef std::shared_ptr<const Concentrations> SCP |
Constructor & Destructor Documentation
Concentrations | ( | ) |
default constructor (default MOLE units, 0.0 cm^3 volume)
Referenced by Concentrations::getCopy().
Concentrations | ( | ConcentrationUnit | units | ) |
constructor with units (1.0 cm^3 volume)
Concentrations | ( | NuclideSet | nucset | ) |
constructor with nuclide set (default MOLE units, 1.0 cm^3 volume) this constructor will let you pass a nuclide set where a concentrations
Member Function Documentation
std::string to_string | ( | ) | const |
References Concentrations::to_json().
Referenced by Concentrations::toString().
Json::Value to_json | ( | ) | const |
References Concentrations::b_nuclide_set, Concentrations::b_units, Concentrations::b_volume, and Origen::convertConcUnitToPrettyString().
Referenced by Concentrations::to_string().
const NuclideSet & nuclide_set | ( | ) | const |
return a const reference to nuclide_set
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Invalid if this instance of Concentrations goes out of scope.
- Examples:
- tstConcentrations.cpp, and tstStateSet.cpp.
Referenced by Concentrations::accumulate_concs(), Origen::diffConcentrations(), Material::get_concs_at(), Material::set_concs_at(), TEST(), timing_ref(), timing_ref_at(), StateSetIO_s62b::write(), and StateSetIO_bof::write().
SCP_NuclideSet scp_nuclide_set | ( | ) | const |
return a shared (read-only) nuclide_set pointer
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Referenced by Origen::printConcentrations_csv().
bool has_nuclide_set | ( | ) | const |
return whether the class has a non-null nuclide_set
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Referenced by Concentrations::total_nuclides().
void set_nuclide_set | ( | const NuclideSet & | nuclide_set | ) |
set the nuclide_set (copy operation)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
- Examples:
- tstConcentrations.cpp, and tstStateSet.cpp.
Referenced by FakeFactory::newspStateSet_10nuclide(), StateSetIO_s62b::read(), Origen::saveStateSet(), FakeFactory::StateSet_random1(), and TEST().
void get_nuclide_set | ( | NuclideSet & | nuclide_set | ) | const |
populate an existing NuclideSet with a copy of nuclide_set
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void manageptr_nuclide_set | ( | NuclideSet *& | nuclide_set | ) |
set the nuclide_set (ownership transfer)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void getptr_nuclide_set | ( | NuclideSet const *& | nuclide_set | ) | const |
retrieve pointer (read-only) to nuclide_set
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
size_t total_nuclides | ( | ) | const |
References Concentrations::b_nuclide_set, and Concentrations::has_nuclide_set().
Referenced by Concentrations::accumulate(), Origen::printConcentrations_csv(), and StateSetIO_s62b::write().
void set_vals | ( | double | val | ) |
- Examples:
- tstConcentrations.cpp, and tstStateSet.cpp.
References Concentrations::b_nuclide_set, Concentrations::b_vals, and Concentrations::canonicalize_vals().
Referenced by Concentrations::accumulate(), Material::get_concs_at(), FakeFactory::newspStateSet_10nuclide(), GridView_State::permute(), StateSetIO_s61::read(), StateSetIO_s62b::read(), Concentrations::set_concs(), FakeFactory::StateSet_random1(), and TEST().
SCP_Vec_Dbl scp_vals | ( | ) | const |
return a shared (read-only) vals pointer
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Referenced by TEST().
const Vec_Dbl & vals | ( | ) | const |
return a const reference to vals
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Invalid if this instance of Concentrations goes out of scope.
- Examples:
- tstConcentrations.cpp, and tstStateSet.cpp.
Referenced by Concentrations::accumulate_concs(), Origen::printConcentrations_csv(), Concentrations::scale(), Concentrations::set_units(), TEST(), timing_ref(), timing_ref_at(), and StateSetIO_bof::write().
Vec_Dbl::value_type const * vals_array | ( | ) | const |
return view of vals vector
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Referenced by StateSetIO_s62b::write().
size_t vals_size | ( | ) | const |
return size of vals vector
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Referenced by Concentrations::accumulate_concs(), and Concentrations::approx_eq().
bool has_vals | ( | ) | const |
return whether the class has a non-null vals
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void set_vals | ( | const Vec_Dbl & | vals | ) |
set the vals (copy operation)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void get_vals | ( | Vec_Dbl & | vals | ) | const |
populate an existing Vec_Dbl with a copy of vals
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
- Examples:
- tstStateSet.cpp.
Referenced by Origen::diffConcentrations(), and TEST().
void manageptr_vals | ( | Vec_Dbl *& | vals | ) |
set the vals (ownership transfer)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void getptr_vals | ( | Vec_Dbl const *& | vals | ) | const |
retrieve pointer (read-only) to vals
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void get_vals_array | ( | size_t | , |
double * | |||
) | const |
get array of vals vector (Fortran)
void set_vals_array | ( | size_t | , |
double * | |||
) |
set vals vector from array (Fortran)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Vec_Dbl::value_type vals_at | ( | size_t | i | ) | const |
get element of vals vector by index
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
- Examples:
- tstConcentrations.cpp, tstState.cpp, and tstStateSet.cpp.
Referenced by TEST(), and Origen::test::TEST().
double lookup_val | ( | int | id, |
double | not_found = BAD_DOUBLE |
||
) | const |
- Examples:
- tstConcentrations.cpp.
References Concentrations::b_nuclide_set, Concentrations::b_vals, and NuclideSet::NOT_FOUND().
Referenced by TEST().
|
static |
- Examples:
- tstConcentrations.cpp.
References Concentrations::b_nuclide_set.
Referenced by Concentrations::approx_eq(), Concentrations::isEqualConcentrations(), State::match(), Concentrations::match(), and TEST().
bool match | ( | const Concentrations & | b | ) | const |
References Concentrations::match().
bool approx_eq | ( | const Concentrations & | b, |
double | tol = 1e-12 |
||
) | const |
bool set_units | ( | ConcentrationUnit | units | ) |
- Examples:
- tstConcentrations.cpp.
References Concentrations::b_units, Concentrations::convert_units(), Concentrations::units(), and Concentrations::vals().
Referenced by Material::get_concs_at(), FakeFactory::newspStateSet_10nuclide(), Origen::printConcentrations_csv(), StateSetIO_s62b::read(), FakeFactory::StateSet_random1(), TEST(), and TEST_P().
ConcentrationUnit units | ( | ) | const |
- Examples:
- tstStateSet.cpp.
References Concentrations::b_units.
Referenced by Concentrations::accumulate_concs(), StateSetIO_s62b::read(), Accessor< Origen::Concentrations >::read(), Concentrations::set_units(), TEST(), TEST_P(), timing_ref(), timing_ref_at(), StateSetIO_bof::write(), and StateSetIO_s62b::write().
bool convert_units | ( | ConcentrationUnit | units, |
Vec_Dbl * | vals | ||
) | const |
References Concentrations::b_volume.
Referenced by Concentrations::accumulate_concs(), Concentrations::approx_eq(), Material::set_concs_at(), and Concentrations::set_units().
bool convert_units | ( | ConcentrationUnit | units, |
double | volume, | ||
Vec_Dbl * | vals | ||
) | const |
References Concentrations::b_nuclide_set, Concentrations::b_units, Concentrations::b_volume, Origen::BAD_DOUBLE, ConcentrationConverter::convert_to(), Concentrations::r_decay_resource, Concentrations::r_nuclide_resource, ConcentrationConverter::set_decay_resource(), and ConcentrationConverter::set_nuclide_resource().
void set_volume | ( | double | scalar | ) |
set the scalar volume
Auto-generated from macro \ #ORIGEN_ACCESSORS_SCALAR().
- Examples:
- tstConcentrations.cpp, and tstState.cpp.
Referenced by Material::get_concs_at(), Concentrations::set_concs(), and TEST().
double volume | ( | ) | const |
return the scalar volume
Auto-generated from macro \ #ORIGEN_ACCESSORS_SCALAR().
- Examples:
- tstState.cpp.
Referenced by Concentrations::accumulate_concs(), Origen::printConcentrations_csv(), TEST(), and StateSetIO_bof::write().
void get_volume | ( | double & | ) | const |
void scale | ( | double | wt | ) |
References Concentrations::b_vals, Concentrations::b_volume, and Concentrations::vals().
Referenced by Concentrations::normalize().
double sum | ( | ) | const |
- Examples:
- tstConcentrations.cpp.
References Concentrations::b_vals.
Referenced by Concentrations::normalize(), and TEST().
double sum_hm | ( | int | min_z = 90 , |
double * | total_hm = nullptr |
||
) | const |
- Examples:
- tstConcentrations.cpp.
References Concentrations::b_nuclide_set, and Concentrations::b_vals.
Referenced by Concentrations::normalize_hm(), and TEST().
void normalize | ( | double | target_total = 1.0 | ) |
- Examples:
- tstConcentrations.cpp.
References Concentrations::b_volume, Concentrations::scale(), and Concentrations::sum().
Referenced by Concentrations::normalize_hm(), and TEST().
void normalize_hm | ( | double | target_hm_total = 1.0 , |
int | min_z = 90 |
||
) |
- Examples:
- tstConcentrations.cpp.
References Concentrations::normalize(), and Concentrations::sum_hm().
Referenced by TEST().
void accumulate | ( | const Vec_Dbl & | vals, |
double | wt = 1.0 |
||
) |
References Concentrations::b_vals, Concentrations::set_vals(), and Concentrations::total_nuclides().
void accumulate | ( | size_t | n, |
const double * | vals, | ||
double | wt = 1.0 |
||
) |
References Concentrations::b_vals.
- Examples:
- tstConcentrations.cpp.
Referenced by Concentrations::accumulate_concs(), Concentrations::set_concs(), and TEST().
bool accumulate_concs | ( | size_t | , |
const int * | , | ||
const double * | , | ||
double | wt = 1.0 |
||
) |
bool accumulate_concs | ( | const Concentrations & | concs, |
double | wt = 1.0 |
||
) |
- Examples:
- tstConcentrations.cpp.
References Concentrations::accumulate_concs(), Concentrations::b_volume, Concentrations::set_vals(), and Concentrations::set_volume().
bool set_concs | ( | size_t | , |
const int * | , | ||
const double * | , | ||
double | wt = 1.0 |
||
) |
bool set_concs | ( | const Concentrations & | concs, |
double | wt = 1.0 |
||
) |
SCP_NuclideResource nuclide_resource | ( | ) | const |
return shared (read-only) nuclide_resource resource \
Auto-generated from macro \ #ORIGEN_ACCESSORS_SCP_RESOURCE().
bool has_nuclide_resource | ( | ) | const |
whether this instantiation of class has the nuclide_resource resource \
Auto-generated from macro #ORIGEN_ACCESSORS_SCP_RESOURCE().
void set_nuclide_resource | ( | SCP_NuclideResource | nuclide_resource | ) |
set a new shared (read-only) nuclide_resource resource (non-const version) \
Auto-generated from macro #ORIGEN_ACCESSORS_SCP_RESOURCE().
- Examples:
- tstConcentrations.cpp.
Referenced by TEST().
SCP_DecayResource decay_resource | ( | ) | const |
return shared (read-only) decay_resource resource \
Auto-generated from macro \ #ORIGEN_ACCESSORS_SCP_RESOURCE().
bool has_decay_resource | ( | ) | const |
whether this instantiation of class has the decay_resource resource \
Auto-generated from macro #ORIGEN_ACCESSORS_SCP_RESOURCE().
void set_decay_resource | ( | SCP_DecayResource | decay_resource | ) |
set a new shared (read-only) decay_resource resource (non-const version) \
Auto-generated from macro #ORIGEN_ACCESSORS_SCP_RESOURCE().
Referenced by Origen::printConcentrations_csv().
|
virtual |
- Examples:
- tstConcentrations.cpp.
References Concentrations::b_nuclide_set, Concentrations::b_units, Concentrations::b_volume, Concentrations::getSerializedSize(), and Origen::write().
Referenced by TEST().
|
virtual |
|
virtual |
References Concentrations::b_nuclide_set, Concentrations::b_units, and Concentrations::b_volume.
Referenced by Concentrations::deserialize(), and Concentrations::serialize().
|
virtual |
References Concentrations::Concentrations().
|
virtual |
References Concentrations::uid.
|
virtual |
References Concentrations::to_string().
|
protected |
References Concentrations::b_units, Concentrations::b_vals, Concentrations::b_volume, and Concentrations::match().
Referenced by Concentrations::isEqual().
|
protectedvirtual |
References Concentrations::isEqualConcentrations().
|
protected |
References Concentrations::b_nuclide_set, and Concentrations::b_volume.
Referenced by Concentrations::deserialize(), and Concentrations::set_vals().
|
protected |
Referenced by Concentrations::deserialize().
Friends And Related Function Documentation
|
friend |
|
friend |
|
friend |
Member Data Documentation
|
static |
Referenced by Concentrations::getUID().
|
protected |
|
protected |
Referenced by Concentrations::canonicalize_vals(), Concentrations::convert_units(), Concentrations::deserialize(), Concentrations::getSerializedSize(), Concentrations::lookup_val(), Concentrations::match(), Accessor< Origen::Concentrations >::read(), Concentrations::serialize(), Concentrations::set_vals(), Concentrations::sum_hm(), Concentrations::to_json(), and Concentrations::total_nuclides().
|
protected |
|
protected |
Referenced by Concentrations::accumulate_concs(), Concentrations::canonicalize_vals(), Concentrations::convert_units(), Concentrations::deserialize(), Concentrations::getSerializedSize(), Concentrations::isEqualConcentrations(), Concentrations::normalize(), Concentrations::scale(), Concentrations::serialize(), Concentrations::set_concs(), and Concentrations::to_json().
|
protected |
Referenced by Concentrations::convert_units().
|
protected |
Referenced by Concentrations::convert_units().
The documentation for this class was generated from the following files:
- Core/dc/Concentrations.h
- Core/dc/Concentrations.cpp