Skip to content

Commit

Permalink
Remove unnecessary comments, add minor tweaks
Browse files Browse the repository at this point in the history
Nothing crazy going on, adding and removing some comments and changing
some variable names to improve clarity and readability of the code.
  • Loading branch information
maxschalz committed Mar 9, 2021
1 parent 2b69deb commit 21cb43e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions src/enrichment_calculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ class EnrichmentCalculator {
EnrichmentCalculator(cyclus::Composition::Ptr feed_comp,
double target_product_assay,
double target_tails_assay, double gamma,
double feed_qty=1e299, double product_qty=1e299,
double max_swu=1e299, bool use_downblending=true);
// TODO in the above constructor it might not make sense to keep the
// default arguments for feed_qty and for product_qty. This will be
// determined in later steps of the implementation.
double feed_qty, double product_qty,
double max_swu, bool use_downblending=true);
EnrichmentCalculator(const EnrichmentCalculator& e);
EnrichmentCalculator& operator= (const EnrichmentCalculator& e);

Expand Down Expand Up @@ -65,7 +62,6 @@ class EnrichmentCalculator {
double swu = 0; // Separative work that has been performed
// in kg SWU timestep^-1

// TODO declare vector as const?
const std::vector<int> isotopes;
std::map<int,double> separation_factors;
std::map<int,double> alpha_star;
Expand Down
8 changes: 2 additions & 6 deletions src/miso_enrich.cc
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ bool MIsoEnrich::ValidReq_(const cyclus::Material::Ptr& req_mat) {
double u_235 = MIsoAtomAssay(req_mat);
double u_238 = MIsoAtomFrac(req_mat, IsotopeToNucID(238));

// bool u_238_present = u_238 > 0 && !cyclus::AlmostEq(u_238, 0);
bool u_238_present = u_238 > 0;
bool not_depleted = u_235 > tails_assay;
bool possible_enrichment = u_235 < max_enrich;
Expand All @@ -312,9 +311,6 @@ bool SortBids(cyclus::Bid<cyclus::Material>* i,
cyclus::Material::Ptr mat_i = i->offer();
cyclus::Material::Ptr mat_j = j->offer();

// TODO cycamore uses mass(U235) compared to total mass. This would also
// include possible non-U elements that are sent directly to tails.
// Because of this, they should not be considered here IMO.
return MIsoAtomAssay(mat_i) <= MIsoAtomAssay(mat_j);
}

Expand Down Expand Up @@ -442,7 +438,7 @@ void MIsoEnrich::AddMat_(cyclus::Material::Ptr mat) {

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cyclus::Material::Ptr MIsoEnrich::Enrich_(
cyclus::Material::Ptr mat, double qty) {
cyclus::Material::Ptr mat, double request_qty) {

cyclus::Composition::Ptr product_comp;
cyclus::Composition::Ptr tails_comp;
Expand All @@ -456,7 +452,7 @@ cyclus::Material::Ptr MIsoEnrich::Enrich_(
// In the following line, the enrichment is calculated but it is not yet
// performed!
EnrichmentCalculator e(feed_inv_comp[feed_idx], product_assay,
tails_assay, gamma_235, feed_qty, qty,
tails_assay, gamma_235, feed_qty, request_qty,
swu_capacity, use_downblending);
e.EnrichmentOutput(product_comp, tails_comp, feed_required,
swu_required, product_qty, tails_qty,
Expand Down

0 comments on commit 21cb43e

Please sign in to comment.