added: -vtffile and file attribute to <vtfformat> tag
allows specifying the vtf file to use
This commit is contained in:
parent
26499b6685
commit
c88d417860
@ -147,6 +147,11 @@ bool SIMoptions::parseOutputTag (const TiXmlElement* elem)
|
||||
else if (!strcasecmp(elem->FirstChild()->Value(),"binary"))
|
||||
format = 1;
|
||||
}
|
||||
if (utl::getAttribute(elem,"file",vtf)) {
|
||||
size_t pos = vtf.find_last_of('.');
|
||||
if (pos < vtf.size())
|
||||
vtf.erase(pos);
|
||||
}
|
||||
if (utl::getAttribute(elem,"nviz",nViz[0]))
|
||||
nViz[2] = nViz[1] = nViz[0];
|
||||
utl::getAttribute(elem,"nu",nViz[0]);
|
||||
@ -308,6 +313,11 @@ bool SIMoptions::parseOldOptions (int argc, char** argv, int& i)
|
||||
else // use the default output file name
|
||||
hdf5 = "(default)";
|
||||
}
|
||||
else if (!strcmp(argv[i],"-vtffile"))
|
||||
{
|
||||
if (i < argc-1 && argv[i+1][0] != '-')
|
||||
vtf = strtok(argv[++i],".");
|
||||
}
|
||||
else if (!strcmp(argv[i],"-saveInc") && i < argc-1)
|
||||
dtSave = atof(argv[++i]);
|
||||
else if (!strcmp(argv[i],"-restart") && i < argc-1)
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
bool saveNorms;//!< If \e true, save element norms
|
||||
|
||||
std::string hdf5; //!< Prefix for HDF5-file
|
||||
std::string vtf; //!< Prefix for VTF file
|
||||
|
||||
// Restart options
|
||||
int restartInc; //!< Number of increments between each restart output
|
||||
|
@ -274,6 +274,9 @@ bool SIMoutput::writeGlvG (int& nBlock, const char* inpFile, bool doClear)
|
||||
{
|
||||
if (myVtf) return false;
|
||||
|
||||
if (!opt.vtf.empty())
|
||||
inpFile = opt.vtf.c_str();
|
||||
|
||||
#if HAS_VTFAPI == 2
|
||||
const char* ext = ".vtfx";
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user