Skip to content

Commit e56db7f

Browse files
committed
Update a few small things.
Update build on windows for VS2019 A few other small updates.
1 parent 2f0745b commit e56db7f

File tree

8 files changed

+289
-172
lines changed

8 files changed

+289
-172
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# excpet iOS, Android, and Electron, InterSpecExe
33

44
cmake_policy(SET CMP0048 NEW)
5-
project(InterSpec VERSION 1.0.8)
5+
project(InterSpec VERSION 1.0.9)
66

77
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
88
set(CMAKE_COLOR_MAKEFILE ON CACHE BOOL "Color" FORCE)
@@ -16,9 +16,9 @@ if(WIN32)
1616
include(cmake/ConfigureMsvc.txt)
1717
configure_msvc_runtime()
1818

19-
set(BOOST_PREFIX "C:/install/msvc2017/x64/boost_1_65_1")
20-
set(ZLIB_PREFIX "C:/install/msvc2017/x64/zlib")
21-
list(APPEND PATH_SUFFIXES "C:/install/msvc2017/x64/wt-3.3.4")
19+
set(BOOST_PREFIX "C:/install/msvc2019/x64/boost_1_65_1")
20+
set(ZLIB_PREFIX "C:/install/msvc2019/x64/zlib")
21+
list(APPEND PATH_SUFFIXES "C:/install/msvc2019/x64/wt-3.3.4")
2222

2323
set(EXECUTABLE_OUTPUT_PATH . CACHE PATH "Path to executables" FORCE)
2424
set(CMAKE_CXX_FLAGS
@@ -1042,7 +1042,7 @@ elseif(BUILD_AS_OSX_APP)
10421042

10431043
#set MACOS_BUNDLE_VERSION_NUMBER for Info.plist.template to populate cooresponding value in Xcode
10441044
#math(EXPR MACOS_BUNDLE_VERSION_NUMBER "100*(${PROJECT_VERSION_MAJOR}-1) + 10*${PROJECT_VERSION_MINOR} + ${PROJECT_VERSION_PATCH}" )
1045-
set(MACOS_BUNDLE_VERSION_NUMBER 13)
1045+
set(MACOS_BUNDLE_VERSION_NUMBER 14)
10461046

10471047
set_target_properties(
10481048
InterSpecExe

InterSpec/GammaInteractionCalc.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,13 @@ double mass_attenuation_coef( float atomic_number, float energy );
111111
double transmition_coefficient_generic( float atomic_number, float areal_density,
112112
float energy );
113113

114+
115+
void example_integration();
116+
114117
// When debugging we will grab a static mutex so we dont get jumbled stdout
115118
#define DEBUG_RAYTRACE_CALCS 0
116119

117120

118-
void example_integration();
119-
120121
/** Runs some simple test cases for #cylinder_exit_position, and cause assert(0) on error. */
121122
void test_cylinder_exit_position();
122123

@@ -144,6 +145,16 @@ double exit_point_of_sphere_z( const double source_point[3],
144145
double observation_dist,
145146
bool postiveSolution = true );
146147

148+
/** An enum to to tell #cylinder_exit_position which exit point from sphere you want.
149+
150+
A better name would be CylinderIntersectionDirection, but thats too long.
151+
*/
152+
enum class CylExitDir
153+
{
154+
TowardDetector,
155+
AwayFromDetector
156+
};
157+
147158
/** Starting from a 'source_point' within the volume of the cylinder, and heading towards the 'detector_point' (think center
148159
of the detector face), returns the total attenuation coefficient along the path, including recursing into any sub-tubes, as well as
149160
sets the point where the ray leaves the cylinder.
@@ -156,7 +167,9 @@ double exit_point_of_sphere_z( const double source_point[3],
156167
@param[in] detector The {x, y, z} point on the detector face we care about (so center of detector, unless you are integrating over
157168
the detector face), in the coordinate system where cylinder is centered at {0,0,0}.
158169
@param[out] exit_point The final exit point from the cylinder, where the path will no longer go through the volume.
159-
@returns the attenuation coefficient from the path through the cylinder and its sub-cylinders. E.g.,
170+
@returns The distance from source location to exit point. Returns 0.0 if line does not intersect cylinder. Note that this is not the
171+
distance in the cylinder, but the total distance from source to exit point, so if source is outside volume, may be larger than cylinder
172+
dimensions.
160173
\code{.cpp}
161174
double exit_point[3];
162175
const double distance_in_m = cylinder_exit_position( 0.5*m, 100*cm, {0,0.1*m,20*cm}, {0,0,10*m}, exit_point );
@@ -166,6 +179,7 @@ double exit_point_of_sphere_z( const double source_point[3],
166179
double cylinder_exit_position( const double radius, const double half_length,
167180
const double source[3],
168181
const double detector[3],
182+
const CylExitDir direction,
169183
double exit_point[3] );
170184

171185

@@ -199,7 +213,7 @@ struct DistributedSrcCalc
199213
void eval_spherical( const double xx[], const int *ndimptr,
200214
double ff[], const int *ncompptr ) const;
201215

202-
void eval_cyl_end_on( const double xx[], const int *ndimptr,
216+
void eval_single_cyl_end_on( const double xx[], const int *ndimptr,
203217
double ff[], const int *ncompptr ) const;
204218

205219
void eval_cylinder( const double xx[], const int *ndimptr,

0 commit comments

Comments
 (0)