mirror of
https://github.com/cosmo-sims/monofonIC.git
synced 2024-09-19 17:03:45 +02:00
added convolver and plt as options to cmake
This commit is contained in:
parent
7ead43455c
commit
dc5f87f216
5 changed files with 45 additions and 14 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -54,3 +54,4 @@ src/fastLPT
|
|||
src/input_powerspec.txt
|
||||
src/Makefile
|
||||
.DS_Store
|
||||
include/cmake_config.hh
|
||||
|
|
|
@ -77,6 +77,22 @@ set_property (
|
|||
PROPERTY STRINGS FLOAT DOUBLE LONGDOUBLE
|
||||
)
|
||||
|
||||
########################################################################################################################
|
||||
# convolver type, right now only orszag or naive
|
||||
set (
|
||||
CONVOLVER_TYPE "ORSZAG"
|
||||
CACHE STRING "Convolution algorithm to be used (Naive=no dealiasing, Orszag=dealiased)"
|
||||
)
|
||||
set_property (
|
||||
CACHE CONVOLVER_TYPE
|
||||
PROPERTY STRINGS ORSZAG NAIVE
|
||||
)
|
||||
|
||||
########################################################################################################################
|
||||
# PLT options, right now only on/off
|
||||
option(ENABLE_PLT "Enable PLT (particle linear theory) corrections" OFF)
|
||||
|
||||
|
||||
########################################################################################################################
|
||||
# FFTW
|
||||
if(POLICY CMP0074)
|
||||
|
|
|
@ -266,15 +266,21 @@ int Run( ConfigFile& the_config )
|
|||
//--------------------------------------------------------------------
|
||||
// Create convolution class instance for non-linear terms
|
||||
//--------------------------------------------------------------------
|
||||
#if defined(USE_CONVOLVER_ORSZAG)
|
||||
OrszagConvolver<real_t> Conv({ngrid, ngrid, ngrid}, {boxlen, boxlen, boxlen});
|
||||
// NaiveConvolver<real_t> Conv({ngrid, ngrid, ngrid}, {boxlen, boxlen, boxlen});
|
||||
#elif defined(USE_CONVOLVER_NAIVE)
|
||||
NaiveConvolver<real_t> Conv({ngrid, ngrid, ngrid}, {boxlen, boxlen, boxlen});
|
||||
#endif
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Create PLT gradient operator
|
||||
//--------------------------------------------------------------------
|
||||
// particle::lattice_gradient lg( the_config );
|
||||
#if defined(ENABLE_PLT)
|
||||
particle::lattice_gradient lg( the_config );
|
||||
#else
|
||||
op::fourier_gradient lg( the_config );
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
std::vector<cosmo_species> species_list;
|
||||
|
|
29
src/main.cc
29
src/main.cc
|
@ -67,15 +67,26 @@ int main( int argc, char** argv )
|
|||
|
||||
// Ascii ART logo. generated via http://patorjk.com/software/taag/#p=display&f=Nancyj&t=monofonIC
|
||||
csoca::ilog << "\n"
|
||||
<< " The unigrid version of MUSIC-2 .8888b dP a88888b. \n"
|
||||
<< " 88 \" 88 d8\' `88 \n"
|
||||
<< " 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88aaa .d8888b. 88d888b. 88 88 \n"
|
||||
<< " 88\'`88\'`88 88\' `88 88\' `88 88\' `88 88 88\' `88 88\' `88 88 88 \n"
|
||||
<< " 88 88 88 88. .88 88 88 88. .88 88 88. .88 88 88 88 Y8. .88 \n"
|
||||
<< " dP dP dP `88888P\' dP dP `88888P\' dP `88888P\' dP dP dP Y88888P\' \n" << std::endl
|
||||
<< "Build was compiled on " << __DATE__ << " at " << __TIME__ << std::endl
|
||||
<< "Version: v0.1a, git rev.: " << GIT_REV << ", tag: " << GIT_TAG << ", branch: " << GIT_BRANCH << std::endl
|
||||
<< "-------------------------------------------------------------------------------\n" << std::endl;
|
||||
<< " The unigrid version of MUSIC-2 .8888b dP a88888b. \n"
|
||||
<< " 88 \" 88 d8\' `88 \n"
|
||||
<< " 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88aaa .d8888b. 88d888b. 88 88 \n"
|
||||
<< " 88\'`88\'`88 88\' `88 88\' `88 88\' `88 88 88\' `88 88\' `88 88 88 \n"
|
||||
<< " 88 88 88 88. .88 88 88 88. .88 88 88. .88 88 88 88 Y8. .88 \n"
|
||||
<< " dP dP dP `88888P\' dP dP `88888P\' dP `88888P\' dP dP dP Y88888P\' \n" << std::endl;
|
||||
|
||||
// Compilation CMake configuration, time etc info:
|
||||
csoca::ilog << "This " << CMAKE_BUILDTYPE_STR << " build was compiled at " << __TIME__ << " on " << __DATE__ << std::endl;
|
||||
|
||||
// git and versioning info:
|
||||
csoca::ilog << "Version: v0.1a, git rev.: " << GIT_REV << ", tag: " << GIT_TAG << ", branch: " << GIT_BRANCH << std::endl;
|
||||
|
||||
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
|
||||
csoca::ilog << "Compile time options : " << std::endl;
|
||||
csoca::ilog << " Precision : " << CMAKE_PRECISION_STR << std::endl;
|
||||
csoca::ilog << " Convolutions : " << CMAKE_CONVOLVER_STR << std::endl;
|
||||
csoca::ilog << " PLT : " << CMAKE_PLT_STR << std::endl;
|
||||
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Parse command line options
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
#include <transfer_function_plugin.hh>
|
||||
#include <interpolate.hh>
|
||||
|
||||
#include <gsl/gsl_errno.h>
|
||||
#include <gsl/gsl_spline.h>
|
||||
|
||||
class transfer_CLASS_plugin : public TransferFunction_plugin
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in a new issue