From 027134fc0eb3abac3b584072edbd1658ead03a89 Mon Sep 17 00:00:00 2001 From: Thomas Kittelmann Date: Mon, 2 Sep 2024 19:25:57 +0200 Subject: [PATCH] import from dgcode ncrystaldev git: candidate for version 3.9.7 --- CHANGELOG | 3 +++ CMakeLists.txt | 2 +- NCrystal/__init__.py | 2 +- NCrystal/core.py | 2 +- NCrystal/hfg2ncmat.py | 2 -- VERSION | 2 +- ncrystal_core/include/NCrystal/NCVersion.hh | 6 +++--- ncrystal_core/include/NCrystal/ncrystal.h | 6 +++--- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 509ff908..48eaf3f0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +v3.9.7 2024-09-02 + * Fix bug in LoadedMaterial.xsect/.macroscopic_xsect methods. + v3.9.6 2024-08-30 * Add several new convenience methods to MiniMC results and histograms. * Fix bug in MiniMC histogram error propagation. diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cb672bf..65f7c8e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,7 @@ endif() cmake_policy( SET CMP0048 NEW )#Not sure if this is really needed -project( NCrystal VERSION 3.9.6 ${_project_metadata} ) +project( NCrystal VERSION 3.9.7 ${_project_metadata} ) unset( _project_metadata ) diff --git a/NCrystal/__init__.py b/NCrystal/__init__.py index 836c5f16..7de2eb33 100644 --- a/NCrystal/__init__.py +++ b/NCrystal/__init__.py @@ -54,7 +54,7 @@ #NB: Synchronize meta-data below with fields in setup.py+template_setup.py.in meta data: __license__ = "Apache 2.0, http://www.apache.org/licenses/LICENSE-2.0" -__version__ = '3.9.6' +__version__ = '3.9.7' __status__ = "Production" __author__ = "NCrystal developers (Thomas Kittelmann, Xiao Xiao Cai)" __copyright__ = "Copyright 2015-2024 %s"%__author__ diff --git a/NCrystal/core.py b/NCrystal/core.py index 404938ad..1f6d605b 100644 --- a/NCrystal/core.py +++ b/NCrystal/core.py @@ -1645,7 +1645,7 @@ def xsect( self, *args, **kwargs ): """Convenience function which adds up the cross sections from any loaded absorption and scatter processes. Refer to the Process.xsect method for arguments.""" - procs = (p for p in (self.scatter,self.absorption) if p is not None) + procs = [p for p in (self.scatter,self.absorption) if p is not None] if not procs: raise NCCalcError('.xsect(..) can only be called on' ' LoadedMaterial which contains processes.') diff --git a/NCrystal/hfg2ncmat.py b/NCrystal/hfg2ncmat.py index 5384a7a8..d3297520 100644 --- a/NCrystal/hfg2ncmat.py +++ b/NCrystal/hfg2ncmat.py @@ -150,8 +150,6 @@ def hfg2ncmat( spec, #ncrystal_hfg2ncmat command-line app! from ._hfgdata import get_data as hfg_get_data - #FIXME: CHECK ARGS - #FIXME: seems to parse!!!!! --formula CH6s if verbose: from ._common import print diff --git a/VERSION b/VERSION index 1635d0f5..f69abe41 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.9.6 +3.9.7 diff --git a/ncrystal_core/include/NCrystal/NCVersion.hh b/ncrystal_core/include/NCrystal/NCVersion.hh index ceb84881..4b385402 100644 --- a/ncrystal_core/include/NCrystal/NCVersion.hh +++ b/ncrystal_core/include/NCrystal/NCVersion.hh @@ -39,9 +39,9 @@ #define NCRYSTAL_VERSION_MAJOR 3 #define NCRYSTAL_VERSION_MINOR 9 -#define NCRYSTAL_VERSION_PATCH 6 -#define NCRYSTAL_VERSION 3009006 /* (1000000*MAJOR+1000*MINOR+PATCH) */ -#define NCRYSTAL_VERSION_STR "3.9.6" +#define NCRYSTAL_VERSION_PATCH 7 +#define NCRYSTAL_VERSION 3009007 /* (1000000*MAJOR+1000*MINOR+PATCH) */ +#define NCRYSTAL_VERSION_STR "3.9.7" #include "NCrystal/ncapi.h" #include diff --git a/ncrystal_core/include/NCrystal/ncrystal.h b/ncrystal_core/include/NCrystal/ncrystal.h index 9d49aa31..29fb28cf 100644 --- a/ncrystal_core/include/NCrystal/ncrystal.h +++ b/ncrystal_core/include/NCrystal/ncrystal.h @@ -1201,9 +1201,9 @@ extern "C" { #endif #define NCRYSTAL_VERSION_MAJOR 3 #define NCRYSTAL_VERSION_MINOR 9 -#define NCRYSTAL_VERSION_PATCH 6 -#define NCRYSTAL_VERSION 3009006 /* (1000000*MAJOR+1000*MINOR+PATCH) */ -#define NCRYSTAL_VERSION_STR "3.9.6" +#define NCRYSTAL_VERSION_PATCH 7 +#define NCRYSTAL_VERSION 3009007 /* (1000000*MAJOR+1000*MINOR+PATCH) */ +#define NCRYSTAL_VERSION_STR "3.9.7" NCRYSTAL_API int ncrystal_version(void); /* returns NCRYSTAL_VERSION */ NCRYSTAL_API const char * ncrystal_version_str(void); /* returns NCRYSTAL_VERSION_STR */