Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydumont committed Jul 10, 2014
1 parent 1e396b5 commit c3acd21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Name of project
project(wignerSymbols)
set (wignerSymbols_VERSION_MAJOR 0)
set (wignerSymbols_VERSION_MINOR 0)
set (wignerSymbols_VERSION_MINOR 1)
set (wignerSymbols_VERSION_RELEASE 1)

# CMake config
cmake_minimum_required(VERSION 2.8)
set (CMAKE_INSTALL_PREFIX /usr/)

# Compiler config
enable_language (Fortran)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -march=native")

# Included files
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
Expand Down
10 changes: 5 additions & 5 deletions src/wignerSymbols-cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ std::vector<double> wigner3j(double l2, double l3,
thrcof[0] = srtiny;

// From now on, we check the variation of |alpha(l1)|.
double alphaOld, alphaNew, beta, l1(l1min);
double alphaNew, l1(l1min);
if (l1min==0.0)
alphaNew = -(m3-m2+2.0*wigner3j_auxB(l1,l2,l3,m1,m2,m3))/wigner3j_auxA(1.0,l2,l3,m1,m2,m3);
else
Expand Down Expand Up @@ -268,7 +268,7 @@ std::vector<double> wigner6j(double l2, double l3,
sixcof[0] = srtiny;

// From now on, we check the variation of |alpha(l1)|.
double alphaOld, alphaNew, beta, l1(l1min);
double alphaNew, l1(l1min);

if (l1min==0)
alphaNew = -(l2*(l2+1.0)+l3*(l3+1.0)+l5*(l5+1.0)+l6*(l6+1.0)-2.0*l4*(l4+1.0))/wigner6j_auxA(1.0,l2,l3,l4,l5,l6);
Expand Down Expand Up @@ -298,7 +298,7 @@ std::vector<double> wigner6j(double l2, double l3,
sixcof[1] = alphaNew*sixcof[0];

// We compute the rest of the recursion.
int i = 1;
unsigned int i = 1;
bool alphaVar = false;
do
{
Expand Down Expand Up @@ -357,7 +357,7 @@ std::vector<double> wigner6j(double l2, double l3,
sixcof[size-2] = alphaNew*sixcof[size-1];

// We compute the rest of the backward recursion.
int j = size-2;
unsigned int j = size-2;
do
{
// Bookkeeping
Expand Down Expand Up @@ -400,7 +400,7 @@ std::vector<double> wigner6j(double l2, double l3,

// We compute the overall factor.
double sum = 0.0;
for (int k=0;k<size;k++)
for (unsigned int k=0;k<size;k++)
{
sum += (2.0*(l1min+k)+1.0)*(2.0*l4+1.0)*sixcof[k]*sixcof[k];
}
Expand Down

0 comments on commit c3acd21

Please sign in to comment.