------------------------
MULTIPR a besoin des prerequis suivants:
1. Salome V3.2
- 2. MESPLITTER (branche CVS WP1_2_3_17-01-2007_Data_format_at_entry_of_visualization_pipeline)
+ 2. MESPLITTER (branche MED sur CVS : WP1_2_3_17-01-2007_Data_format_at_entry_of_visualization_pipeline)
3. MED fichier v2.3
4. METIS v4.0.1 (version NON modifiee par EDF)
5. SCOTCH v4
Renommer la fonction log2 en log2_ dans metis\lib\proto.h
(sinon, un conflit se produit)
-Depuis le repertoire contenant WP1_2_3_17-01-2007_Data_format_at_entry_of_visualization_pipeline :
+Depuis le repertoire MED contenant WP1_2_3_17-01-2007_Data_format_at_entry_of_visualization_pipeline :
9. Creer un repertoire Build et un repertoire MED au cote de MED_SRC
10. Dans le repertoire MED_SRC, faire ./build_configure
11. Depuis le repertoire Build, faire (en remplacant les <...> par les bons répertoires)
../MULTIPR_SRC/configure --prefix=<PATH>/MULTIPR --enable-production=yes --disable-debug
21. Puis : make
22. Puis : make install
+
+
+Information supplementaire :
+Pour compiler MULTIPR, les 8 variables d'environnement suivantes doivent etre definies :
+KERNEL_ROOT_DIR, GUI_ROOT_DIR, MED_ROOT_DIR, MED2HOME, HDF5HOME, OMNIORBDIR, CASROOT, QTDIR
+L'existence de ces variables est teste par le script build_configure.
*******************************************************************************
GUI_LDFLAGS=@GUI_LDFLAGS@
GUI_CXXFLAGS=@GUI_CXXFLAGS@
+MED_ROOT_DIR=@MED_ROOT_DIR@
+MED_LDFLAGS=@MED_LDFLAGS@
+MED_CXXFLAGS=@MED_CXXFLAGS@
+
## Installation points
prefix=@prefix@
exec_prefix=@exec_prefix@
$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
$(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%)
cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
- -I @GUI_ROOT_DIR@/adm_local/unix/config_files
+ -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
+ -I @MED_ROOT_DIR@/adm_local/unix/config_files
m.setMesh(liste_maillages[0])
m.partitionneDomaine()
m.getParts()
- m.save()
+ m.save('')
m.decimePartition('MAIL_99', 'SIG_____SIEF_ELGA_______________', 12, 'Filtre_GradientMoyen', 10, 25, 0.3)
liste_grains = m.getParts()
- m.save()
+ m.save('')
m.partitionneGrain('MAIL_98', 3, 0)
- m.save()
+ m.save('')
m.getParts()
m.getMeshes()
m.getFields()
liste_champs = m.getFields()
m.getTimeStamps(liste_champs[3])
m.decimePartition('MAIL_99', 'SIG_____SIEF_ELGA_______________', 12, 'Filtre_GradientMoyen', 10, 25, 0.3)
- m.save()
+ m.save('')
m.getMeshes()
m.getParts()
m.getFields()
m.getMeshes()
m.getParts()
m.getFields()
- m.save()
+ m.save('')
def multipr_test4(clt,path):
for grain in liste_grains[0:4]:
m.decimePartition(grain, liste_champs[1], 12, 'Filtre_GradientMoyen', 10, 25, 0.3)
m.getParts()
- m.save()
+ m.save('')
def multipr_test6(clt,path):
for grain in liste_pgrain[0:11]:
m.decimePartition(grain, liste_champs[1], 12, 'Filtre_GradientMoyen', 10, 25, 0.5)
m.getParts()
- m.save()
+ m.save('')
n = engine.getObject(path+'/agregat100grains_12pas_grains_maitre.med')
n.getParts()
exit
fi
+########################################################################
+# Test if the CASROOT is set correctly
+
+if test ! -d "${CASROOT}"; then
+ echo "failed : CASROOT variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the QTDIR is set correctly
+
+if test ! -d "${QTDIR}"; then
+ echo "failed : QTDIR variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the OMNIORBDIR is set correctly
+
+if test ! -d "${OMNIORBDIR}"; then
+ echo "failed : OMNIORBDIR variable is not correct !"
+ exit
+fi
+
########################################################################
# find_in - utility function
#
*/
boolean isValidDistributedMEDFile();
+ /*!
+ * Return the name of the associated MED file.
+ */
+ string getFilename()
+ raises (SALOME::SALOME_Exception);
+
/*!
* Set the mesh to be partitionned/decimated.
* Assume sequential MED file.
/*!
* Save the current distributed MED file to disk.
*/
- void save()
+ void save(in string path)
raises (SALOME::SALOME_Exception);
}; // interface MULTIPR_Obj
void Mesh::readSequentialMED(const char* pMEDfilename, const char* pMeshName)
{
+ //cout << "File: |" << multipr::getFilenameWithoutPath(pMEDfilename) << "|" << endl;
+ //cout << "Path: |" << multipr::getPath(pMEDfilename) << "|" << endl;
+
reset();
//---------------------------------------------------------------------
void MeshDis::splitPart(const char* pPartName, int pNbParts, int pPartitionner)
{
+ cout << "MULTIPR: MeshDis::splitPart()" << endl;
if (pPartName == NULL) throw NullArgumentException("", __FILE__, __LINE__);
if (pNbParts < 2) throw IllegalArgumentException("", __FILE__, __LINE__);
if ((pPartitionner != MULTIPR_METIS) && (pPartitionner != MULTIPR_SCOTCH)) throw IllegalArgumentException("should be 0=METIS or 1=SCOTCH", __FILE__, __LINE__);
+ cout << "MULTIPR: MeshDis::splitPart(): args OK" << endl;
//---------------------------------------------------------------------
// Find the MED file corresponding to the given part
//---------------------------------------------------------------------
{
throw IllegalArgumentException("part not found in this distributed MED file", __FILE__, __LINE__);
}
+
+ cout << "MULTIPR: MeshDis::splitPart(): find part OK" << endl;
//---------------------------------------------------------------------
// Load the sequential MED file
MEDSPLITTER::MESHCollection* collection;
collection = new MEDSPLITTER::MESHCollection(part->getMEDFileName(), part->getMeshName());
+ cout << "MULTIPR: MeshDis::splitPart(): MEDSPLITTER collection OK" << endl;
//---------------------------------------------------------------------
// Partition the group
//---------------------------------------------------------------------
{
try
{
+ cout << "MULTIPR: try to create partition using SCOTCH: #parts=" << pNbParts << endl;
topology = collection->createPartition(pNbParts, MEDSPLITTER::Graph::SCOTCH);
+ cout << "MULTIPR: assigned SCOTCH" << endl;
}
catch (...)
{
}
catch (...)
{
+ cout << "MEDSPLITTER error: new MESHCollection()" << endl;
throw RuntimeException("MEDSPLITTER error: new MESHCollection()", __FILE__, __LINE__);
}
}
/**
* Retrieves the output of MEDSPLITTER and convert it for MULTIPR.
*/
-int convertMedsplitterToMultipr(ofstream& pFileMaster, const char* pTmpFilename, int pId, MeshDisPart* pPart)
+int convertMedsplitterToMultipr(ofstream& pFileMaster, const char* pTmpFilename, int pId, MeshDisPart* pPart, string pDestPath)
{
MULTIPR_LOG("convert" << endl);
//cout << lMeshName << " " << (pId + i) << " " << pPart->getPartName() << "_" << (i + 1) << " " << lPath << " " << lMEDFileName << endl;
+ string strDestFilename = pDestPath + multipr::getFilenameWithoutPath(lMEDFileName);
+ if (strcmp(lMEDFileName, strDestFilename.c_str()) != 0)
+ {
+ multipr::copyFile(lMEDFileName, pDestPath.c_str());
+ strcpy(lMEDFileName, strDestFilename.c_str());
+ }
+
pFileMaster << lMeshName << " " << (pId + i) << " " << pPart->getPartName() << "_" << (i + 1) << " " << lPath << " " << lMEDFileName << endl;
}
strMasterFilename = strPrefix + strExtension;
}
+ string strDestPath = multipr::getPath(strMasterFilename.c_str());
+
MULTIPR_LOG("Create master: " << strMasterFilename << endl);
strcpy(mMEDfilename, strMasterFilename.c_str());
{
mParts[itPart]->mId = id;
id++;
+
+ // copy file in another directory?
+ string strSrcPath = multipr::getPath(mParts[itPart]->getMEDFileName());
+ if (strSrcPath != strDestPath)
+ {
+ cout << "Write: KEEP_AS_IT: copy file" << endl;
+ string strDestFilename = strDestPath + multipr::getFilenameWithoutPath(mParts[itPart]->getMEDFileName());
+ multipr::copyFile(mParts[itPart]->getMEDFileName(), strDestPath.c_str());
+ strcpy(mParts[itPart]->mMEDFileName, strDestFilename.c_str());
+ }
+
fileMaster << (*mParts[itPart]) << endl;
cout << (*mParts[itPart]) << endl;
break;
{
if (strlen(mParts[itPart]->getMEDFileName()) == 0) throw IOException("MED filename is empty", __FILE__, __LINE__);
if (mParts[itPart]->mMesh == NULL) throw IllegalStateException("invalid mesh (shoult not be NULL)", __FILE__, __LINE__);
+
+ string strDestFilename = strDestPath + multipr::getFilenameWithoutPath(mParts[itPart]->getMEDFileName());
+ strcpy(mParts[itPart]->mMEDFileName, strDestFilename.c_str());
+
mParts[itPart]->mMesh->writeMED(mParts[itPart]->getMEDFileName());
mParts[itPart]->mId = id;
id++;
sprintf(tmpFilename, "%s_part", strPrefix.c_str());
mParts[itPart]->mCollection->write(tmpFilename);
mParts[itPart]->mCollection->castAllFields(*(mParts[itPart]->mOldCollection));
- int ret = convertMedsplitterToMultipr(fileMaster, tmpFilename, id, mParts[itPart]);
+ int ret = convertMedsplitterToMultipr(fileMaster, tmpFilename, id, mParts[itPart], strDestPath);
id += ret;
remove(mParts[itPart]->getMEDFileName());
break;
* \param pId
* \param pPartName
* \param pPath
- * \param pMEDFileName
+ * \param pMEDFileName file name excluding the path.
* \param pMesh can be NULL.
*/
void create(
}
-void Obj::save()
+void Obj::save(const char* pPath)
{
- // only save file if it is a distributed MED file currently in memory
- if (mState == MULTIPR_OBJ_STATE_DIS_MEM)
+ static string prevPath = "";
+
+ // only save file if it is a distributed MED file currently in memory or path has changed
+ if ((mState == MULTIPR_OBJ_STATE_DIS_MEM) || (strcmp(pPath, prevPath.c_str()) != 0))
{
+ prevPath = pPath;
+
//-------------------------------------------------------------
// Write new distributed mesh
//-------------------------------------------------------------
- string strPrefix = multipr::removeExtension(mMEDfilename.c_str(), ".med");
- mMeshDis->writeDistributedMED(strPrefix.c_str());
+ string filename;
+ if (strlen(pPath) == 0)
+ {
+ filename = multipr::removeExtension(mMEDfilename.c_str(), ".med");
+ }
+ else
+ {
+ filename = string(pPath) + string("/") + multipr::getFilenameWithoutPath(mMEDfilename.c_str());
+ }
+ string strPrefix = multipr::removeExtension(filename.c_str(), ".med");
+ mMeshDis->writeDistributedMED(strPrefix.c_str());
mMEDfilename = mMeshDis->getFilename();
cout << "Write MED master file: " << mMEDfilename << ": OK" << endl;
*/
bool isValidDistributedMEDFile() const { return (mState == MULTIPR_OBJ_STATE_DIS) || (mState == MULTIPR_OBJ_STATE_DIS_MEM); }
+ /**
+ * Returns the name of the associated MED file.
+ * \return the name of the associated MED file.
+ */
+ std::string getMEDFilename() const { return mMEDfilename; }
+
/**
* Defines the mesh to be processed.
* \param pMeshName name of the mesh to be partitionned.
/**
* Saves the associated MED file if necessary.
+ * \param pPath path where to save the file.
* \throw IOException if any i/o error occurs.
*/
- void save();
+ void save(const char* pPath);
/**
* Dumps any Obj to the given output stream.
}
+string multipr::getFilenameWithoutPath(const char* pFilename)
+{
+ char* res = strrchr(pFilename, '/');
+ if (res == NULL)
+ {
+ return pFilename;
+ }
+ else
+ {
+ char* name = res + 1;
+ return name;
+ }
+}
+
+
+string multipr::getPath(const char* pFilename)
+{
+ char* res = strrchr(pFilename, '/');
+ if (res == NULL)
+ {
+ return "";
+ }
+ else
+ {
+ int size = res - pFilename + 1;
+ char path[256];
+ memcpy(path, pFilename, size);
+ path[size] = '\0';
+ return path;
+ }
+}
+
+
+void multipr::copyFile(const char* pFilename, const char* pDestDir)
+{
+ const char* srcDir = multipr::getPath(pFilename).c_str();
+ if (strcmp(srcDir, pDestDir) == 0) return;
+
+ const char* filenameWithoutPath = multipr::getFilenameWithoutPath(pFilename).c_str();
+ char pDstFilename[256];
+ sprintf(pDstFilename, "%s%s", pDestDir, filenameWithoutPath);
+
+ FILE* src = fopen(pFilename, "rb");
+ if (src == NULL) return;
+ FILE* dst = fopen(pDstFilename, "wb");
+ if (dst == NULL) return;
+
+ const int size = 65536;
+ char* buf = new char[size];
+ int ret;
+ ret = fread(buf, 1, size, src);
+ while (ret != 0)
+ {
+ fwrite(buf, 1, ret, dst);
+ ret = fread(buf, 1, size, src);
+ }
+
+ delete[] buf;
+ fclose(src);
+ fclose(dst);
+}
+
+
void multipr::printArray2D(
const med_float* pData,
const int pNumElt,
std::string removeExtension(const char* pFilename, const char* pExtension);
+/**
+ * Returns the name of the file, excluding the path.
+ * Example: getFilenameWithoutPath("/home/data/agregat100grains_12pas.med") -> "agregat100grains_12pas.med"
+ * \param pPilename any valid C string ending with the char '\0'.
+ * \return the name of the file, excluding the path.
+ */
+std::string getFilenameWithoutPath(const char* pFilename);
+
+
+/**
+ * Returns the path of the filename (which may be relative or absolute).
+ * Example: getPath("/home/data/agregat100grains_12pas.med") -> "/home/data/"
+ * \param pPilename any valid C string ending with the char '\0'.
+ * \return the path of the filename (which may be relative or absolute).
+ */
+std::string getPath(const char* pFilename);
+
+
+/**
+ * Copies the given file into a directory.
+ * \param pFilename file to be copied.
+ * \param pDestDir destination directory.
+ */
+void copyFile(const char* pFilename, const char* pDestDir);
+
+
/**
* Prints all the elements of a 2D array.
* \param pData all the data (should contain pNumberOfElements * pDimOfElements values)
{
if (mObj != NULL)
{
+ cout << "MULTIPR: Destructor: remove mObj" << endl;
delete mObj;
mObj = NULL;
}
}
+char* MULTIPR_Obj_i::getFilename()
+ throw (SALOME::SALOME_Exception)
+{
+ if (mObj == NULL) THROW_SALOME_CORBA_EXCEPTION("No associated MED file", SALOME::INTERNAL_ERROR);
+
+ return CORBA::string_dup(mObj->getMEDFilename().c_str());
+}
+
+
void MULTIPR_Obj_i::setMesh(const char* meshName)
throw (SALOME::SALOME_Exception)
{
}
-void MULTIPR_Obj_i::save()
+void MULTIPR_Obj_i::save(const char* pPath)
throw (SALOME::SALOME_Exception)
{
if (mObj == NULL) THROW_SALOME_CORBA_EXCEPTION("No associated MED file", SALOME::INTERNAL_ERROR);
try
{
- mObj->save();
+ mObj->save(pPath);
}
catch (multipr::RuntimeException& e)
CORBA::Boolean isValidDistributedMEDFile()
throw (SALOME::SALOME_Exception);
+ /**
+ * Returns the name of the associated MED file.
+ * \return the name of the associated MED file.
+ */
+ char* getFilename()
+ throw (SALOME::SALOME_Exception);
+
/**
* Defines the mesh to be processed.
* \param pMeshName name of the mesh to be partitionned.
/**
* Saves the associated MED file if necessary.
+ * \param pPath path where to save the file.
*/
- void save()
+ void save(const char* pPath)
throw (SALOME::SALOME_Exception);
private:
# additionnal information to compile and link file
-CPPFLAGS += $(KERNEL_CXXFLAGS) -Wno-deprecated -Wparentheses -Wreturn-type -pthread $(MED2_INCLUDES) $(HDF5_INCLUDES) -I$(MED_ROOT_DIR)/include/salome
+CPPFLAGS += $(KERNEL_CXXFLAGS) $(MED_CXXFLAGS) $(MED2_INCLUDES) -Wno-deprecated -Wparentheses -Wreturn-type -pthread
CPPFLAGSFORBIN=$(CPPFLAGS)
-LDFLAGS += $(KERNEL_LDFLAGS) -lSalomeContainer -lOpUtil -lm -lmed -lmedsplitter -lmedmem -lhdf5 -lmed_V2_1 -lSALOMELocalTrace $(MED2_LIBS) $(HDF5_LIBS) -L$(MED_ROOT_DIR)/lib/salome
+LDFLAGS += $(KERNEL_LDFLAGS) $(MED_LDFLAGS) $(MED2_LIBS) -lSalomeContainer -lOpUtil -lm -lmed -lmedsplitter -lmedmem -lmed_V2_1 -lSALOMELocalTrace
LDFLAGSFORBIN=$(LDFLAGS)
// MULTIPR Includes
#include "MULTIPR_GUI.h"
#include "MULTIPR_GUI_Dlg.h"
+#include "MULTIPR_Utils.hxx"
// Salome Includes
#include <SUIT_MessageBox.h>
#include <qimage.h>
#include <qpixmap.h>
#include <qmessagebox.h>
+#include <qaction.h>
+#include <stdexcept>
+
using namespace std;
}
+//*****************************************************************************
+// Global function
+//*****************************************************************************
+
+// singleton
+MULTIPR_ORB::MULTIPR_Gen_ptr GetMultiprGen(const CAM_Module* theModule)
+{
+ static MULTIPR_ORB::MULTIPR_Gen_ptr aGen = NULL;
+
+ if (!aGen)
+ {
+ SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
+ Engines::Component_var aComponent = aLCC.FindOrLoad_Component("FactoryServer", "MULTIPR");
+ aGen = MULTIPR_ORB::MULTIPR_Gen::_narrow(aComponent);
+ if (!CORBA::is_nil(aGen))
+ {
+ //aGen->SetCurrentStudy(GetDSStudy(GetCStudy(GetAppStudy(theModule))));
+ }
+ }
+
+ if (CORBA::is_nil(aGen))
+ throw std::runtime_error("Can't find MULTIPR component");
+
+ return aGen;
+}
+
+
//*****************************************************************************
// Class MULTIPR_GUI implementation
//*****************************************************************************
}
-MULTIPR_ORB::MULTIPR_Obj_ptr MULTIPR_GUI::getMULTIPRObj()
+MULTIPR_GUI::~MULTIPR_GUI()
{
- return mMULTIPRObj;
+ if (mMULTIPRObj != NULL)
+ {
+ CORBA::release(mMULTIPRObj);
+ }
}
-SalomeApp_Application* MULTIPR_GUI::getAppli() const
+MULTIPR_ORB::MULTIPR_Obj_ptr MULTIPR_GUI::getMULTIPRObj()
{
- return getApp();
+ return mMULTIPRObj;
}
-MULTIPR_ORB::MULTIPR_Gen_ptr MULTIPR_GUI::InitMULTIPRGen(SalomeApp_Application* app)
+SalomeApp_Application* MULTIPR_GUI::getAppli() const
{
- Engines::Component_var comp = app->lcc()->FindOrLoad_Component("FactoryServer", "MULTIPR");
- MULTIPR_ORB::MULTIPR_Gen_ptr clr = MULTIPR_ORB::MULTIPR_Gen::_narrow(comp);
- ASSERT(!CORBA::is_nil(clr));
- return clr;
+ return getApp();
}
{
SalomeApp_Module::initialize(app);
- InitMULTIPRGen(dynamic_cast<SalomeApp_Application*>(app));
+ GetMultiprGen(this);
QWidget* aParent = app->desktop();
SUIT_ResourceMgr* aResourceMgr = app->resourceMgr();
QString MULTIPR_GUI::engineIOR() const
{
- CORBA::String_var anIOR = getApp()->orb()->object_to_string(InitMULTIPRGen(getApp()));
+ CORBA::String_var anIOR = getApp()->orb()->object_to_string(GetMultiprGen(this));
return QString(anIOR.in());
}
setMenuShown(true);
setToolShown(true);
+ action(ACTION_IMPORT_MED)->setAccel(QKeySequence(CTRL + Key_I));
+
return bOk;
}
setMenuShown(false);
setToolShown(false);
+ // Unset actions accelerator keys
+ action(ACTION_IMPORT_MED)->setAccel(QKeySequence());
+
return SalomeApp_Module::deactivateModule(theStudy);
}
-
+
void MULTIPR_GUI::windows(QMap<int, int>& theMap) const
{
theMap.clear();
SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg(
this->application()->desktop(),
true,
- tr("MULTIPR_USE_BUILD_PROGRESS") );
+ tr("") );
fd->setCaption(tr("MULTIPR_MEN_IMPORT_FROM_MED_FILE"));
fd->setFilters(aFilter);
- fd->exec();
+ if (fd->exec() == QDialog::Rejected)
+ {
+ delete fd;
+ return;
+ }
+
QFileInfo aFileInfo(fd->selectedFile());
delete fd;
try
{
- MULTIPR_ORB::MULTIPR_Gen_ptr multiprgen = MULTIPR_GUI::InitMULTIPRGen(getApp());
+ MULTIPR_ORB::MULTIPR_Gen_ptr multiprgen = GetMultiprGen(this);
mMULTIPRObj = multiprgen->getObject(mMEDFileName.latin1());
}
catch(...)
getApp()->desktop(),
"Import MED file error",
"Invalid MED file (not recognized by MULTIPR)",
- tr("MULTIPR_OK") );
+ tr("MULTIPR_BUT_OK") );
}
QApplication::restoreOverrideCursor();
getApp()->desktop(),
"Split warning",
"No parts selected",
- tr("MULTIPR_OK") );
+ tr("MULTIPR_BUT_OK") );
return;
}
getApp()->desktop(),
"Decimation warning",
"No parts selected",
- tr("MULTIPR_OK") );
+ tr("MULTIPR_BUT_OK") );
return;
}
getApp()->desktop(),
"Remove warning",
"No parts selected",
- tr("MULTIPR_OK") );
+ tr("MULTIPR_BUT_OK") );
return;
}
getApp()->desktop(),
"Remove error",
"Error while removing selected part(s)",
- tr("MULTIPR_OK") );
+ tr("MULTIPR_BUT_OK") );
}
QApplication::restoreOverrideCursor();
{
return;
}
-
+
+ SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg(
+ this->application()->desktop(),
+ true,
+ tr("") );
+
+ fd->setCaption(tr("Save distributed MED file - Destination directory"));
+ fd->setMode(QFileDialog::DirectoryOnly);
+
+ if (fd->exec() == QDialog::Rejected)
+ {
+ delete fd;
+ return;
+ }
+
+ QFileInfo aFileInfo(fd->selectedFile());
+ delete fd;
+
+ QString path = aFileInfo.filePath();
+
QApplication::setOverrideCursor(Qt::waitCursor);
try
{
- mMULTIPRObj->save();
+ mMULTIPRObj->save(path);
getApp()->updateObjectBrowser();
}
catch(...)
getApp()->desktop(),
"Save distributed MED file error",
"Error while writing distributed MED file",
- tr("MULTIPR_OK") );
+ tr("MULTIPR_BUT_OK") );
}
QApplication::restoreOverrideCursor();
getApp()->desktop(),
"Remove error",
"Error while removing previous results",
- tr("OK") );
+ tr("MULTIPR_BUT_OK") );
}
QApplication::restoreOverrideCursor();
lPath,
lMEDFileName);
- if (ret != 5) return;
+ if (ret != 5)
+ {
+ cout << "MULTIPR: build() tree; error while parsing part info" << endl;
+ std::runtime_error("MULTIPR: build() tree; error while parsing part info");
+ return;
+ }
MULTIPR_GUI_DataObject_Mesh* dataObjectMesh = new MULTIPR_GUI_DataObject_Mesh(modelRoot, lMeshName);
if (ret != 5) return;
- //cout << "Part : " << lPartName << endl;
if ((strstr(lPartName,"_MED") != NULL) || (strstr(lPartName,"_LOW") != NULL))
{
- //cout << "Found MED/LOW" << endl;
new MULTIPR_GUI_DataObject_Resolution(dataObjectPart_prev, strItem, strPartInfo);
}
else
MULTIPR_GUI();
+ virtual ~MULTIPR_GUI();
+
void initialize(CAM_Application*);
QString engineIOR() const;
void selected(QStringList&, const bool);
- static MULTIPR_ORB::MULTIPR_Gen_ptr InitMULTIPRGen(SalomeApp_Application*);
-
const QStringList& getSelectedParts() const { return mSelectedParts; }
public slots:
buttonGroupProcess = new QButtonGroup( this, "buttonGroupProcess" );
buttonGroupProcess->setGeometry( QRect( 10, 110, 450, 60 ) );
+ pushButtonOK = new QPushButton( buttonGroupProcess, "pushButtonOK" );
+ pushButtonOK->setGeometry( QRect( 10, 10, 110, 41 ) );
+
pushButtonCancel = new QPushButton( buttonGroupProcess, "pushButtonCancel" );
pushButtonCancel->setGeometry( QRect( 321, 10, 110, 41 ) );
- pushButtonOK = new QPushButton( buttonGroupProcess, "pushButtonOK" );
- pushButtonOK->setGeometry( QRect( 10, 10, 110, 41 ) );
-
buttonGroupSelectMesh = new QButtonGroup( this, "buttonGroupSelectMesh" );
buttonGroupSelectMesh->setGeometry( QRect( 10, 10, 450, 91 ) );
for (QStringList::const_iterator it = partsList.begin(), last = partsList.end(); it != last; it++)
{
const QString& partName = (*it);
- cout << "Split " << partName.latin1() << " #parts=" << nbParts << " splitter=" << strSplitter << endl;
+ //cout << "Split " << partName.latin1() << " #parts=" << nbParts << " splitter=" << strSplitter << endl;
mModule->getMULTIPRObj()->partitionneGrain(partName.latin1(), nbParts, partitionner);
}
buttonGroupProcess = new QButtonGroup( this, "buttonGroupProcess" );
buttonGroupProcess->setGeometry( QRect( 10, 480, 450, 60 ) );
+ pushButtonOK = new QPushButton( buttonGroupProcess, "pushButtonOK" );
+ pushButtonOK->setGeometry( QRect( 10, 10, 110, 41 ) );
+
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" ) );
msgid "MULTIPR_FLT_MED_FILES"
msgstr "MED Files (*.med)"
-msgid "MULTIPR_USE_BUILD_PROGRESS"
-msgstr "Use build progress"
# additionnal information to compil and link file
-CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) $(KERNEL_CXXFLAGS) $(GUI_CXXFLAGS) $(MED2_INCLUDES) $(HDF5_INCLUDES) -I$(MED_ROOT_DIR)/include/salome
-CXXFLAGS += $(KERNEL_CXXFLAGS) $(GUI_CXXFLAGS)
-LDFLAGS += -lSalomeApp -lMULTIPREngine $(KERNEL_LDFLAGS) $(GUI_LDFLAGS) -lmed -lmedsplitter -lmedmem -lhdf5 -lmed_V2_1 -lSALOMELocalTrace $(MED2_LIBS) $(HDF5_LIBS) -L$(MED_ROOT_DIR)/lib/salome
+CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(KERNEL_CXXFLAGS) $(MED_CXXFLAGS) $(GUI_CXXFLAGS) $(MED2_INCLUDES)
+CXXFLAGS += $(KERNEL_CXXFLAGS) $(GUI_CXXFLAGS)
+LDFLAGS += $(KERNEL_LDFLAGS) $(GUI_LDFLAGS) $(MED_LDFLAGS) $(MED2_LIBS) -lSalomeApp -lmed -lmedsplitter -lmedmem -lmed_V2_1 -lSALOMELocalTrace -lMULTIPREngine
@CONCLUDE@