/*!
* Remove all the parts starting with the given prefix from the distributed MED file.
+ * Example: if prefixPartName="PART_4" => remove "PART_4" and all sub-parts "PART_4_*", but not "PART41".
* Assume this object encapsulates a distributed MED file.
*/
void removeParts(in string prefixPartName)
*pOutGradAvg = 0.0;
int count = 0;
- cout << "numElements=" << numElements << endl;
- cout << "num gauss pt by elt=" << numGaussPointsByElt << endl;
+ //cout << "numElements=" << numElements << endl;
+ //cout << "num gauss pt by elt=" << numGaussPointsByElt << endl;
+
// for each element
for (int itElt = 0 ; itElt < numElements ; itElt++)
{
const char* originalFilename = part->getMEDFileName();
string strPrefix = removeExtension(originalFilename, ".med");
-cout << (*this) << endl;
+ // debug
+ //cout << (*this) << endl;
+
//---------------------------------------------------------------------
// Decimates the given mesh
//---------------------------------------------------------------------
// read number of parts
int nbParts = atoi(charbuffer);
- cout << "nb parts=" << nbParts << endl;
+ //cout << "nb parts=" << nbParts << endl;
char lMeshName[MED_TAILLE_NOM + 1];
int lId;
char* g_meshName = NULL;
char* g_partName = NULL;
int g_nbParts = 0;
+int g_splitter = multipr::MULTIPR_METIS;
char* g_filterName = NULL;
char* g_fieldName = NULL;
int g_fieldTimeStepIt = 0;
cout << " --part1 Extracts all groups from a sequential MED file (V2.2 or higher)" << endl;
cout << " * Usage: --part1 file.med meshName" << endl;
cout << " --part2 Split a group of a distributed MED file (V2.3) produced with --part1" << endl;
- cout << " * Usage: --part2 file.med partName nbParts" << endl;
+ cout << " * Usage: --part2 file.med partName nbParts [splitter (0=METIS 1=SCOTCH)]" << endl;
cout << " --decim Generates 3 level of details (full, medium and low) of a part" << endl;
cout << " of a distributed MED file (V2.3)" << endl;
cout << " * Usage: --decim file.med partName fieldName fieldIt filterName [...]" << endl;
}
else if (strcmp(argv[1],"--part2") == 0)
{
- if (argc != 5)
+ if ((argc != 5) && (argc != 6))
{
g_usage = MULTIPR_USAGE_UNKNOWN;
g_errorCode = MULTIPR_APP_WRONG_NUMBER_OF_ARGUMENTS;
g_medFilename = argv[2];
g_partName = argv[3];
g_nbParts = atoi(argv[4]);
+
+ if (argc == 6)
+ {
+ g_splitter = atoi(argv[5]);
+ }
}
}
else if (strcmp(argv[1],"--decim") == 0)
g_medFilename,
g_partName,
g_nbParts,
- multipr::MULTIPR_METIS);
+ g_splitter);
}
catch (multipr::RuntimeException& e)
{
pushButtonCancel = new QPushButton( buttonGroupProcess, "pushButtonCancel" );
pushButtonCancel->setGeometry( QRect( 321, 10, 110, 41 ) );
-
+ pushButtonCancel->setAccel( QKeySequence( tr( "Esc" ) ) );
+
pushButtonOK = new QPushButton( buttonGroupProcess, "pushButtonOK" );
pushButtonOK->setGeometry( QRect( 10, 10, 110, 41 ) );
+ pushButtonOK->setAccel( QKeySequence( tr( "Return" ) ) );
setCaption( tr( "Decimation" ) );
buttonGroupSelectField->setTitle( tr( "Select field" ) );