tstConcentrationConverter.cpp
./Core/dc/tests/tstConcentrationConverter.cpp
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include "Nemesis/gtest/nemesis_gtest.hh"
#include "Origen/Core/config.h"
#include "Origen/Core/dc/ConcentrationConverter.h"
#include "Origen/Core/dc/FakeFactory.h"
using std::vector;
using std::pair;
using namespace Origen;
{
int id = 6012;
// simple mass
// simple moles
// with volume
EXPECT_FLOAT_EQ( 10.2 * 23.,
EXPECT_FLOAT_EQ( 6. * 12. / 2.,
// change id
id = 5010;
// number density and density
EXPECT_FLOAT_EQ( 0.6022141,
}
TEST( ConcentrationConverter, DecayUnits )
{
// get the resource and set it on the converter
FakeFactory::DecayResource_scale( *dr );
int id = 93237;
ASSERT_TRUE( dr->is_present( id ) );
// check that we can't convert without the decay resource
cv.set_decay_resource( dr );
// now we can
// reference values
double c = 0.16674607;
double b = 6.1696046e+09;
double w = 0.0048875394;
double g = 3.1754833e-05;
double m = 3.0505611e+10;
double v = 1.9819800e+08;
double a = 5.0073898e+12;
double h = 992536.12;
// check the values from the forward
// now reverse
}