From afc22bc74fb83ed01426d2439c2e5ffc952e2848 Mon Sep 17 00:00:00 2001 From: Joey Dumont Date: Tue, 4 Nov 2014 17:19:08 -0500 Subject: [PATCH] New version of library for vector version of Fortran implementation. --- CMakeLists.txt | 2 +- README.md | 2 +- src/wignerSymbols-cpp.cpp | 2 +- tests/testWigner.cpp | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd94a90..887dc04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(wignerSymbols) set (wignerSymbols_VERSION_MAJOR 0) set (wignerSymbols_VERSION_MINOR 1) -set (wignerSymbols_VERSION_RELEASE 2) +set (wignerSymbols_VERSION_RELEASE 3) # CMake config cmake_minimum_required(VERSION 2.8) diff --git a/README.md b/README.md index 37cb267..3fe9498 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Wigner Symbols A C++ ensemble of functions to compute the Wigner 3j- and 6j- symbols. It reimplements the algorithm designed by Schulten and Gordon in C++, but also contains the original Fortran implementation. -It can act either as a complelte C++ replacement to the original Fortran implementation, +It can act either as a complete C++ replacement to the original Fortran implementation, or a C++ interface to them. See the API docs for details. It can either compute an array of Wigner 3j or 6j symbols, or a single coefficient. It also computes the Clebsch-Gordan coefficients. diff --git a/src/wignerSymbols-cpp.cpp b/src/wignerSymbols-cpp.cpp index c1f5f70..5bfbd8f 100644 --- a/src/wignerSymbols-cpp.cpp +++ b/src/wignerSymbols-cpp.cpp @@ -13,7 +13,7 @@ std::vector wigner3j(double l2, double l3, double m1, double m2, double m3) { // We compute the numeric limits of double precision. - double huge = sqrt(std::numeric_limits::max()/40.0); + double huge = sqrt(std::numeric_limits::max()/20.0); double srhuge = sqrt(huge); double tiny = std::numeric_limits::min(); double srtiny = sqrt(tiny); diff --git a/tests/testWigner.cpp b/tests/testWigner.cpp index 8e87ba8..b256462 100644 --- a/tests/testWigner.cpp +++ b/tests/testWigner.cpp @@ -31,6 +31,8 @@ double timingWignerSymbolsF(double l2, double l3, double m1, double m2, double m int main(int argc, char* argv[]) { + // We evalaute ThreeJ((1,0),(2,0),(1,0)) + std::cout << WignerSymbols::wigner3j(1,2,1,0,0,0) << std::endl; // We time the computation for different sizes. int N = 500; double l2(500.0),m1(-10.0),m2(60.0),m3(-50.0);