diff --git a/CMakeLists.txt b/CMakeLists.txt index 7926ab243..1e0ecc5bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25) # Needed for CUDA, MPI, and CTest features project( EXP - VERSION "7.9.1" + VERSION "7.9.0" HOMEPAGE_URL https://github.com/EXP-code/EXP LANGUAGES C CXX Fortran) diff --git a/expui/BiorthBasis.H b/expui/BiorthBasis.H index dba7b1671..f40875985 100644 --- a/expui/BiorthBasis.H +++ b/expui/BiorthBasis.H @@ -969,7 +969,7 @@ namespace BasisClasses int ncylodd, ncylnx, ncylny, ncylr, cmap, cmapR, cmapZ, vflag; int rnum, pnum, tnum; double rcylmin, rcylmax, acyl, hcyl; - bool expcond, logarithmic, density, EVEN_M, sech2 = false; + bool expcond, logarithmic, density, EVEN_M, sech2 = true; std::vector potd, dpot, dpt2, dend; std::vector legs, dlegs, d2legs; diff --git a/expui/BiorthBasis.cc b/expui/BiorthBasis.cc index 3b0e3bef2..d8574afcb 100644 --- a/expui/BiorthBasis.cc +++ b/expui/BiorthBasis.cc @@ -1658,9 +1658,12 @@ namespace BasisClasses case DiskType::doubleexpon: case DiskType::exponential: case DiskType::diskbulge: - std::cout << "---- pyEXP uses sech^2(z/h) rather than the more common sech^2(z/(2h))" << std::endl - << "---- Use the 'sech2: true' in your YAML config to use sech^2(z/(2h))" << std::endl - << "---- pyEXP will assume sech^2(z/(2h)) by default in v 7.9.0 and later" << std::endl; + std::cout << "---- pyEXP assumes sech^2(z/(2h)) by default in v7.9.0 and later" << std::endl + << "---- Use the 'sech2: true' in your YAML config to use sech^2(z/(2h))" << std::endl + << "---- This warning will be removed in v7.10.0." << std::endl; + break; + default: + break; } } } diff --git a/expui/CoefStruct.cc b/expui/CoefStruct.cc index 786c4eaa3..7baaff24c 100644 --- a/expui/CoefStruct.cc +++ b/expui/CoefStruct.cc @@ -110,8 +110,7 @@ namespace CoefClasses copyfields(ret); - assert(("CylStruct::deepcopy dimension mismatch", - (mmax+1)*nmax == store.size())); + assert((mmax+1)*nmax == store.size() && "CylStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared(ret->store.data(), mmax+1, nmax); @@ -128,8 +127,7 @@ namespace CoefClasses copyfields(ret); - assert(("SphStruct::deepcopy dimension mismatch", - (lmax+1)*(lmax+2)/2*nmax == store.size())); + assert((lmax+1)*(lmax+2)/2*nmax == store.size() && "SphStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared @@ -149,7 +147,7 @@ namespace CoefClasses copyfields(ret); - assert(("SlabStruct::deepcopy dimension mismatch", dim == store.size())); + assert((dim == store.size()) && "SlabStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared(ret->store.data(), nx, ny, nz); @@ -171,7 +169,7 @@ namespace CoefClasses copyfields(ret); - assert(("CubeStruct::deepcopy dimension mismatch", dim == store.size())); + assert((dim == store.size()) && "CubeStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared(ret->store.data(), nx, ny, nz); @@ -193,8 +191,7 @@ namespace CoefClasses copyfields(ret); - assert(("TblStruct::deepcopy dimension mismatch", - cols == store.size())); + assert((cols == store.size()) && "TblStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared(ret->store.data(), cols); @@ -209,8 +206,7 @@ namespace CoefClasses copyfields(ret); - assert(("TrajStruct::deepcopy dimension mismatch", - traj*rank == store.size())); + assert((traj*rank == store.size()) && "TrajStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared(ret->store.data(), traj, rank); @@ -226,8 +222,7 @@ namespace CoefClasses copyfields(ret); - assert(("SphFldStruct::deepcopy dimension mismatch", - nfld*(lmax+1)*(lmax+2)/2*nmax == store.size())); + assert(nfld*(lmax+1)*(lmax+2)/2*nmax == store.size() && "SphFldStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared @@ -246,8 +241,7 @@ namespace CoefClasses copyfields(ret); - assert(("CylFldStruct::deepcopy dimension mismatch", - nfld*(mmax+1)*nmax == store.size())); + assert((nfld*(mmax+1)*nmax == store.size()) && "CylFldStruct::deepcopy dimension mismatch"); ret->C = C; ret->coefs = std::make_shared diff --git a/expui/Coefficients.H b/expui/Coefficients.H index 98fbed4f6..061f42ac9 100644 --- a/expui/Coefficients.H +++ b/expui/Coefficients.H @@ -120,6 +120,9 @@ namespace CoefClasses //! Unit validator static UnitValidator check; + //! Units required for HDF5 + virtual bool unitsRequired() { return true; } + public: //! Constructor @@ -849,6 +852,9 @@ namespace CoefClasses //! Write coefficient data in H5 virtual unsigned WriteH5Times(HighFive::Group& group, unsigned count); + //! Units required for HDF5 + virtual bool unitsRequired() { return false; } + public: //! Constructor @@ -955,6 +961,9 @@ namespace CoefClasses //! Write coefficient data in H5 virtual unsigned WriteH5Times(HighFive::Group& group, unsigned count); + //! Units required for HDF5 + virtual bool unitsRequired() { return false; } + public: //! Constructor @@ -1066,6 +1075,9 @@ namespace CoefClasses //! Write coefficient data in H5 virtual unsigned WriteH5Times(HighFive::Group& group, unsigned count); + //! Units required for HDF5 + virtual bool unitsRequired() { return false; } + public: //! Constructor @@ -1193,6 +1205,9 @@ namespace CoefClasses //! Write coefficient data in H5 virtual unsigned WriteH5Times(HighFive::Group& group, unsigned count); + //! Units required for HDF5 + virtual bool unitsRequired() { return false; } + public: //! Constructor diff --git a/expui/Coefficients.cc b/expui/Coefficients.cc index 77b9b68a0..dc7444dca 100644 --- a/expui/Coefficients.cc +++ b/expui/Coefficients.cc @@ -151,7 +151,7 @@ namespace CoefClasses void Coefs::WriteH5Units(HighFive::File& file) { - if (units.size() != 4) { + if (unitsRequired() and units.size() != 4) { std::ostringstream sout; sout << "---- Coefs::WriteH5Units: Warning, expected 4 units: " << "(length, mass, time, G) or (length, mass, velocity, G), etc. " diff --git a/exputil/EmpCylSL.cc b/exputil/EmpCylSL.cc index b99ddbb3e..a89afa68e 100644 --- a/exputil/EmpCylSL.cc +++ b/exputil/EmpCylSL.cc @@ -267,7 +267,7 @@ EmpCylSL::EmpCylSL(int mlim, std::string cachename) if (myid==0) std::cout << "---- EmpCylSL::ReadH5Cache: " << "using a workaround for a HighFive HDF5 wrapper bug. " - << "this workaround will be removed in EXP 7.9.0. " + << "this workaround will be removed in EXP 7.10.0. " << "Please consider rebuilding your cache if possible!" << std::endl; } @@ -7502,7 +7502,7 @@ bool EmpCylSL::ReadH5Cache() if (myid==0) std::cout << "---- EmpCylSL::ReadH5Cache: " << "using a workaround for a HighFive HDF5 wrapper bug. " - << "this workaround will be removed in EXP 7.9.0. " + << "this workaround will be removed in EXP 7.10.0. " << "Please consider rebuilding your cache if possible!" << std::endl; } else { diff --git a/pyEXP/BasisWrappers.cc b/pyEXP/BasisWrappers.cc index 79a4e2f0d..f16390a64 100644 --- a/pyEXP/BasisWrappers.cc +++ b/pyEXP/BasisWrappers.cc @@ -906,7 +906,7 @@ void BasisFactoryClasses(py::module &m) py::class_, PyBasis> (m, "Basis") - .def("factory", &BasisClasses::BiorthBasis::factory_string, + .def("factory", &BasisClasses::Basis::factory_string, R"( Generate a basis from a YAML configuration supplied as a string diff --git a/pyEXP/CoefWrappers.cc b/pyEXP/CoefWrappers.cc index d8dead5ec..d81054bb1 100644 --- a/pyEXP/CoefWrappers.cc +++ b/pyEXP/CoefWrappers.cc @@ -1281,7 +1281,7 @@ void CoefficientClasses(py::module &m) { .def("WriteH5Coefs", [](CoefClasses::Coefs& self, const std::string& filename) { if (self.getUnits().size()!=4) { - std::cout << "Coefs::WriteH5Coefs: please set units for your coefficient set using the `setUnit()` member," << std::endl + std::cout << "Coefs::WriteH5Coefs: please set units for your coefficient set using the `setUnits()` member," << std::endl << " one for each unit. We suggest explicitly setting 'G', 'Length', 'Mass'," << std::endl << " 'Time', or optionally 'Velocity' before writing HDF5 coefficients" << std::endl; } diff --git a/src/Cylinder.H b/src/Cylinder.H index 0b39901e6..d7fcac153 100644 --- a/src/Cylinder.H +++ b/src/Cylinder.H @@ -127,7 +127,7 @@ class Cylinder : public Basis { private: - bool precond, EVEN_M, subsamp, sech2 = false; + bool precond, EVEN_M, subsamp, sech2 = true; int rnum, pnum, tnum; double ashift; unsigned int vflag; diff --git a/src/Cylinder.cc b/src/Cylinder.cc index b33e5132e..448a5f769 100644 --- a/src/Cylinder.cc +++ b/src/Cylinder.cc @@ -461,9 +461,9 @@ void Cylinder::initialize() // Deprecation warning if (not sech2 and not conf["pyname"]) { if (myid==0) - std::cout << "---- Cylinder uses sech^2(z/h) rather than the more common sech^2(z/(2h))" << std::endl - << "---- Use the 'sech2: true' in your YAML config to use sech^2(z/(2h))" << std::endl - << "---- Cylinder will assume sech^2(z/(2h)) by default in v 7.9.0 and later" << std::endl; + std::cout << "---- Cylinder assumes sech^2(z/(2h)) by default in v7.9.0 and later" << std::endl + << "---- Use the 'sech2: true' in your YAML config to use sech^2(z/(2h))" << std::endl + << "---- This warning will be removed in v7.10.0." << std::endl; } // Deprecation warning diff --git a/src/OutVel.cc b/src/OutVel.cc index 5d4830d1c..8f3a6447d 100644 --- a/src/OutVel.cc +++ b/src/OutVel.cc @@ -186,7 +186,7 @@ void OutVel::Run(int n, int mstep, bool last) double v = it->second->vel[1]; double w = it->second->vel[2]; - basis->accumulate(M, x, y, z, u, v, w); + basis->accumulate(x, y, z, u, v, w, M); } } }