[136271] trunk/dports/science/gate
mojca at macports.org
mojca at macports.org
Wed May 13 14:33:14 PDT 2015
Revision: 136271
https://trac.macports.org/changeset/136271
Author: mojca at macports.org
Date: 2015-05-13 14:33:14 -0700 (Wed, 13 May 2015)
Log Message:
-----------
gate: upgrade
Modified Paths:
--------------
trunk/dports/science/gate/Portfile
Removed Paths:
-------------
trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff
Modified: trunk/dports/science/gate/Portfile
===================================================================
--- trunk/dports/science/gate/Portfile 2015-05-13 21:22:15 UTC (rev 136270)
+++ trunk/dports/science/gate/Portfile 2015-05-13 21:33:14 UTC (rev 136271)
@@ -8,15 +8,15 @@
PortGroup cmake 1.0
PortGroup active_variants 1.1
-set git_sha 684ff5a2
-set git_date 20150414
+set git_sha e657ed0c
+set git_date 20150512
# Using GitHub just for the sake of downloadable zips
PortGroup github 1.0
github.setup OpenGATE Gate ${git_sha}
name gate
version 7.1
-revision 2
+revision 3
# version 7.1-git-${git_date}-${git_sha}
## official repository
@@ -34,8 +34,8 @@
homepage http://www.opengatecollaboration.org
platforms darwin
-checksums rmd160 dd346db9be8d28fcdd9e0a91cce25ef486ebe38f \
- sha256 5f3953c1cead4e988bd8e19df1c5362912312446013cc2aeac7f7f056725c61f
+checksums rmd160 ee946cd1a0962660566ad7eb71a60cd2420fac32 \
+ sha256 bde3ab7bd747f11d3ade0149ef2371a6077a0546120fd98a61ca2c044bef7558
# TODO: take this data from a geant4 portgroup
set geant.data_versions_10.1 {
@@ -76,11 +76,6 @@
patchfiles-append patch-addmenu.diff
-if {![variant_isset geant4100]} {
- patchfiles-append \
- patch-source-physics-GateVSource.diff
-}
-
configure.args-append \
-DGATE_USE_SYSTEM_CLHEP=OFF \
-DROOT_CONFIG_EXECUTABLE=${prefix}/libexec/root5/bin/root-config
Deleted: trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff
===================================================================
--- trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff 2015-05-13 21:22:15 UTC (rev 136270)
+++ trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff 2015-05-13 21:33:14 UTC (rev 136271)
@@ -1,130 +0,0 @@
---- source/physics/include/GateVSource.hh.orig
-+++ source/physics/include/GateVSource.hh
-@@ -119,7 +119,7 @@ public:
- // Class function related to the userFocused angDist type
- void InitializeUserFocalShape();
- G4ThreeVector UserFocalShapeGenerateOne();
-- G4SPSPosDistribution *GetUserFocalShape() { return &mUserFocalShape;}
-+ G4SPSPosDistribution *GetUserFocalShape() { return mUserFocalShape; }
- void SetUserFocalShapeFlag(G4bool b) { mUserFocalShapeInitialisation = b; }
-
- //void AddTimeSlices(double time, int nParticles);
-@@ -186,8 +186,8 @@ protected:
- G4ThreeVector mUserFluenceVoxelSize;
- std::vector<double> mUserPosX;
- std::vector<double> mUserPosY;
-- G4SPSRandomGenerator mUserPosGenX;
-- std::vector<G4SPSRandomGenerator> mUserPosGenY;
-+ G4SPSRandomGenerator *mUserPosGenX;
-+ std::vector<G4SPSRandomGenerator*> mUserPosGenY;
- // - copy of useful members from G4SPSPosDistribution (unreachable G4 class)
- G4ThreeVector mCentreCoords;
- G4ThreeVector mRotX;
-@@ -198,7 +198,7 @@ protected:
- G4bool mIsUserFocalShapeActive;
- G4bool mUserFocalShapeInitialisation;
- G4double mUserFocalRadius;
-- G4SPSPosDistribution mUserFocalShape;
-+ G4SPSPosDistribution *mUserFocalShape;
-
- std::vector<double> mTimeList;
- std::vector<double> mActivityList;
---- source/physics/src/GateVSource.cc.orig
-+++ source/physics/src/GateVSource.cc
-@@ -83,8 +83,9 @@ GateVSource::GateVSource(G4String name): m_name( name ) {
- // mUserPosRndm = NULL;
- mIsUserFocalShapeActive = false;
- mUserFocalShapeInitialisation = false;
-+ mUserFocalShape = new G4SPSPosDistribution();
-
--
-+ mUserPosGenX = new G4SPSRandomGenerator();
- m_posSPS = new GateSPSPosDistribution();
- m_posSPS->SetBiasRndm( GetBiasRndm() );
- m_eneSPS = new GateSPSEneDistribution();
-@@ -116,6 +117,11 @@ GateVSource::~GateVSource()
- delete m_posSPS;
- delete m_eneSPS;
- delete m_angSPS;
-+ delete mUserFocalShape;
-+ delete mUserPosGenX;
-+ for (int i = 0; i<mUserPosGenY.size(); ++i) {
-+ delete mUserPosGenY[i];
-+ }
- }
- //-------------------------------------------------------------------------------------------------
-
-@@ -883,7 +889,7 @@ void GateVSource::InitializeUserFluence()
- posX = (0.5 * sizeX) + userFluenceImage.GetOrigin().x();
- // posX = ((0.5 * sizeX) - userFluenceImage.GetHalfSize().x());
-
-- mUserPosGenX.SetXBias(G4ThreeVector(0.,0.,0.));
-+ mUserPosGenX->SetXBias(G4ThreeVector(0.,0.,0.));
- for(int i=0; i<resX;i++)
- {
- mUserPosX[i] = posX;
-@@ -891,18 +897,24 @@ void GateVSource::InitializeUserFluence()
- sum = 0.0;
- posY = (0.5 * sizeY) + userFluenceImage.GetOrigin().y();
- // posY = ((0.5 * sizeY) - userFluenceImage.GetHalfSize().y());
--
-- mUserPosGenY[i].SetYBias(G4ThreeVector(0.,0.,0.));
-+
-+ if (mUserPosGenY[i]==0) {
-+ mUserPosGenY[i] = new G4SPSRandomGenerator();
-+ }
-+ mUserPosGenY[i]->SetYBias(G4ThreeVector(0.,0.,0.));
- for(int j=0; j<resY; j++)
- {
-- sum += userFluenceImage.GetValue(i,j,0);
-- mUserPosY[j] = posY;
-+ sum += userFluenceImage.GetValue(i,j,0);
-+ mUserPosY[j] = posY;
-
-- mUserPosGenY[i].SetYBias(G4ThreeVector(j+1,userFluenceImage.GetValue(i,j,0),0.));
-- posY += sizeY;
-+ if (mUserPosGenY[i]==0) {
-+ mUserPosGenY[i] = new G4SPSRandomGenerator();
-+ }
-+ mUserPosGenY[i]->SetYBias(G4ThreeVector(j+1,userFluenceImage.GetValue(i,j,0),0.));
-+ posY += sizeY;
- }
-
-- mUserPosGenX.SetXBias(G4ThreeVector(i+1,sum,0.));
-+ mUserPosGenX->SetXBias(G4ThreeVector(i+1,sum,0.));
- posX += sizeX;
- }
-
-@@ -913,8 +925,8 @@ void GateVSource::InitializeUserFluence()
- //----------------------------------------------------------------------------------------
- G4ThreeVector GateVSource::UserFluencePosGenerateOne()
- {
-- int i = floor(mUserPosGenX.GenRandX());
-- int j = floor(mUserPosGenY[i].GenRandY());
-+ int i = floor(mUserPosGenX->GenRandX());
-+ int j = floor(mUserPosGenY[i]->GenRandY());
-
- // uniform rand in pixel
- double x = mUserPosX[i] + (G4UniformRand()-0.5)*mUserFluenceVoxelSize.x();
-@@ -986,9 +998,9 @@ void GateVSource::InitializeUserFocalShape()
- {
- mIsUserFocalShapeActive = true;
- mUserFocalShapeInitialisation = false;
-- mUserFocalShape.SetBiasRndm( GetBiasRndm() );
-- mUserFocalShape.SetPosDisType("Plane");
-- mUserFocalShape.SetPosDisShape("Circle");
-+ mUserFocalShape->SetBiasRndm( GetBiasRndm() );
-+ mUserFocalShape->SetPosDisType("Plane");
-+ mUserFocalShape->SetPosDisShape("Circle");
-
- m_angSPS->SetAngDistType("focused");
- }
-@@ -997,7 +1009,7 @@ void GateVSource::InitializeUserFocalShape()
- //----------------------------------------------------------------------------------------
- G4ThreeVector GateVSource::UserFocalShapeGenerateOne()
- {
-- G4ThreeVector position = mUserFocalShape.GenerateOne();
-+ G4ThreeVector position = mUserFocalShape->GenerateOne();
- // DD(position);
- m_angSPS->SetFocusPoint(position);
- G4ThreeVector momentum = m_angSPS->GenerateOne();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150513/51c790ac/attachment.html>
More information about the macports-changes
mailing list