mirror of
https://github.com/cosmo-sims/MUSIC.git
synced 2024-09-19 17:03:46 +02:00
removed some commented out code
This commit is contained in:
parent
a616b2ebf6
commit
41459bd425
3 changed files with 0 additions and 18 deletions
|
@ -206,7 +206,6 @@ void fft_interpolate(m1 &V, m2 &v, int margin, bool from_basegrid = false)
|
||||||
double kz = (k <= (int)nzc / 2) ? (double)k : (double)(k - (int)nzc);
|
double kz = (k <= (int)nzc / 2) ? (double)k : (double)(k - (int)nzc);
|
||||||
|
|
||||||
double phase = -0.5 * M_PI * (kx / nxc + ky / nyc + kz / nzc);
|
double phase = -0.5 * M_PI * (kx / nxc + ky / nyc + kz / nzc);
|
||||||
// double phase = -0.5 * M_PI * (kx / nxc + ky / nyc + kz / nzc);
|
|
||||||
|
|
||||||
std::complex<double> val_phas(cos(phase), sin(phase));
|
std::complex<double> val_phas(cos(phase), sin(phase));
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,12 @@ inline double Meyer_scaling_function( double k, double kmax )
|
||||||
constexpr double fourpithirds{4.0*M_PI/3.0};
|
constexpr double fourpithirds{4.0*M_PI/3.0};
|
||||||
auto nu = []( double x ){ return x<0.0?0.0:(x<1.0?x:1.0); };
|
auto nu = []( double x ){ return x<0.0?0.0:(x<1.0?x:1.0); };
|
||||||
|
|
||||||
// k = std::abs(k)/kmax * fourpithirds;
|
|
||||||
k = std::abs(k)/kmax * 2 * M_PI;
|
k = std::abs(k)/kmax * 2 * M_PI;
|
||||||
|
|
||||||
if( k < twopithirds ) return 1.0;
|
if( k < twopithirds ) return 1.0;
|
||||||
else if( k< fourpithirds ){
|
else if( k< fourpithirds ){
|
||||||
return std::cos( 0.5*M_PI * nu(3*k/(2*M_PI)-1.0) );
|
return std::cos( 0.5*M_PI * nu(3*k/(2*M_PI)-1.0) );
|
||||||
}
|
}
|
||||||
// if( k < fourpithirds ) return 1.0;
|
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -605,9 +605,6 @@ music_wnoise_generator<T>::music_wnoise_generator(music_wnoise_generator<T> &rc,
|
||||||
{
|
{
|
||||||
int ii(i), jj(j), kk(k);
|
int ii(i), jj(j), kk(k);
|
||||||
|
|
||||||
// if( i==(int)nxc/2 ) continue;
|
|
||||||
// if( j==(int)nyc/2 ) continue;
|
|
||||||
|
|
||||||
if (i > (int)nxc / 2)
|
if (i > (int)nxc / 2)
|
||||||
ii += (int)nx / 2;
|
ii += (int)nx / 2;
|
||||||
if (j > (int)nyc / 2)
|
if (j > (int)nyc / 2)
|
||||||
|
@ -629,18 +626,6 @@ music_wnoise_generator<T>::music_wnoise_generator(music_wnoise_generator<T> &rc,
|
||||||
|
|
||||||
val *= val_phas * sqrt8;
|
val *= val_phas * sqrt8;
|
||||||
|
|
||||||
// // if (x0_ == NULL || lx_ == NULL){
|
|
||||||
// if (i != (int)nxc / 2 && j != (int)nyc / 2 && k != (int)nzc / 2)
|
|
||||||
// {
|
|
||||||
// RE(cfine[qf]) = val.real();
|
|
||||||
// IM(cfine[qf]) = val.imag();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// RE(cfine[qf]) = val.real();
|
|
||||||
// IM(cfine[qf]) = 0.0;
|
|
||||||
// }
|
|
||||||
// // }
|
|
||||||
if(i != (int)nxc / 2 && j != (int)nyc / 2 && k != (int)nzc / 2){
|
if(i != (int)nxc / 2 && j != (int)nyc / 2 && k != (int)nzc / 2){
|
||||||
double blend_coarse_x = Meyer_scaling_function(kx, nxc / 2);
|
double blend_coarse_x = Meyer_scaling_function(kx, nxc / 2);
|
||||||
double blend_coarse_y = Meyer_scaling_function(ky, nyc / 2);
|
double blend_coarse_y = Meyer_scaling_function(ky, nyc / 2);
|
||||||
|
|
Loading…
Reference in a new issue