[Avida-SVN] r2816 - in branches/hjg-dev: . source/actions

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Tue Oct 7 19:07:33 PDT 2008


Author: hjg
Date: 2008-10-07 22:07:33 -0400 (Tue, 07 Oct 2008)
New Revision: 2816

Modified:
   branches/hjg-dev/CMakeLists.txt
   branches/hjg-dev/source/actions/EnvironmentActions.cc
Log:
modified config to work on hpcc

Modified: branches/hjg-dev/CMakeLists.txt
===================================================================
--- branches/hjg-dev/CMakeLists.txt	2008-10-08 01:25:43 UTC (rev 2815)
+++ branches/hjg-dev/CMakeLists.txt	2008-10-08 02:07:33 UTC (rev 2816)
@@ -38,8 +38,8 @@
       SET(COMPILER_WARNING_FLAGS "")
       SET(COMPILER_OPTIMIZATION_FLAGS "")
     ELSE (CMAKE_CXX_COMPILER MATCHES ".*icpc.*")
-      SET(COMPILER_WARNING_FLAGS "-Wextra -Wno-unknown-pragmas -Wconversion -Wno-trigraphs")
-      SET(COMPILER_OPTIMIZATION_FLAGS "-ffast-math -fno-rtti -funroll-loops -fstrict-aliasing -ftree-vectorize -fvisibility-inlines-hidden")
+      SET(COMPILER_WARNING_FLAGS "-Wno-unknown-pragmas -Wconversion -Wno-trigraphs")
+      SET(COMPILER_OPTIMIZATION_FLAGS "-ffast-math -fno-rtti -funroll-loops -fstrict-aliasing ")
     ENDIF (CMAKE_CXX_COMPILER MATCHES ".*icpc.*")
   ENDIF (CMAKE_CXX_COMPILER MATCHES ".*pathCC.*")
 

Modified: branches/hjg-dev/source/actions/EnvironmentActions.cc
===================================================================
--- branches/hjg-dev/source/actions/EnvironmentActions.cc	2008-10-08 01:25:43 UTC (rev 2815)
+++ branches/hjg-dev/source/actions/EnvironmentActions.cc	2008-10-08 02:07:33 UTC (rev 2816)
@@ -22,7 +22,7 @@
  *
  */
 
-#include "math.h"
+#include <cmath>
 #include "EnvironmentActions.h"
 
 #include "cAction.h"
@@ -554,7 +554,7 @@
 	void Process(cAvidaContext& ctx)
 	{
 		int time = m_world->GetStats().GetUpdate();
-		double m_res_count = -1*(0.4*tanh((time-182500)/50000)+0.5)*(0.5*sin(time/58.091)+0.5)+1;
+		double m_res_count = -1*(0.4*tanh((double)(time-182500)/50000)+0.5)*(0.5*sin(time/58.091)+0.5)+1;
 		cResource* res = m_world->GetEnvironment().GetResourceLib().GetResource(m_res_name);
 		if (res != NULL)
 			m_world->GetPopulation().SetResource(res->GetID(), m_res_count);
@@ -582,7 +582,7 @@
 	void Process(cAvidaContext& ctx)
 	{
 		int time = m_world->GetStats().GetUpdate();
-		double m_res_count = -m_scale*(tanh((time-182500)/50000)+1)*(0.5*sin(time/58.091)+0.5)+1;
+		double m_res_count = -m_scale*(tanh((double)(time-182500)/50000)+1)*(0.5*sin(time/58.091)+0.5)+1;
 		if(m_res_count < 0.0)
 			m_res_count = 0.0;
 		cResource* res = m_world->GetEnvironment().GetResourceLib().GetResource(m_res_name);
@@ -614,7 +614,7 @@
 	void Process(cAvidaContext& ctx)
 	{
 		int time = m_world->GetStats().GetUpdate();
-		double m_res_count = -m_scale*(tanh((time-1825000)/500000)+1)*(0.5*sin(time/58.091)+0.5)+1;
+		double m_res_count = -m_scale*(tanh((double)(time-1825000)/500000)+1)*(0.5*sin(time/58.091)+0.5)+1;
 		if(m_res_count < 0.0)
 			m_res_count = 0.0;
 		cResource* res = m_world->GetEnvironment().GetResourceLib().GetResource(m_res_name);




More information about the Avida-cvs mailing list