Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion expui/BiorthBasis.H
Original file line number Diff line number Diff line change
Expand Up @@ -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<Eigen::MatrixXd> potd, dpot, dpt2, dend;
std::vector<Eigen::MatrixXd> legs, dlegs, d2legs;
Expand Down
9 changes: 6 additions & 3 deletions expui/BiorthBasis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
22 changes: 8 additions & 14 deletions expui/CoefStruct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<coefType>(ret->store.data(), mmax+1, nmax);
Expand All @@ -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<coefType>
Expand All @@ -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<coefType>(ret->store.data(), nx, ny, nz);
Expand All @@ -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<coefType>(ret->store.data(), nx, ny, nz);
Expand All @@ -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<coefType>(ret->store.data(), cols);
Expand All @@ -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<coefType>(ret->store.data(), traj, rank);
Expand All @@ -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<coefType>
Expand All @@ -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<coefType>
Expand Down
15 changes: 15 additions & 0 deletions expui/Coefficients.H
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ namespace CoefClasses
//! Unit validator
static UnitValidator check;

//! Units required for HDF5
virtual bool unitsRequired() { return true; }

public:

//! Constructor
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion expui/Coefficients.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down
4 changes: 2 additions & 2 deletions exputil/EmpCylSL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pyEXP/BasisWrappers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ void BasisFactoryClasses(py::module &m)

py::class_<BasisClasses::Basis, std::shared_ptr<BasisClasses::Basis>, 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

Expand Down
2 changes: 1 addition & 1 deletion pyEXP/CoefWrappers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cylinder.H
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/Cylinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/OutVel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down