Salome HOME
*** empty log message ***
authorcs <cs>
Sun, 11 Mar 2007 16:47:41 +0000 (16:47 +0000)
committercs <cs>
Sun, 11 Mar 2007 16:47:41 +0000 (16:47 +0000)
idl/MULTIPR.idl
src/MULTIPR/MULTIPR_DecimationFilter.cxx
src/MULTIPR/MULTIPR_MeshDis.cxx
src/MULTIPR/multipr.cxx
src/MULTIPRGUI/MULTIPR_GUI_Dlg.cxx

index 34ff91f86b5addfd23370c2d0b2a0ffb8fa95d76..9b0e860edef7bcfdafe913972d88f82ed8d3f022 100644 (file)
@@ -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)
index cef938071a8aa1a8c499e2f75d9fd3fa479301c8..82f226b7b787d224101809042bc203df2c8b21d0 100644 (file)
@@ -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++)
        {
index 4f2a301699d4fedc56240923f22baba92e5162d5..5c7b646980be7a782b6856b1edd29da2153f4db2 100644 (file)
@@ -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;
index 332412f0c374e77bfc71f04d26974bea8764d100..c542fdf3a09788e2fdad41c5725b9f60f5f17459 100644 (file)
@@ -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)
        {
index 526e70d0ac1cbaea8b09ce2d898f1e7e5edd3fb8..0a3ee2d65068ef06e74a6d4bbb68963435bae3f8 100644 (file)
@@ -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" ) );