Import Geant4 10.4.0.beta source tree
This commit is contained in:
Vendored
+12
@@ -17,6 +17,18 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
10-May-2017 - G.Cosmo (externals-V10-03-02)
|
||||
- CLHEP: fixed shadowing compilation warnings on RotationA.cc.
|
||||
|
||||
09-May-2017 - G.Cosmo (externals-V10-03-01)
|
||||
- Updated to CLHEP-2.3.4.4.
|
||||
- CLHEP: fix in HepRotation::axis() for proper treatment of degenerating cases.
|
||||
Fixed compilation warnings on gcc-7.1 in Evaluator.cc.
|
||||
|
||||
28-February-2017 - G.Cosmo (externals-V10-03-00)
|
||||
- Adapted CMake scripts to new configuration for internal/external
|
||||
packages of CLHEP, expat and zlib.
|
||||
|
||||
04-November-2016 - G.Cosmo (externals-V10-02-11)
|
||||
- Updated to CLHEP-2.3.4.3.
|
||||
- CLHEP: fixed array initialisation in Evaluator static method function().
|
||||
|
||||
+11
@@ -231,6 +231,17 @@ set(G4clhep_SOURCES
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_LIBRARY_TARGET(NAME G4clhep SOURCES ${G4clhep_SOURCES} ${G4clhep_HEADERS})
|
||||
|
||||
# Interface usage requirements (build time clients only)
|
||||
foreach(__g4clhep_target G4clhep G4clhep-static)
|
||||
if(TARGET ${__g4clhep_target})
|
||||
target_include_directories(${__g4clhep_target}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Ensure the header directory gets added to the list of ones to export
|
||||
#
|
||||
|
||||
Vendored
+15
@@ -17,6 +17,21 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
10 May 2017 - G.Cosmo
|
||||
- Fixed shadowing compilation warnings on RotationA.cc.
|
||||
|
||||
09 May 2017 - G.Cosmo
|
||||
- Updated to CLHEP-2.3.4.4.
|
||||
- Fix in HepRotation::axis() for proper treatment of degenerating cases.
|
||||
- Fixed compilation warnings on gcc-7.1 in Evaluator.cc.
|
||||
|
||||
03 February 2017 - B.Morgan (clhep-V10-03-00)
|
||||
- Set interface include directories on G4clhep{-static} targets
|
||||
in CMakeLists.txt. This provides the needed interface to allow transparent
|
||||
usage of internal/external CLHEP via targets and without needing to use
|
||||
include_directories explicitly. Only set include paths in BUILD
|
||||
interface for consistency with other targets.
|
||||
|
||||
04 November 2016 - G.Cosmo
|
||||
- Updated to CLHEP-2.3.4.3.
|
||||
- Fixed array initialisation in Evaluator static method function().
|
||||
|
||||
+3
@@ -98,6 +98,8 @@ static int variable(const string & name, double & result,
|
||||
pchar exp_end = exp_begin + strlen(exp_begin) - 1;
|
||||
if (engine(exp_begin, exp_end, result, exp_end, dictionary) == EVAL::OK)
|
||||
return EVAL::OK;
|
||||
else
|
||||
return EVAL::ERROR_CALCULATION_ERROR;
|
||||
}
|
||||
default:
|
||||
return EVAL::ERROR_CALCULATION_ERROR;
|
||||
@@ -328,6 +330,7 @@ static int maker(int op, stack<double> & val)
|
||||
errno = 0;
|
||||
val.top() = std::pow(val1,val2);
|
||||
if (errno == 0) return EVAL::OK;
|
||||
else return EVAL::ERROR_CALCULATION_ERROR;
|
||||
case UNARY_PLUS: // unary operator '+'
|
||||
val.top() = val1 + val2; // val1 is zero
|
||||
return EVAL::OK;
|
||||
|
||||
+33
-11
@@ -78,20 +78,42 @@ double HepRotation::delta() const {
|
||||
|
||||
Hep3Vector HepRotation::axis () const {
|
||||
|
||||
// Determine 2*std::sin(delta) times the u components (I call this uX, uY, Uz)
|
||||
// Normalization is not needed; it will be done when returning the 3-Vector
|
||||
const double eps = 1e-15;
|
||||
|
||||
double Uz = ryx - rxy;
|
||||
double Uy = rxz - rzx;
|
||||
double Ux = rzy - ryz;
|
||||
double Ux = rzy - ryz;
|
||||
double Uy = rxz - rzx;
|
||||
double Uz = ryx - rxy;
|
||||
if (std::abs(Ux) < eps && std::abs(Uy) < eps && std::abs(Uz) < eps) {
|
||||
|
||||
if ( (Uz==0) && (Uy==0) && (Ux==0) ) {
|
||||
if ( rzz>0 ) {
|
||||
return Hep3Vector(0,0,1);
|
||||
} else if ( ryy>0 ) {
|
||||
return Hep3Vector(0,1,0);
|
||||
double cosdelta = (rxx + ryy + rzz - 1.0) / 2.0;
|
||||
if (cosdelta > 0.0) return Hep3Vector(0,0,1); // angle = 0, any axis is good
|
||||
|
||||
double mxx = (rxx + 1)/2;
|
||||
double myy = (ryy + 1)/2;
|
||||
double mzz = (rzz + 1)/2;
|
||||
double mxy = (rxy + ryx)/4;
|
||||
double mxz = (rxz + rzx)/4;
|
||||
double myz = (ryz + rzy)/4;
|
||||
double x, y, z;
|
||||
|
||||
if (mxx > ryy && mxx > rzz) {
|
||||
x = std::sqrt(mxx);
|
||||
if (rzy - ryz < 0) x = -x;
|
||||
y = mxy/x;
|
||||
z = mxz/x;
|
||||
return Hep3Vector( x, y, z ).unit();
|
||||
} else if (myy > mzz) {
|
||||
y = std::sqrt(myy);
|
||||
if (rxz - rzx < 0) y = -y;
|
||||
x = mxy/y;
|
||||
z = myz/y;
|
||||
return Hep3Vector( x, y, z ).unit();
|
||||
} else {
|
||||
return Hep3Vector(1,0,0);
|
||||
z = std::sqrt(mzz);
|
||||
if (ryx - rxy < 0) z = -z;
|
||||
x = mxz/z;
|
||||
y = myz/z;
|
||||
return Hep3Vector( x, y, z ).unit();
|
||||
}
|
||||
} else {
|
||||
return Hep3Vector( Ux, Uy, Uz ).unit();
|
||||
|
||||
+16
@@ -26,3 +26,19 @@ if(TARGET G4expat-static)
|
||||
target_compile_definitions(G4expat-static PUBLIC XML_STATIC)
|
||||
endif()
|
||||
|
||||
# Externals are a special case during migration to new CMake system.
|
||||
# To ensure compatibility with both old and new systems, need
|
||||
# to set INCLUDE_DIRECTORIES usage requirement. Does not affect
|
||||
# build-time inc dirs, simply propagates public includes to
|
||||
# clients who link to G4expat target inside Geant4
|
||||
foreach(__g4expat_target G4expat G4expat-static)
|
||||
if(TARGET ${__g4expat_target})
|
||||
target_include_directories(${__g4expat_target}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
Vendored
+7
@@ -14,6 +14,13 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
03-February-2017: Ben Morgan expat-V10-03-00
|
||||
- Set interface include directories on G4expat{-static} targets
|
||||
in CMakeLists.txt. This provides the needed interface to allow transparent
|
||||
usage of internal/external expat via targets and without needing to use
|
||||
include_directories explicitly. Only set include paths in BUILD
|
||||
interface for consistency with other targets.
|
||||
|
||||
24-September-2015: Ben Morgan expat-V10-01-01
|
||||
- CMakeLists.txt : Add XML_STATIC to public compile definitions
|
||||
of G4expat-static. Required on Windows platforms to ensure correct
|
||||
|
||||
Vendored
+18
@@ -19,3 +19,21 @@ if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
else()
|
||||
GEANT4_GLOBAL_LIBRARY_TARGET(COMPONENTS sources.cmake)
|
||||
endif()
|
||||
|
||||
# Externals are a special case during migration to new CMake system.
|
||||
# To ensure compatibility with both old and new systems, need
|
||||
# to set INCLUDE_DIRECTORIES usage requirement. Does not affect
|
||||
# build-time inc dirs, simply propagates public includes to
|
||||
# clients who link to G4zlib target inside Geant4
|
||||
foreach(__g4zlib_target G4zlib G4zlib-static)
|
||||
if(TARGET ${__g4zlib_target})
|
||||
target_include_directories(${__g4zlib_target}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6.99.99"))
|
||||
target_compile_options(${__g4zlib_target} PRIVATE "-Wno-implicit-fallthrough")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
Vendored
+10
@@ -19,6 +19,16 @@ committal in the CVS repository !
|
||||
|
||||
History file for G4 zlib package
|
||||
--------------------------------
|
||||
18 May 2017 Gunter Folger (zlib-V10-03-01)
|
||||
- disable warning on fall-through on many case statements issued by gcc7
|
||||
add directive -Wno-implicit-fallthrough in CMakeLists.txt, and fix copy-paste typo.
|
||||
|
||||
03 February 2017 Ben Morgan (zlib-V10-03-00)
|
||||
- Set interface include directories on G4zlib{-static} targets
|
||||
in CMakeLists.txt. This provides the needed interface to allow transparent
|
||||
usage of internal/external zlib via targets and without needing to use
|
||||
include_directories explicitly. Only set include paths in BUILD
|
||||
interface for consistency with other targets.
|
||||
|
||||
19 April 2015 Gunter Folger (zlib-V10-02-01)
|
||||
- fix in gzguts.h for Windows; as of Studio 2015 in 64 bit compilation,
|
||||
|
||||
Reference in New Issue
Block a user