mirror of
https://github.com/cosmo-sims/MUSIC.git
synced 2024-09-19 17:03:46 +02:00
fixed that sometimes real-space averaging for noise was used instead of k-space.
fixed some other minor issues (mostly compiler warnings)
This commit is contained in:
parent
35046923eb
commit
5b813c5007
5 changed files with 11 additions and 12 deletions
5
Makefile
5
Makefile
|
@ -10,7 +10,7 @@ BOXLIB_HOME = ${HOME}/nyx_tot_sterben/BoxLib
|
|||
##############################################################################
|
||||
### compiler and path settings
|
||||
CC = g++
|
||||
OPT = -Wall -Wno-unknown-pragmas -O0 -g -mtune=native
|
||||
OPT = -Wall -Wno-unknown-pragmas -O3 -g -mtune=native
|
||||
CFLAGS =
|
||||
LFLAGS = -lgsl -lgslcblas
|
||||
CPATHS = -I. -I$(HOME)/local/include -I/opt/local/include -I/usr/local/include
|
||||
|
@ -111,8 +111,7 @@ $(TARGET): $(OBJS)
|
|||
$(CC) $(LPATHS) -o $@ $^ $(LFLAGS)
|
||||
endif
|
||||
|
||||
#%.o: %.cc *.hh Makefile
|
||||
%.o: %.cc *.hh
|
||||
%.o: %.cc *.hh Makefile
|
||||
$(CC) $(CFLAGS) $(CPATHS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
|
|
|
@ -490,7 +490,7 @@ namespace convolution{
|
|||
return eval_split_recurse( tfr, xmid, dx, prevval, nsplit );
|
||||
}
|
||||
|
||||
//#define OLD_KERNEL_SAMPLING
|
||||
#define OLD_KERNEL_SAMPLING
|
||||
|
||||
template< typename real_t >
|
||||
void kernel_real_cached<real_t>::precompute_kernel( transfer_function* ptf, tf_type type, const refinement_hierarchy& refh )
|
||||
|
@ -1095,10 +1095,10 @@ namespace convolution{
|
|||
}
|
||||
}
|
||||
|
||||
LOGUSER("Averaging fine kernel to coarse kernel...");
|
||||
/* LOGUSER("Averaging fine kernel to coarse kernel...");
|
||||
|
||||
//... copy averaged and convolved fine kernel to coarse kernel
|
||||
/*#pragma omp parallel for
|
||||
#pragma omp parallel for
|
||||
for( int ix=0; ix<nx; ix+=2 )
|
||||
for( int iy=0; iy<ny; iy+=2 )
|
||||
for( int iz=0; iz<nz; iz+=2 )
|
||||
|
@ -1130,9 +1130,9 @@ namespace convolution{
|
|||
+rkernel[ACC_RF(ix-i,iy-j+1,iz-k+1)] + rkernel[ACC_RF(ix-i+1,iy-j+1,iz-k+1)]);
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
sprintf(cachefname,"temp_kernel_level%03d.tmp",ilevel);
|
||||
LOGUSER("Storing kernel in temp file \'%s\'.",cachefname);
|
||||
fp = fopen(cachefname,"w+");
|
||||
|
|
|
@ -634,7 +634,7 @@ void GenerateDensityHierarchy( config_file& cf, transfer_function *ptf, tf_type
|
|||
*coarse = coarse_save;
|
||||
coarse->subtract_oct_mean();
|
||||
convolution::perform<real_t>( the_tf_kernel, reinterpret_cast<void*> (coarse->get_data_ptr()), shift );
|
||||
coarse->subtract_mean();
|
||||
//coarse->subtract_mean();
|
||||
//coarse->upload_bnd_add( *delta.get_grid(levelmin+i-1) );
|
||||
|
||||
//... clean up
|
||||
|
@ -684,7 +684,7 @@ void GenerateDensityHierarchy( config_file& cf, transfer_function *ptf, tf_type
|
|||
|
||||
the_tf_kernel->deallocate();
|
||||
|
||||
coarse->subtract_mean();
|
||||
//coarse->subtract_mean();
|
||||
|
||||
//... upload data to coarser grid
|
||||
//coarse->upload_bnd_add( *delta.get_grid(levelmax-1) );
|
||||
|
|
2
mesh.hh
2
mesh.hh
|
@ -655,7 +655,7 @@ public:
|
|||
//! generate a mask
|
||||
if( m_levelmin != levelmax() )
|
||||
{
|
||||
for( int ilevel = levelmax()-1; ilevel >= levelmin(); --ilevel )
|
||||
for( int ilevel = (int)levelmax()-1; ilevel >= (int)levelmin(); --ilevel )
|
||||
{
|
||||
double xq[3], dx = 1.0/(1ul<<ilevel); //1.0/(1ul<<(levelmax()-1));
|
||||
|
||||
|
|
|
@ -1610,7 +1610,7 @@ void random_number_generator<rng,T>::compute_random_numbers( void )
|
|||
if( ilevel >= levelmax_ )
|
||||
randc[ilevel] = new rng( *randc[ilevel+1], kavg );
|
||||
else
|
||||
randc[ilevel] = new rng( *randc[ilevel+1], false );
|
||||
randc[ilevel] = new rng( *randc[ilevel+1], kavg );
|
||||
|
||||
if( ilevel+1 > levelmax_ )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue