From 38b54ecf34663cb857f020873e103ccb802b7922 Mon Sep 17 00:00:00 2001 From: cs Date: Sun, 11 Mar 2007 16:47:41 +0000 Subject: [PATCH] *** empty log message *** --- idl/MULTIPR.idl | 1 + src/MULTIPR/MULTIPR_DecimationFilter.cxx | 5 +++-- src/MULTIPR/MULTIPR_MeshDis.cxx | 6 ++++-- src/MULTIPR/multipr.cxx | 12 +++++++++--- src/MULTIPRGUI/MULTIPR_GUI_Dlg.cxx | 4 +++- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/idl/MULTIPR.idl b/idl/MULTIPR.idl index 34ff91f..9b0e860 100644 --- a/idl/MULTIPR.idl +++ b/idl/MULTIPR.idl @@ -158,6 +158,7 @@ interface MULTIPR_Obj /*! * 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) diff --git a/src/MULTIPR/MULTIPR_DecimationFilter.cxx b/src/MULTIPR/MULTIPR_DecimationFilter.cxx index cef9380..82f226b 100644 --- a/src/MULTIPR/MULTIPR_DecimationFilter.cxx +++ b/src/MULTIPR/MULTIPR_DecimationFilter.cxx @@ -218,8 +218,9 @@ void DecimationFilterGradAvg::getGradientInfo( *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++) { diff --git a/src/MULTIPR/MULTIPR_MeshDis.cxx b/src/MULTIPR/MULTIPR_MeshDis.cxx index 4f2a301..5c7b646 100644 --- a/src/MULTIPR/MULTIPR_MeshDis.cxx +++ b/src/MULTIPR/MULTIPR_MeshDis.cxx @@ -566,7 +566,9 @@ void MeshDis::decimatePart( const char* originalFilename = part->getMEDFileName(); string strPrefix = removeExtension(originalFilename, ".med"); -cout << (*this) << endl; + // debug + //cout << (*this) << endl; + //--------------------------------------------------------------------- // Decimates the given mesh //--------------------------------------------------------------------- @@ -846,7 +848,7 @@ int convertMedsplitterToMultipr(ofstream& pFileMaster, const char* pTmpFilename, // 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; diff --git a/src/MULTIPR/multipr.cxx b/src/MULTIPR/multipr.cxx index 332412f..c542fdf 100644 --- a/src/MULTIPR/multipr.cxx +++ b/src/MULTIPR/multipr.cxx @@ -81,6 +81,7 @@ char* g_medFilename = NULL; 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; @@ -150,7 +151,7 @@ void printUsage() 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; @@ -272,7 +273,7 @@ void parseCommandLine(int argc, char** argv) } 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; @@ -283,6 +284,11 @@ void parseCommandLine(int argc, char** argv) 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) @@ -471,7 +477,7 @@ int runPartition2() g_medFilename, g_partName, g_nbParts, - multipr::MULTIPR_METIS); + g_splitter); } catch (multipr::RuntimeException& e) { diff --git a/src/MULTIPRGUI/MULTIPR_GUI_Dlg.cxx b/src/MULTIPRGUI/MULTIPR_GUI_Dlg.cxx index 526e70d..0a3ee2d 100644 --- a/src/MULTIPRGUI/MULTIPR_GUI_Dlg.cxx +++ b/src/MULTIPRGUI/MULTIPR_GUI_Dlg.cxx @@ -341,9 +341,11 @@ MULTIPR_GUI_DecimateDlg::MULTIPR_GUI_DecimateDlg(MULTIPR_GUI* theModule) : 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" ) ); -- 2.39.2