mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
removed MGXS C interface methods (calculate_xs_c, get_name_c, and get_awr_c) that are no longer necessary now that the code is full C++
This commit is contained in:
parent
6e262af6c5
commit
524b5344eb
3 changed files with 8 additions and 59 deletions
|
|
@ -82,10 +82,6 @@ void mark_fissionable_mgxs_materials();
|
|||
// Mgxs tracking/transport/tallying interface methods
|
||||
//==============================================================================
|
||||
|
||||
extern "C" void
|
||||
calculate_xs_c(int i_mat, int gin, double sqrtkT, Direction u,
|
||||
double& total_xs, double& abs_xs, double& nu_fiss_xs);
|
||||
|
||||
double
|
||||
get_nuclide_xs(int index, int xstype, int gin, const int* gout,
|
||||
const double* mu, const int* dg);
|
||||
|
|
@ -102,15 +98,5 @@ inline double
|
|||
get_macro_xs(int index, int xstype, int gin)
|
||||
{return get_macro_xs(index, xstype, gin, nullptr, nullptr, nullptr);}
|
||||
|
||||
//==============================================================================
|
||||
// General Mgxs methods
|
||||
//==============================================================================
|
||||
|
||||
extern "C" void
|
||||
get_name_c(int index, int name_len, char* name);
|
||||
|
||||
extern "C" double
|
||||
get_awr_c(int index);
|
||||
|
||||
} // namespace openmc
|
||||
#endif // OPENMC_MGXS_INTERFACE_H
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ MgxsInterface::MgxsInterface(const std::string& path_cross_sections,
|
|||
void MgxsInterface::set_nuclides_and_temperatures(
|
||||
std::vector<std::string> xs_to_read,
|
||||
std::vector<std::vector<double>> xs_temps)
|
||||
{
|
||||
{
|
||||
// Check to remove all duplicates
|
||||
xs_to_read_ = xs_to_read;
|
||||
xs_temps_to_read_ = xs_temps;
|
||||
|
|
@ -291,16 +291,6 @@ void mark_fissionable_mgxs_materials()
|
|||
// Mgxs tracking/transport/tallying interface methods
|
||||
//==============================================================================
|
||||
|
||||
void
|
||||
calculate_xs_c(int i_mat, int gin, double sqrtkT, Direction u,
|
||||
double& total_xs, double& abs_xs, double& nu_fiss_xs)
|
||||
{
|
||||
data::mg.macro_xs_[i_mat].calculate_xs(gin - 1, sqrtkT, u, total_xs, abs_xs,
|
||||
nu_fiss_xs);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
double
|
||||
get_nuclide_xs(int index, int xstype, int gin, const int* gout,
|
||||
const double* mu, const int* dg)
|
||||
|
|
@ -333,31 +323,4 @@ get_macro_xs(int index, int xstype, int gin, const int* gout,
|
|||
return data::mg.macro_xs_[index].get_xs(xstype, gin - 1, gout_c_p, mu, dg);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// General Mgxs methods
|
||||
//==============================================================================
|
||||
|
||||
void
|
||||
get_name_c(int index, int name_len, char* name)
|
||||
{
|
||||
// First blank out our input string
|
||||
std::string str(name_len - 1, ' ');
|
||||
std::strcpy(name, str.c_str());
|
||||
|
||||
// Now get the data and copy to the C-string
|
||||
str = data::mg.nuclides_[index - 1].name;
|
||||
std::strcpy(name, str.c_str());
|
||||
|
||||
// Finally, remove the null terminator
|
||||
name[std::strlen(name)] = ' ';
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
double
|
||||
get_awr_c(int index)
|
||||
{
|
||||
return data::mg.nuclides_[index - 1].awr;
|
||||
}
|
||||
|
||||
} // namespace openmc
|
||||
|
|
|
|||
|
|
@ -203,11 +203,11 @@ Particle::transport()
|
|||
}
|
||||
} else {
|
||||
// Get the MG data
|
||||
calculate_xs_c(material_, g_, sqrtkT_, this->u_local(),
|
||||
macro_xs_.total, macro_xs_.absorption, macro_xs_.nu_fission);
|
||||
data::mg.macro_xs_[material_].calculate_xs(g_ - 1, sqrtkT_,
|
||||
this->u_local(), macro_xs_.total, macro_xs_.absorption,
|
||||
macro_xs_.nu_fission);
|
||||
|
||||
// Finally, update the particle group while we have already checked
|
||||
// for if multi-group
|
||||
// Finally, update the particle group since we know we are multi-group
|
||||
g_last_ = g_;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -428,7 +428,7 @@ Particle::cross_surface()
|
|||
}
|
||||
return;
|
||||
|
||||
} else if ((surf->bc_ == BC_REFLECT || surf->bc_ == BC_WHITE)
|
||||
} else if ((surf->bc_ == BC_REFLECT || surf->bc_ == BC_WHITE)
|
||||
&& (settings::run_mode != RUN_MODE_PLOTTING)) {
|
||||
// =======================================================================
|
||||
// PARTICLE REFLECTS FROM SURFACE
|
||||
|
|
@ -458,11 +458,11 @@ Particle::cross_surface()
|
|||
score_surface_tally(this, model::active_meshsurf_tallies);
|
||||
this->r() = r;
|
||||
}
|
||||
|
||||
|
||||
Direction u = (surf->bc_ == BC_REFLECT) ?
|
||||
surf->reflect(this->r(), this->u()) :
|
||||
surf->diffuse_reflect(this->r(), this->u());
|
||||
|
||||
|
||||
// Make sure new particle direction is normalized
|
||||
this->u() = u / u.norm();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue