Skip to content

Commit

Permalink
New version of library for vector version of Fortran implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydumont committed Nov 4, 2014
1 parent 9bb8f79 commit afc22bc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/wignerSymbols-cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ std::vector<double> 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<double>::max()/40.0);
double huge = sqrt(std::numeric_limits<double>::max()/20.0);
double srhuge = sqrt(huge);
double tiny = std::numeric_limits<double>::min();
double srtiny = sqrt(tiny);
Expand Down
2 changes: 2 additions & 0 deletions tests/testWigner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit afc22bc

Please sign in to comment.