Commit 668363c6 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Adding get methods for F71Case class.

parent 90480293
Pipeline #12719 failed with stages
in 6 minutes and 31 seconds
......@@ -92,126 +92,246 @@ F71Case::F71Case(const F71Case& orig)
p->flux = orig.p->flux;
}
const std::vector<int>& F71Case::lightElementNuclides() const
{
return p->light_element_nuclides;
}
void F71Case::setLightElementNuclides(const std::vector<int>& zaids)
{
p->light_element_nuclides = zaids;
}
const std::vector<int>& F71Case::actinideNuclides() const
{
return p->actinide_nuclides;
}
void F71Case::setActinideNuclides(const std::vector<int>& zaids)
{
p->actinide_nuclides = zaids;
}
const std::vector<int>& F71Case::fissionProductNuclides() const
{
return p->fission_product_nuclides;
}
void F71Case::setFissionProductNuclides(const std::vector<int>& zaids)
{
p->fission_product_nuclides = zaids;
}
const std::vector<float>& F71Case::lightElementNuclideAbundances() const
{
return p->light_element_nuclide_abundances;
}
void F71Case::setLightElementNuclideAbundances(const std::vector<float>& abs)
{
p->light_element_nuclide_abundances = abs;
}
const std::vector<float>& F71Case::actinideNuclideAbundances() const
{
return p->actinide_nuclide_abundances;
}
void F71Case::setActinideNuclideAbundances(const std::vector<float>& abs)
{
p->actinide_nuclide_abundances = abs;
}
const std::vector<float>& F71Case::fissionProductNuclideAbundances() const
{
return p->fission_product_nuclide_abundances;
}
void F71Case::setFissionProductNuclideAbundances(const std::vector<float>& abs)
{
p->fission_product_nuclide_abundances = abs;
}
std::string F71Case::title() const { return p->title; }
void F71Case::setTitle(const std::string& title) { p->title = title; }
std::string F71Case::basis() const { return p->basis; }
void F71Case::setBasis(const std::string& basis) { p->basis = basis; }
const std::vector<float>& F71Case::lightElementGammaEnergyBounds() const
{
return p->light_element_gamma_energy_bounds;
}
void F71Case::setLightElementGammaEnergyBounds(const std::vector<float>& bounds)
{
p->light_element_gamma_energy_bounds = bounds;
}
const std::vector<float>& F71Case::actinideGammaEnergyBounds() const
{
return p->actinide_gamma_energy_bounds;
}
void F71Case::setActinideGammaEnergyBounds(const std::vector<float>& bounds)
{
p->actinide_gamma_energy_bounds = bounds;
}
const std::vector<float>& F71Case::fissionProductGammaEnergyBounds() const
{
return p->fission_product_gamma_energy_bounds;
}
void F71Case::setFissionProductGammaEnergyBounds(
const std::vector<float>& bounds)
{
p->fission_product_gamma_energy_bounds = bounds;
}
const std::vector<float>& F71Case::lightElementSpectrum() const
{
return p->light_element_spectrum;
}
void F71Case::setLightElementSpectrum(const std::vector<float>& spectrum)
{
p->light_element_spectrum = spectrum;
}
const std::vector<float>& F71Case::actinitdeSpectrum() const
{
return p->actinide_spectrum;
}
void F71Case::setActinideSpectrum(const std::vector<float>& spectrum)
{
p->actinide_spectrum = spectrum;
}
const std::vector<float>& F71Case::fissionProductSpectrum() const
{
return p->fission_product_spectrum;
}
void F71Case::setFissionProductSpectrum(const std::vector<float>& spectrum)
{
p->fission_product_spectrum = spectrum;
}
const std::vector<float>& F71Case::gammaEnergyBounds() const
{
return p->gamma_energy_bounds;
}
void F71Case::setGammaEnergyBounds(const std::vector<float>& bounds)
{
p->gamma_energy_bounds = bounds;
}
const std::vector<float>& F71Case::photonPerSSpectrum() const
{
return p->photon_per_second_spectrum;
}
void F71Case::setPhotonPerSSpectrum(const std::vector<float>& spectrum)
{
p->photon_per_second_spectrum = spectrum;
}
const std::vector<float>& F71Case::mevPerSSpectrum() const
{
return p->mev_per_second_spectrum;
}
void F71Case::setMevPerSSpectrum(const std::vector<float>& spectrum)
{
p->mev_per_second_spectrum = spectrum;
}
std::string F71Case::photonSpectrumTitle() const
{
return p->photon_spectrum_title;
}
void F71Case::setPhotonSpectrumTitle(const std::string& title)
{
p->photon_spectrum_title = title;
}
const std::vector<float>& F71Case::spontaneousFissionNeutronSource() const
{
return p->spontaneous_fission_neutron_source;
}
void F71Case::setSpontaneousFissionNeutronSource(
const std::vector<float>& source)
{
p->spontaneous_fission_neutron_source = source;
}
const std::vector<float>& F71Case::actinideAlphaNSource() const
{
return p->actinide_alpha_n_source;
}
void F71Case::setActinideAlphaNSource(const std::vector<float>& source)
{
p->actinide_alpha_n_source = source;
}
const std::vector<float>& F71Case::totalNeutronSpectrum() const
{
return p->total_neutron_spectrum;
}
void F71Case::setTotalNeutronSpectrum(const std::vector<float>& spectrum)
{
p->total_neutron_spectrum = spectrum;
}
const std::vector<float>& F71Case::alphaNSpectrum() const
{
return p->alpha_n_spectrum;
}
void F71Case::setAlphaNSpectrum(const std::vector<float>& spectrum)
{
p->alpha_n_spectrum = spectrum;
}
const std::vector<float>& F71Case::spontaneousFissionSpectrum() const
{
return p->spontaneous_fission_spectrum;
}
void F71Case::setSpontaneousFissionSpectrum(const std::vector<float>& spectrum)
{
p->spontaneous_fission_spectrum = spectrum;
}
const std::vector<float>& F71Case::neutronEnergyBounds() const
{
return p->neutron_energy_bounds;
}
void F71Case::setNeutronEnergyBounds(const std::vector<float>& bounds)
{
p->neutron_energy_bounds = bounds;
}
double F71Case::time() const { return p->time; }
void F71Case::setTime(double seconds) { p->time = seconds; }
float F71Case::power() const { return p->power; }
void F71Case::setPower(float power) { p->power = power; }
float F71Case::flux() const { return p->flux; }
void F71Case::setFlux(float flux) { p->flux = flux; }
} // namespace radix
......@@ -83,37 +83,85 @@ class RADIX_PUBLIC F71Case
F71Case();
F71Case(const F71Case& orig);
const std::vector<int>& lightElementNuclides() const;
void setLightElementNuclides(const std::vector<int>& zaids);
const std::vector<int>& actinideNuclides() const;
void setActinideNuclides(const std::vector<int>& zaids);
const std::vector<int>& fissionProductNuclides() const;
void setFissionProductNuclides(const std::vector<int>& zaids);
const std::vector<float>& lightElementNuclideAbundances() const;
void setLightElementNuclideAbundances(const std::vector<float>& abs);
const std::vector<float>& actinideNuclideAbundances() const;
void setActinideNuclideAbundances(const std::vector<float>& abs);
const std::vector<float>& fissionProductNuclideAbundances() const;
void setFissionProductNuclideAbundances(const std::vector<float>& abs);
std::string title() const;
void setTitle(const std::string& title);
std::string basis() const;
void setBasis(const std::string& basis);
const std::vector<float>& lightElementGammaEnergyBounds() const;
void setLightElementGammaEnergyBounds(const std::vector<float>& bounds);
const std::vector<float>& actinideGammaEnergyBounds() const;
void setActinideGammaEnergyBounds(const std::vector<float>& bounds);
const std::vector<float>& fissionProductGammaEnergyBounds() const;
void setFissionProductGammaEnergyBounds(const std::vector<float>& bounds);
const std::vector<float>& lightElementSpectrum() const;
void setLightElementSpectrum(const std::vector<float>& spectrum);
const std::vector<float>& actinitdeSpectrum() const;
void setActinideSpectrum(const std::vector<float>& spectrum);
const std::vector<float>& fissionProductSpectrum() const;
void setFissionProductSpectrum(const std::vector<float>& spectrum);
const std::vector<float>& gammaEnergyBounds() const;
void setGammaEnergyBounds(const std::vector<float>& bounds);
const std::vector<float>& photonPerSSpectrum() const;
void setPhotonPerSSpectrum(const std::vector<float>& spectrum);
const std::vector<float>& mevPerSSpectrum() const;
void setMevPerSSpectrum(const std::vector<float>& spectrum);
std::string photonSpectrumTitle() const;
void setPhotonSpectrumTitle(const std::string& title);
const std::vector<float>& spontaneousFissionNeutronSource() const;
void setSpontaneousFissionNeutronSource(const std::vector<float>& source);
const std::vector<float>& actinideAlphaNSource() const;
void setActinideAlphaNSource(const std::vector<float>& source);
const std::vector<float>& totalNeutronSpectrum() const;
void setTotalNeutronSpectrum(const std::vector<float>& spectrum);
const std::vector<float>& alphaNSpectrum() const;
void setAlphaNSpectrum(const std::vector<float>& spectrum);
const std::vector<float>& spontaneousFissionSpectrum() const;
void setSpontaneousFissionSpectrum(const std::vector<float>& spectrum);
const std::vector<float>& neutronEnergyBounds() const;
void setNeutronEnergyBounds(const std::vector<float>& bounds);
double time() const;
void setTime(double seconds);
float power() const;
void setPower(float power);
float flux() const;
void setFlux(float flux);
}; // F71Case
} // namespace radix
......
......@@ -5,11 +5,9 @@
#include <fstream>
using namespace radix;
TEST(Radixio, DISABLED_F71Stream)
TEST(Radixio, F71Stream)
{
F71Stream stream(
std::string("/home/jap/projects/build/daem/Debug/daemmodel/tests/"
"delfic.Site001.f71"));
F71Stream stream(std::string(dirname(__FILE__) + "/data/test.s61.f71"));
std::vector<F71Case> cases;
bool result = true;
while (result)
......@@ -18,5 +16,12 @@ TEST(Radixio, DISABLED_F71Stream)
result = stream.read_case(single_case);
if (result) cases.emplace_back(single_case);
}
EXPECT_TRUE(cases.size() == 1);
F71Case& first = cases[0];
EXPECT_EQ("fi,92235,1.0;", first.title());
EXPECT_EQ("FW: 1.21 | FracModel: Tompkins", first.basis());
EXPECT_EQ(3600., first.time());
EXPECT_EQ(0.f, first.power()); // this is a forensics output (no power)
EXPECT_EQ(0.f, first.flux()); // this is a forensics output (no flux)
std::cout << "Read " << cases.size() << " f71 cases." << std::endl;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment