Write fld to output file.
{
string filename =
m_config[
"outfile"].as<
string>();
int i;
{
cout << "OutputInfo: Writing Info file..." << endl;
}
"--nprocs nust be specified with info output");
int nprocs = vm["nprocs"].as<int>();
new FieldConvertComm(0, NULL, nprocs,0));
vComm->SplitComm(1,nprocs);
string xml_ending = "xml";
string xml_gz_ending = "xml.gz";
std::vector<std::string> files;
for (
int i = 0; i <
m_f->m_inputfiles[xml_ending].size(); ++i)
{
files.push_back(
m_f->m_inputfiles[xml_ending][i]);
}
for (
int j =0; j <
m_f->m_inputfiles[xml_gz_ending].size(); ++j)
{
files.push_back(
m_f->m_inputfiles[xml_gz_ending][j]);
}
boost::shared_ptr<LibUtilities::SessionReader>(
vSession->SetUpXmlDoc();
string vPartitionerName = "Metis";
{
vPartitionerName = "Scotch";
}
if (vSession->DefinesCmdLineArgument("use-metis"))
{
vPartitionerName = "Metis";
}
if (vSession->DefinesCmdLineArgument("use-scotch"))
{
vPartitionerName = "Scotch";
}
vPartitionerName, vSession);
vMeshPartition->PartitionMesh(false);
std::vector<std::vector<unsigned int> > ElementIDs(nprocs);
for (i = 0; i < nprocs; ++i)
{
std::vector<unsigned int> tmp;
vMeshPartition->GetElementIDs(i,tmp);
ElementIDs[i] = tmp;
}
std::vector<std::string> filenames;
for(int i = 0; i < nprocs; ++i)
{
boost::format pad("P%1$07d.fld");
pad % i;
filenames.push_back(pad.str());
}
m_f->m_fld->WriteMultiFldFileIDs(filename,filenames, ElementIDs);
}