updating member variable name.

This commit is contained in:
pshriwise 2018-09-21 20:38:21 -04:00
parent 7b18e7c791
commit f9d287eb89
5 changed files with 19 additions and 19 deletions

View file

@ -171,7 +171,7 @@ protected:
class DAGCell : public Cell
{
public:
moab::DagMC *dagmc_ptr;
moab::DagMC *dagmc_ptr_;
explicit DAGCell();
std::pair<double, int32_t> distance(Position p, Direction u, int32_t on_surface) const;

View file

@ -139,7 +139,7 @@ class CSGSurface : public Surface
class DAGSurface : public Surface
{
public:
moab::DagMC* dagmc_ptr;
moab::DagMC* dagmc_ptr_;
explicit DAGSurface();
double evaluate(Position p) const;
double distance(Position p, Direction u,

View file

@ -599,14 +599,14 @@ DAGCell::DAGCell() : Cell{} {};
std::pair<double, int32_t> DAGCell::distance(Position p, Direction u, int32_t on_surface) const {
moab::ErrorCode rval;
moab::EntityHandle vol = dagmc_ptr->entity_by_id(3, id_);
moab::EntityHandle vol = dagmc_ptr_->entity_by_id(3, id_);
moab::EntityHandle hit_surf;
double dist;
rval = dagmc_ptr->ray_fire(vol, p.xyz, u.xyz, hit_surf, dist);
rval = dagmc_ptr_->ray_fire(vol, p.xyz, u.xyz, hit_surf, dist);
MB_CHK_ERR_CONT(rval);
int surf_idx;
if(hit_surf != 0) {
surf_idx = dagmc_ptr->index_by_handle(hit_surf);
surf_idx = dagmc_ptr_->index_by_handle(hit_surf);
}
// indicate that particle is lost
else {
@ -620,10 +620,10 @@ std::pair<double, int32_t> DAGCell::distance(Position p, Direction u, int32_t on
bool DAGCell::contains(Position p, Direction u, int32_t on_surface) const {
moab::ErrorCode rval;
moab::EntityHandle vol = dagmc_ptr->entity_by_id(3, id_);
moab::EntityHandle vol = dagmc_ptr_->entity_by_id(3, id_);
int result = 0;
rval = dagmc_ptr->point_in_volume(vol, p.xyz, result, u.xyz);
rval = dagmc_ptr_->point_in_volume(vol, p.xyz, result, u.xyz);
MB_CHK_ERR_CONT(rval);
return bool(result);
}
@ -774,13 +774,13 @@ extern "C" {
#ifdef DAGMC
int32_t next_cell(DAGCell* cur_cell, DAGSurface *surf_xed ) {
moab::EntityHandle surf = surf_xed->dagmc_ptr->entity_by_id(2,surf_xed->id_);
moab::EntityHandle vol = cur_cell->dagmc_ptr->entity_by_id(3,cur_cell->id_);
moab::EntityHandle surf = surf_xed->dagmc_ptr_->entity_by_id(2,surf_xed->id_);
moab::EntityHandle vol = cur_cell->dagmc_ptr_->entity_by_id(3,cur_cell->id_);
moab::EntityHandle new_vol;
cur_cell->dagmc_ptr->next_vol(surf, vol, new_vol);
cur_cell->dagmc_ptr_->next_vol(surf, vol, new_vol);
return cur_cell->dagmc_ptr->index_by_handle(new_vol);
return cur_cell->dagmc_ptr_->index_by_handle(new_vol);
}
#endif

View file

@ -41,7 +41,7 @@ void load_dagmc_geometry_c()
// set cell ids using global IDs
openmc::DAGCell* c = new openmc::DAGCell();
c->id_ = DAG->id_by_index(3, i+1);
c->dagmc_ptr = DAG;
c->dagmc_ptr_ = DAG;
c->universe_ = dagmc_univ_id; // set to zero for now
c->fill_ = openmc::C_NONE; // no fill, single universe
@ -95,7 +95,7 @@ void load_dagmc_geometry_c()
// set cell ids using global IDs
openmc::DAGSurface* s = new openmc::DAGSurface();
s->id_ = DAG->id_by_index(2, i+1);
s->dagmc_ptr = DAG;
s->dagmc_ptr_ = DAG;
if(DAG->has_prop(surf_handle, "boundary")) {
std::string bc_value;

View file

@ -257,10 +257,10 @@ double DAGSurface::evaluate(Position r) const
double DAGSurface::distance(Position p, Direction u, bool coincident) const {
moab::ErrorCode rval;
moab::EntityHandle surf = dagmc_ptr->entity_by_id(2, id_);
moab::EntityHandle surf = dagmc_ptr_->entity_by_id(2, id_);
moab::EntityHandle hit_surf;
double dist;
rval = dagmc_ptr->ray_fire(surf, p.xyz, u.xyz, hit_surf, dist, NULL, 0, 0);
rval = dagmc_ptr_->ray_fire(surf, p.xyz, u.xyz, hit_surf, dist, NULL, 0, 0);
MB_CHK_ERR_CONT(rval);
if (dist < 0.0) dist = INFTY;
return dist;
@ -269,17 +269,17 @@ double DAGSurface::distance(Position p, Direction u, bool coincident) const {
Direction DAGSurface::normal(Position p) const {
moab::ErrorCode rval;
Direction u;
moab::EntityHandle surf = dagmc_ptr->entity_by_id(2, id_);
rval = dagmc_ptr->get_angle(surf, p.xyz, u.xyz);
moab::EntityHandle surf = dagmc_ptr_->entity_by_id(2, id_);
rval = dagmc_ptr_->get_angle(surf, p.xyz, u.xyz);
MB_CHK_ERR_CONT(rval);
return u;
}
BoundingBox DAGSurface::bounding_box() const {
moab::ErrorCode rval;
moab::EntityHandle surf = dagmc_ptr->entity_by_id(2, id_);
moab::EntityHandle surf = dagmc_ptr_->entity_by_id(2, id_);
double min[3], max[3];
rval = dagmc_ptr->getobb(surf, min, max);
rval = dagmc_ptr_->getobb(surf, min, max);
MB_CHK_ERR_CONT(rval);
return BoundingBox(min[0], max[0], min[1], max[1], min[2], max[2]);
}