mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Address #1101 comments
This commit is contained in:
parent
4d84d483ef
commit
15caa0c1ca
5 changed files with 13 additions and 13 deletions
|
|
@ -90,7 +90,7 @@ extern "C" void calc_rn_c(int n, const double uvw[3], double rn[]);
|
|||
//! evaluated at rho and phi.
|
||||
//==============================================================================
|
||||
|
||||
extern "C" void calc_zn_c(int n, double rho, double phi, double zn[]);
|
||||
extern "C" void calc_zn(int n, double rho, double phi, double zn[]);
|
||||
|
||||
//==============================================================================
|
||||
//! Calculate only the even radial components of n-th order modified Zernike
|
||||
|
|
@ -113,7 +113,7 @@ extern "C" void calc_zn_c(int n, double rho, double phi, double zn[]);
|
|||
//! evaluated at rho and phi when m = 0.
|
||||
//==============================================================================
|
||||
|
||||
extern "C" void calc_zn_rad_c(int n, double rho, double zn_rad[]);
|
||||
extern "C" void calc_zn_rad(int n, double rho, double zn_rad[]);
|
||||
|
||||
//==============================================================================
|
||||
//! Rotate the direction cosines through a polar angle whose cosine is mu and
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public:
|
|||
double d_angle = 2.0 / n_angle;
|
||||
bins_.resize(n_angle + 1);
|
||||
for (int i = 0; i < n_angle; i++) bins_[i] = -1 + i * d_angle;
|
||||
bins_[n_angle] = PI;
|
||||
bins_[n_angle] = 1;
|
||||
}
|
||||
|
||||
n_bins_ = bins_.size() - 1;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
if (r <= 1.0) {
|
||||
// Compute and return the Zernike weights.
|
||||
double zn[n_bins_];
|
||||
calc_zn_c(order_, r, theta, zn);
|
||||
calc_zn(order_, r, theta, zn);
|
||||
for (int i = 0; i < n_bins_; i++) {
|
||||
match.bins_.push_back(i+1);
|
||||
match.weights_.push_back(zn[i]);
|
||||
|
|
@ -106,7 +106,7 @@ public:
|
|||
if (r <= 1.0) {
|
||||
// Compute and return the Zernike weights.
|
||||
double zn[n_bins_];
|
||||
calc_zn_rad_c(order_, r, zn);
|
||||
calc_zn_rad(order_, r, zn);
|
||||
for (int i = 0; i < n_bins_; i++) {
|
||||
match.bins_.push_back(i+1);
|
||||
match.weights_.push_back(zn[i]);
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ _dll.evaluate_legendre.argtypes = [c_int, POINTER(c_double), c_double]
|
|||
_dll.calc_rn_c.restype = None
|
||||
_dll.calc_rn_c.argtypes = [c_int, ndpointer(c_double), ndpointer(c_double)]
|
||||
|
||||
_dll.calc_zn_c.restype = None
|
||||
_dll.calc_zn_c.argtypes = [c_int, c_double, c_double, ndpointer(c_double)]
|
||||
_dll.calc_zn.restype = None
|
||||
_dll.calc_zn.argtypes = [c_int, c_double, c_double, ndpointer(c_double)]
|
||||
|
||||
_dll.calc_zn_rad_c.restype = None
|
||||
_dll.calc_zn_rad_c.argtypes = [c_int, c_double, ndpointer(c_double)]
|
||||
_dll.calc_zn_rad.restype = None
|
||||
_dll.calc_zn_rad.argtypes = [c_int, c_double, ndpointer(c_double)]
|
||||
|
||||
_dll.rotate_angle_c.restype = None
|
||||
_dll.rotate_angle_c.argtypes = [ndpointer(c_double), c_double,
|
||||
|
|
@ -153,7 +153,7 @@ def calc_zn(n, rho, phi):
|
|||
|
||||
num_bins = ((n + 1) * (n + 2)) // 2
|
||||
zn = np.zeros(num_bins, dtype=np.float64)
|
||||
_dll.calc_zn_c(n, rho, phi, zn)
|
||||
_dll.calc_zn(n, rho, phi, zn)
|
||||
return zn
|
||||
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ def calc_zn_rad(n, rho):
|
|||
|
||||
num_bins = n // 2 + 1
|
||||
zn_rad = np.zeros(num_bins, dtype=np.float64)
|
||||
_dll.calc_zn_rad_c(n, rho, zn_rad)
|
||||
_dll.calc_zn_rad(n, rho, zn_rad)
|
||||
return zn_rad
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ void calc_rn_c(int n, const double uvw[3], double rn[]){
|
|||
}
|
||||
|
||||
|
||||
void calc_zn_c(int n, double rho, double phi, double zn[]) {
|
||||
void calc_zn(int n, double rho, double phi, double zn[]) {
|
||||
// ===========================================================================
|
||||
// Determine vector of sin(n*phi) and cos(n*phi). This takes advantage of the
|
||||
// following recurrence relations so that only a single sin/cos have to be
|
||||
|
|
@ -587,7 +587,7 @@ void calc_zn_c(int n, double rho, double phi, double zn[]) {
|
|||
|
||||
}
|
||||
|
||||
void calc_zn_rad_c(int n, double rho, double zn_rad[]) {
|
||||
void calc_zn_rad(int n, double rho, double zn_rad[]) {
|
||||
// Calculate R_p0(rho) as Zn_p0(rho)
|
||||
// Set up the array of the coefficients
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue