Skip to content

Commit 31925de

Browse files
author
Martin D. Weinberg
committed
Need to define DTYPE before cache check
1 parent fc16ed9 commit 31925de

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

expui/BiorthBasis.cc

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,17 @@ namespace BasisClasses
16091609
{DiskType::python, "python"}
16101610
};
16111611

1612-
// Checking for cache consistency with current DiskType and Python module (if applicable)
1612+
// Convert dtype string to lower case
1613+
//
1614+
std::transform(dtype.begin(), dtype.end(), dtype.begin(),
1615+
[](unsigned char c){ return std::tolower(c); });
1616+
1617+
1618+
// Check for map entry, will throw if the key is not in the map.
1619+
DTYPE = dtlookup.at(dtype);
1620+
1621+
// Checking for cache consistency with current DiskType and Python
1622+
// module (if applicable)
16131623
//
16141624
if (cache_status == 1) {
16151625

@@ -1796,17 +1806,10 @@ namespace BasisClasses
17961806
throw std::runtime_error("Cylindrical:initialize: EmpCylSL bad parameter");
17971807
}
17981808

1799-
// Convert dtype string to lower case
1800-
//
1801-
std::transform(dtype.begin(), dtype.end(), dtype.begin(),
1802-
[](unsigned char c){ return std::tolower(c); });
1803-
18041809
// Set DiskType. This is the functional form for the disk used to
18051810
// condition the basis.
18061811
//
1807-
try { // Check for map entry, will throw if the
1808-
DTYPE = dtlookup.at(dtype); // key is not in the map.
1809-
1812+
try {
18101813
if (myid==0) { // Report DiskType
18111814
std::cout << "---- DiskType is <" << dtype << ">" << std::endl;
18121815

0 commit comments

Comments
 (0)