Added a new test for the fourier interface
This commit is contained in:
parent
5341c8ed5d
commit
6a833c7393
@ -33,6 +33,10 @@ if(HDF5_ROOTDIR)
|
|||||||
endif(HDF5_ROOTDIR)
|
endif(HDF5_ROOTDIR)
|
||||||
include(FindHDF5)
|
include(FindHDF5)
|
||||||
|
|
||||||
|
include(FindPkgConfig)
|
||||||
|
|
||||||
|
pkg_check_modules(FFTW3 fftw3>=3.3)
|
||||||
|
pkg_check_modules(EIGEN3 eigen3)
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
set(NETCDF_FIND_REQUIRED TRUE)
|
set(NETCDF_FIND_REQUIRED TRUE)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SET(tolink CosmoTool ${CosmoTool_LIBS})
|
SET(tolink CosmoTool ${CosmoTool_LIBS})
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/src ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH})
|
include_directories(${CMAKE_SOURCE_DIR}/src ${FFTW3_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH})
|
||||||
|
|
||||||
add_executable(testBQueue testBQueue.cpp)
|
add_executable(testBQueue testBQueue.cpp)
|
||||||
target_link_libraries(testBQueue ${tolink})
|
target_link_libraries(testBQueue ${tolink})
|
||||||
@ -39,3 +39,8 @@ target_link_libraries(testAlgo ${tolink})
|
|||||||
|
|
||||||
add_executable(testBSP testBSP.cpp)
|
add_executable(testBSP testBSP.cpp)
|
||||||
target_link_libraries(testBSP ${tolink})
|
target_link_libraries(testBSP ${tolink})
|
||||||
|
|
||||||
|
if (FFTW3_FOUND AND EIGEN3_FOUND)
|
||||||
|
add_executable(test_fft_calls test_fft_calls)
|
||||||
|
target_link_libraries(test_fft_calls ${tolink} ${FFTW3_LIBRARIES})
|
||||||
|
endif (FFTW3_FOUND AND EIGEN3_FOUND)
|
||||||
|
12
sample/test_fft_calls.cpp
Normal file
12
sample/test_fft_calls.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include "fourier/euclidian.hpp"
|
||||||
|
|
||||||
|
using namespace CosmoTool;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
EuclidianFourierTransform_2d<double> dft(128,128,1.0,1.0);
|
||||||
|
|
||||||
|
dft.realSpace().eigen().setRandom();
|
||||||
|
dft.analysis();
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user