Skip to content

Commit 0e7d37d

Browse files
authored
Merge pull request #146 from LLNL/hotfix/aneos-input-path
Fixes for ANEOS constructors with canned materials.
2 parents 9a4b7e6 + e2a36dc commit 0e7d37d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

cmake/tpl/aneos.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
set(${lib_name}_NO_INCLUDES On)
22
set(${lib_name}_libs libaneos.a)
3+
4+
set(ANEOS_INPUT_DEST_DIR "${${lib_name}_DIR}/input")
5+
set(ANEOS_INPUT_DEST_DIR ${ANEOS_INPUT_DEST_DIR} PARENT_SCOPE)

src/SolidMaterial/ShadowANEOS.py.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ ANEOS can be constructed one of two ways:
2424

2525
1. Using internal material input parameters from the Github repository for one of:
2626
- quartz
27-
- dunnite
27+
- dunite
2828
- serpentine
2929
For this constructor you *must* specify the material name as either the first argument or
3030
using the "material=" keyword argument.
3131
*NOTE* : if you use this option you can *only* use this single material for ANEOS (i.e., you
3232
cannot use multiple ANEOS equations of state.)
3333
Supported arguments for this constructor (default values in []):
3434
material : Label for the material (required for this constructor, one of the above)
35-
units : Units the user wants to work in (required)
35+
constants : Units the user wants to work in (required)
3636
numRhoVals : [500] number of rho values to build table
3737
numTvals : [500] number of temperature values to build table
3838
rhoMin : [1e-3 g/cc] lower table bound in density
@@ -55,7 +55,7 @@ ANEOS can be constructed one of two ways:
5555
rhoMax : [100 g/cc] upper table bound in density
5656
Tmin : [1K] lower table bound in temperature
5757
Tmax : [1e6K] upper table bound in temperature
58-
units : Units the user wants to work in (required) *REQUIRED*
58+
constants : Units the user wants to work in (required) *REQUIRED*
5959
externalPressure : [0.0] external pressure
6060
minimumPressure : [-inf] minimum pressure
6161
maximumPressure : [inf] maximum pressure
@@ -98,7 +98,7 @@ def _ANEOSFactory(RealConstructor,
9898
(len(args) < iarg + 1 and not arg in kwargs)):
9999
raise ValueError, ("ANEOS error: did not provide required arguments %s.\n" % arg) + expectedUsageString
100100
if (len(args) > len(cppArgs) or
101-
min([arg in cppArgs for arg in kwargs] + [True]) == False):
101+
min([arg in allArgs for arg in kwargs] + [True]) == False):
102102
raise ValueError, "ANEOS unexpected argument.\n" + expectedUsageString
103103

104104
# Are we using one of the provided, canned materials?
@@ -111,8 +111,8 @@ def _ANEOSFactory(RealConstructor,
111111
else:
112112
material = None
113113
if material:
114-
if material not in ("quartz", "dunnite", "serpentine"):
115-
raise ValueError, "ANEOS: material must be one of (quartz, dunnite, serpentine), passed %s" % material
114+
if material not in ("quartz", "dunite", "serpentine"):
115+
raise ValueError, "ANEOS: material must be one of (quartz, dunite, serpentine), passed %s" % material
116116
filename = os.path.join("@ANEOS_INPUT_DEST_DIR@", {"quartz" : "quartz_.input",
117117
"dunite" : "dunite_.input",
118118
"serpentine" : "serpent.input"}[material])

0 commit comments

Comments
 (0)