1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

PerambFileName defaults to object name if empty

This commit is contained in:
Michael Marshall 2019-10-20 14:14:06 +01:00
parent 519ce19128
commit decab587a0

View File

@ -111,7 +111,11 @@ template <typename FImpl>
void TLoadPerambulator<FImpl>::execute(void)
{
auto &perambulator = envGet(MDistil::PerambTensor, getName());
const std::string sPerambName{par().PerambFileName + "." + std::to_string(vm().getTrajectory())};
std::string sPerambName{ par().PerambFileName };
if( sPerambName.empty() )
sPerambName = getName();
sPerambName.append( 1, '.' );
sPerambName.append( std::to_string( vm().getTrajectory() ) );
perambulator.read(sPerambName.c_str());
}