P.S. For clarity, since that link will point to other code if I push
anything, the code I'm talking about is below, and line 29 is
"mat_table_=MDB->table(mat_);"
// STCThermalTests.cpp
#include <deque>
#include <map>
#include <gtest/gtest.h>
#include "STCThermalTests.h"
#include "ThermalModelTests.h"
#include "CycException.h"
#include "Material.h"
#include "MaterialDB.h"
#include "XMLQueryEngine.h"
using namespace std;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
void STCThermalTest::SetUp(){
// set up geometry. this usually happens in the component init
r_four_ = 4;
r_five_ = 5;
point_t origin_ = {0,0,0};
len_five_ = 5;
geom_ = GeometryPtr(new Geometry(r_four_, r_five_, origin_, len_five_));
// other vars
k_th_ = .1; // ___ @TODO worry about units
spacing_ = .1; // ___ @TODO worry about units
alpha_th_ = .1; // ___ @TODO worry about units
time_ = 0;
mat_ = "clay";
mat_table_=MDB->table(mat_);
// composition set up
u235_=92235;
u_=92;
one_mol_=1.0;
test_comp_= CompMapPtr(new CompMap(MASS));
(*test_comp_)[u235_] = one_mol_;
test_size_=10.0;
// material creation
Cs135_ = 55135;
Cs137_ = 55137;
hot_comp_ = CompMapPtr(new CompMap(MASS));
(*hot_comp_)[Cs135_] = 1000;
(*hot_comp_)[Cs137_] = 1000;
cold_comp_ = CompMapPtr(new CompMap(MASS));
(*cold_comp_)[Cs135_] = 1;
hot_mat_ = mat_rsrc_ptr(new Material(hot_comp_));
cold_mat_ = mat_rsrc_ptr(new Material(cold_comp_));
// test_stc_thermal model setup
stc_ptr_ = STCThermalPtr(initThermalModel()); //initializes stc_ptr_
therm_model_ptr_ = boost::dynamic_pointer_cast<ThermalModel>(stc_ptr_);
stc_ptr_->set_mat_table(mat_table_);
stc_ptr_->set_geom(geom_);
default_stc_ptr_ = STCThermalPtr(STCThermal::create());
default_therm_model_ptr_ =
boost::dynamic_pointer_cast<ThermalModel>(default_stc_ptr_);
default_stc_ptr_->set_mat_table(mat_table_);
.....
--
http://katyhuff.github.com