Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
41b3e44
)
Patch for MacOS (from SALOME forum)
author
vsr
<vsr@opencascade.com>
Fri, 20 Jan 2017 12:50:46 +0000
(15:50 +0300)
committer
vsr
<vsr@opencascade.com>
Fri, 20 Jan 2017 12:50:46 +0000
(15:50 +0300)
13 files changed:
src/SMDS/SMDS_MemoryLimit.cxx
patch
|
blob
|
history
src/SMDS/SMDS_Mesh.cxx
patch
|
blob
|
history
src/SMDS/chrono.cxx
patch
|
blob
|
history
src/SMDS/chrono.hxx
patch
|
blob
|
history
src/SMESH/SMESH_MeshEditor.cxx
patch
|
blob
|
history
src/SMESH/memoire.h
patch
|
blob
|
history
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
patch
|
blob
|
history
src/SMESHGUI/SMESHGUI_XmlHandler.cxx
patch
|
blob
|
history
src/SMESH_I/SMESH_Gen_i.cxx
patch
|
blob
|
history
src/Tools/MeshCut/MeshCut_DC.cxx
patch
|
blob
|
history
src/Tools/MeshCut/MeshCut_Utils.cxx
patch
|
blob
|
history
src/Tools/MeshCut/MeshCut_Utils.hxx
patch
|
blob
|
history
src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
patch
|
blob
|
history
diff --git
a/src/SMDS/SMDS_MemoryLimit.cxx
b/src/SMDS/SMDS_MemoryLimit.cxx
index c254b50ba6234008ba8ab3cd04f71a5728380c57..3086a8f7b887cd3966e3702cfc2168dce071da57 100644
(file)
--- a/
src/SMDS/SMDS_MemoryLimit.cxx
+++ b/
src/SMDS/SMDS_MemoryLimit.cxx
@@
-25,7
+25,7
@@
// This is not done inside a function of SALOME because allocated memory is not always
// returned to the system. (PAL16631)
//
// This is not done inside a function of SALOME because allocated memory is not always
// returned to the system. (PAL16631)
//
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
#include <sys/sysinfo.h>
#endif
#include <sys/sysinfo.h>
#endif
@@
-36,7
+36,7
@@
int main (int argc, char ** argv)
{
// To better understand what is going on here, consult bug [SALOME platform 0019911]
int main (int argc, char ** argv)
{
// To better understand what is going on here, consult bug [SALOME platform 0019911]
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
struct sysinfo si;
int err = sysinfo( &si );
if ( err )
struct sysinfo si;
int err = sysinfo( &si );
if ( err )
diff --git
a/src/SMDS/SMDS_Mesh.cxx
b/src/SMDS/SMDS_Mesh.cxx
index 13a2aa40f9a442a527f073149985a844d248ea3d..ffb2926b9016757bfdf694052d5c2c00f21899bf 100644
(file)
--- a/
src/SMDS/SMDS_Mesh.cxx
+++ b/
src/SMDS/SMDS_Mesh.cxx
@@
-56,7
+56,7
@@
#include <iterator>
using namespace std;
#include <iterator>
using namespace std;
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
#include <sys/sysinfo.h>
#endif
#include <sys/sysinfo.h>
#endif
@@
-77,7
+77,7
@@
int SMDS_Mesh::chunkSize = 1024;
int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
{
int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
{
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
struct sysinfo si;
int err = sysinfo( &si );
if ( err )
struct sysinfo si;
int err = sysinfo( &si );
if ( err )
@@
-2819,7
+2819,7
@@
namespace {
IdSortedIterator(const SMDS_MeshElementIDFactory& fact,
const SMDSAbs_ElementType type, // SMDSAbs_All NOT allowed!!!
const int totalNb)
IdSortedIterator(const SMDS_MeshElementIDFactory& fact,
const SMDSAbs_ElementType type, // SMDSAbs_All NOT allowed!!!
const int totalNb)
- :myIDFact(
fact
),
+ :myIDFact(
const_cast<SMDS_MeshElementIDFactory&>(fact)
),
myID(1), myMaxID( myIDFact.GetMaxID() ),myNbFound(0), myTotalNb( totalNb ),
myType( type ),
myElem(0)
myID(1), myMaxID( myIDFact.GetMaxID() ),myNbFound(0), myTotalNb( totalNb ),
myType( type ),
myElem(0)
diff --git
a/src/SMDS/chrono.cxx
b/src/SMDS/chrono.cxx
index f2f076df50bc71d0a59cb561d9fd6c5ae14fb042..9493b7d165e8e8dce61e416b215c62dcada93ab4 100644
(file)
--- a/
src/SMDS/chrono.cxx
+++ b/
src/SMDS/chrono.cxx
@@
-59,20
+59,20
@@
void counters::stats()
}
}
}
}
-
chrono::
chrono(int i) :
+
salome_chrono::salome_
chrono(int i) :
_run(true), _ctr(i)
{
//MESSAGE("chrono::chrono " << _ctr << " " << _run);
_start = clock();
}
_run(true), _ctr(i)
{
//MESSAGE("chrono::chrono " << _ctr << " " << _run);
_start = clock();
}
-
chrono::~
chrono()
+
salome_chrono::~salome_
chrono()
{
if (_run)
stop();
}
{
if (_run)
stop();
}
-void chrono::stop()
+void
salome_
chrono::stop()
{
//MESSAGE("chrono::stop " << _ctr << " " << _run);
if (_run)
{
//MESSAGE("chrono::stop " << _ctr << " " << _run);
if (_run)
diff --git
a/src/SMDS/chrono.hxx
b/src/SMDS/chrono.hxx
index 31e2828e0e6e9878d22ec188365f09de6c2a203b..38ebff8a50f2dfb77ed7e7700dc8997f5c247ac7 100644
(file)
--- a/
src/SMDS/chrono.hxx
+++ b/
src/SMDS/chrono.hxx
@@
-46,11
+46,11
@@
protected:
static int _nbChrono;
};
static int _nbChrono;
};
-class SMDS_EXPORT chrono
+class SMDS_EXPORT
salome_
chrono
{
public:
{
public:
- chrono(int i);
- ~chrono();
+
salome_
chrono(int i);
+ ~
salome_
chrono();
void stop();
protected:
bool _run;
void stop();
protected:
bool _run;
@@
-61,7
+61,7
@@
protected:
#ifdef CHRONODEF
#define CHRONO(i) counters::_ctrs[i]._ctrNames = (char *)__FILE__; \
counters::_ctrs[i]._ctrLines = __LINE__; \
#ifdef CHRONODEF
#define CHRONO(i) counters::_ctrs[i]._ctrNames = (char *)__FILE__; \
counters::_ctrs[i]._ctrLines = __LINE__; \
- chrono aChrono##i(i);
+
salome_
chrono aChrono##i(i);
#define CHRONOSTOP(i) aChrono##i.stop();
#define CHRONOSTOP(i) aChrono##i.stop();
diff --git
a/src/SMESH/SMESH_MeshEditor.cxx
b/src/SMESH/SMESH_MeshEditor.cxx
index 71678031836b6daef849c70b78f1ad49657267b9..d975229cf67eca45ed1924ce08e03fc3d4129ad4 100644
(file)
--- a/
src/SMESH/SMESH_MeshEditor.cxx
+++ b/
src/SMESH/SMESH_MeshEditor.cxx
@@
-4568,7
+4568,11
@@
void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem,
std::swap( itNN[0], itNN[1] );
std::swap( prevNod[0], prevNod[1] );
std::swap( nextNod[0], nextNod[1] );
std::swap( itNN[0], itNN[1] );
std::swap( prevNod[0], prevNod[1] );
std::swap( nextNod[0], nextNod[1] );
+#if defined(__APPLE__)
+ std::swap( isSingleNode[0], isSingleNode[1] );
+#else
isSingleNode.swap( isSingleNode[0], isSingleNode[1] );
isSingleNode.swap( isSingleNode[0], isSingleNode[1] );
+#endif
if ( nbSame > 0 )
sames[0] = 1 - sames[0];
iNotSameNode = 1 - iNotSameNode;
if ( nbSame > 0 )
sames[0] = 1 - sames[0];
iNotSameNode = 1 - iNotSameNode;
diff --git
a/src/SMESH/memoire.h
b/src/SMESH/memoire.h
index b153ac73d75b7fd3cdf5437ccc1256a021aab9cb..ef953601fd8e7e51376ec621764f860dd98fb7d9 100644
(file)
--- a/
src/SMESH/memoire.h
+++ b/
src/SMESH/memoire.h
@@
-20,14
+20,18
@@
#ifndef _MEMOIRE_H_
#define _MEMOIRE_H_
#ifndef _MEMOIRE_H_
#define _MEMOIRE_H_
+#ifdef __APPLE__
+#include <stdlib.h>
+#else
#include <malloc.h>
#include <malloc.h>
+#endif
#include <iostream>
void memostat(const char* f, int l);
void memostat(const char* f, int l)
{
#include <iostream>
void memostat(const char* f, int l);
void memostat(const char* f, int l)
{
-#if
def WIN32
+#if
defined WIN32 || defined __APPLE__
//rnv: TODO: find alternative of the malloc_stats() on windows platform
#else
struct mallinfo mem = mallinfo();
//rnv: TODO: find alternative of the malloc_stats() on windows platform
#else
struct mallinfo mem = mallinfo();
diff --git
a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
index 752957abd129c7d6a7e8e2faea9a5858c2a10615..32b472ff6d3545b5dde30bb5e3e154d896dfb7cb 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
@@
-102,7
+102,7
@@
#include <vector>
#include <set>
#include <vector>
#include <set>
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
#include <sys/sysinfo.h>
#endif
#include <sys/sysinfo.h>
#endif
@@
-786,7
+786,7
@@
SMESHGUI_ComputeDlg_QThreadQDialog(QWidget * parent,
QLabel * nbElemsName = new QLabel(tr("SMESH_MESHINFO_ELEMENTS"), this );
nbNodesLabel = new QLabel("0", this );
nbElemsLabel = new QLabel("0", this );
QLabel * nbElemsName = new QLabel(tr("SMESH_MESHINFO_ELEMENTS"), this );
nbNodesLabel = new QLabel("0", this );
nbElemsLabel = new QLabel("0", this );
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
QLabel * freeRAMName = new QLabel(tr("SMESH_FREERAM"), this );
freeRAMLabel = new QLabel("", this );
#endif
QLabel * freeRAMName = new QLabel(tr("SMESH_FREERAM"), this );
freeRAMLabel = new QLabel("", this );
#endif
@@
-802,7
+802,7
@@
SMESHGUI_ComputeDlg_QThreadQDialog(QWidget * parent,
layout->addWidget(nbNodesLabel, row++, 1);
layout->addWidget(nbElemsName, row, 0);
layout->addWidget(nbElemsLabel, row++, 1);
layout->addWidget(nbNodesLabel, row++, 1);
layout->addWidget(nbElemsName, row, 0);
layout->addWidget(nbElemsLabel, row++, 1);
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
layout->addWidget(freeRAMName, row, 0);
layout->addWidget(freeRAMLabel, row++, 1);
#endif
layout->addWidget(freeRAMName, row, 0);
layout->addWidget(freeRAMLabel, row++, 1);
#endif
@@
-842,7
+842,7
@@
void SMESHGUI_ComputeDlg_QThreadQDialog::timerEvent(QTimerEvent *event)
{
nbNodesLabel->setText( QString("%1").arg( qthread.getMesh()->NbNodes() ));
nbElemsLabel->setText( QString("%1").arg( qthread.getMesh()->NbElements() ));
{
nbNodesLabel->setText( QString("%1").arg( qthread.getMesh()->NbNodes() ));
nbElemsLabel->setText( QString("%1").arg( qthread.getMesh()->NbElements() ));
-#if
ndef WIN32
+#if
!defined WIN32 && !defined __APPLE__
struct sysinfo si;
const int err = sysinfo( &si );
if ( err )
struct sysinfo si;
const int err = sysinfo( &si );
if ( err )
diff --git
a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx
b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx
index 3482d7672fd632e6f0433a016194abb9f4992a73..a3c1c5b19b43a451297b2d350df3f8d18028ca8a 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_XmlHandler.cxx
+++ b/
src/SMESHGUI/SMESHGUI_XmlHandler.cxx
@@
-91,11
+91,12
@@
bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
*/
if( !myClientLib.isEmpty() )
{
*/
if( !myClientLib.isEmpty() )
{
-#if
def WIN32
+#if
defined(WIN32)
//myServerLib += ".dll";
myClientLib += ".dll";
//myServerLib += ".dll";
myClientLib += ".dll";
+#elif defined(__APPLE__)
+ myClientLib = "lib" + myClientLib + ".dylib";
#else
#else
- //myServerLib = "lib" + myServerLib + ".so";
myClientLib = "lib" + myClientLib + ".so";
#endif
}
myClientLib = "lib" + myClientLib + ".so";
#endif
}
diff --git
a/src/SMESH_I/SMESH_Gen_i.cxx
b/src/SMESH_I/SMESH_Gen_i.cxx
index 845e0d9f081da9ac32d720fdcb1db1a0dd68ec66..d4d65b56c95b9b4a6cec955dfd5b10c018a6bb7d 100644
(file)
--- a/
src/SMESH_I/SMESH_Gen_i.cxx
+++ b/
src/SMESH_I/SMESH_Gen_i.cxx
@@
-54,6
+54,7
@@
#include <process.h>
#else
#include <dlfcn.h>
#include <process.h>
#else
#include <dlfcn.h>
+ #include <libgen.h> // for basename function
#endif
#ifdef WIN32
#endif
#ifdef WIN32
@@
-382,8
+383,10
@@
GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp
!strcmp( theLibName+libNameLen-3, ".so" ))
{
//the old format
!strcmp( theLibName+libNameLen-3, ".so" ))
{
//the old format
-#if
def WIN32
+#if
defined(WIN32)
aPlatformLibName = std::string( theLibName+3, libNameLen-6 ) + ".dll";
aPlatformLibName = std::string( theLibName+3, libNameLen-6 ) + ".dll";
+#elif defined(__APPLE__)
+ aPlatformLibName = std::string( theLibName, libNameLen-3 ) + ".dylib";
#else
aPlatformLibName = theLibName;
#endif
#else
aPlatformLibName = theLibName;
#endif
@@
-391,11
+394,13
@@
GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp
else
{
//try to use new format
else
{
//try to use new format
-#if
def WIN32
+#if
defined(WIN32)
aPlatformLibName = theLibName;
aPlatformLibName += ".dll";
aPlatformLibName = theLibName;
aPlatformLibName += ".dll";
+#elif defined(__APPLE__)
+ aPlatformLibName = std::string( "lib" ) + std::string( theLibName ) + ".dylib";
#else
#else
- aPlatformLibName =
"lib"
+ std::string( theLibName ) + ".so";
+ aPlatformLibName =
std::string( "lib" )
+ std::string( theLibName ) + ".so";
#endif
}
}
#endif
}
}
@@
-1169,7
+1174,7
@@
SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMEDorSAUV( const char* theFileNa
_splitpath( theFileNameForPython, NULL, NULL, bname, NULL );
string aFileName = bname;
#else
_splitpath( theFileNameForPython, NULL, NULL, bname, NULL );
string aFileName = bname;
#else
- string aFileName = basename(
theFileNameForPython
);
+ string aFileName = basename(
const_cast<char *>(theFileNameForPython)
);
#endif
// Retrieve mesh names from the file
DriverMED_R_SMESHDS_Mesh myReader;
#endif
// Retrieve mesh names from the file
DriverMED_R_SMESHDS_Mesh myReader;
@@
-1318,7
+1323,7
@@
SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMeshesFromSTL( const char* theFileName
_splitpath( theFileName, NULL, NULL, bname, NULL );
string aFileName = bname;
#else
_splitpath( theFileName, NULL, NULL, bname, NULL );
string aFileName = bname;
#else
- string aFileName = basename(
theFileName
);
+ string aFileName = basename(
const_cast<char *>(theFileName)
);
#endif
// publish mesh in the study
if ( CanPublishInStudy( aMesh ) ) {
#endif
// publish mesh in the study
if ( CanPublishInStudy( aMesh ) ) {
@@
-1447,7
+1452,7
@@
SMESH_Gen_i::CreateMeshesFromGMF( const char* theFileName,
_splitpath( theFileName, NULL, NULL, bname, NULL );
string aFileName = bname;
#else
_splitpath( theFileName, NULL, NULL, bname, NULL );
string aFileName = bname;
#else
- string aFileName = basename(
theFileName
);
+ string aFileName = basename(
const_cast<char *>(theFileName)
);
#endif
// publish mesh in the study
if ( CanPublishInStudy( aMesh ) ) {
#endif
// publish mesh in the study
if ( CanPublishInStudy( aMesh ) ) {
diff --git
a/src/Tools/MeshCut/MeshCut_DC.cxx
b/src/Tools/MeshCut/MeshCut_DC.cxx
index 1639f0bdc6939a93836cd1aacc43423a44409760..b05d434d346dca5bb1c62c75a6627a39f8f24d6c 100644
(file)
--- a/
src/Tools/MeshCut/MeshCut_DC.cxx
+++ b/
src/Tools/MeshCut/MeshCut_DC.cxx
@@
-180,10
+180,10
@@
int main(int argc, char *argv[])
//int NG[4]; // Num. globaux des sommets
// Acquisition maillage initial
//int NG[4]; // Num. globaux des sommets
// Acquisition maillage initial
- //cout << chrono() << " - Acquisition du maillage initial" << endl;
+ //cout <<
salome_
chrono() << " - Acquisition du maillage initial" << endl;
MAILLAGE1 = new Maillage((string) "TEMP");
MAILLAGE1->inputMED(ficMEDin);
MAILLAGE1 = new Maillage((string) "TEMP");
MAILLAGE1->inputMED(ficMEDin);
- cout << chrono() << " - End of mesh read" << endl;
+ cout <<
salome_
chrono() << " - End of mesh read" << endl;
indexNouveauxNoeuds = MAILLAGE1->nombreNoeudsMaillage;
// Le maillage ne contient aucun TETRA4 : on rend le maillage initial sans modification
indexNouveauxNoeuds = MAILLAGE1->nombreNoeudsMaillage;
// Le maillage ne contient aucun TETRA4 : on rend le maillage initial sans modification
@@
-192,7
+192,7
@@
int main(int argc, char *argv[])
cout << "WARNING: mesh does not contain tetra4 elements, it will not be modified" << endl;
MAILLAGE1->ID = str_id_maillagenew;
MAILLAGE1->outputMED(ficMEDout);
cout << "WARNING: mesh does not contain tetra4 elements, it will not be modified" << endl;
MAILLAGE1->ID = str_id_maillagenew;
MAILLAGE1->outputMED(ficMEDout);
- cout << chrono() << " - Finished!" << endl << endl;
+ cout <<
salome_
chrono() << " - Finished!" << endl << endl;
exit(0);
}
// A partir de cet instant le maillage contient forcément des TETRA4
exit(0);
}
// A partir de cet instant le maillage contient forcément des TETRA4
@@
-202,7
+202,7
@@
int main(int argc, char *argv[])
DNP = (float*) malloc(sizeof(float) * MAILLAGE1->nombreNoeudsMaillage);
for (int k = 0; k < MAILLAGE1->nombreNoeudsMaillage; k++)
DNP[k] = distanceNoeudPlan(k + 1);
DNP = (float*) malloc(sizeof(float) * MAILLAGE1->nombreNoeudsMaillage);
for (int k = 0; k < MAILLAGE1->nombreNoeudsMaillage; k++)
DNP[k] = distanceNoeudPlan(k + 1);
- cout << chrono() << " - End of computation of distances between nodes and plane" << endl;
+ cout <<
salome_
chrono() << " - End of computation of distances between nodes and plane" << endl;
// Longueur d'arête moyenne des T4 intersectant le plan de coupe
float LONGUEURS = 0.0;
// Longueur d'arête moyenne des T4 intersectant le plan de coupe
float LONGUEURS = 0.0;
@@
-246,7
+246,7
@@
int main(int argc, char *argv[])
<< endl;
MAILLAGE1->ID = str_id_maillagenew;
MAILLAGE1->outputMED(ficMEDout);
<< endl;
MAILLAGE1->ID = str_id_maillagenew;
MAILLAGE1->outputMED(ficMEDout);
- cout << chrono() << " - Finished!" << endl << endl;
+ cout <<
salome_
chrono() << " - Finished!" << endl << endl;
exit(0);
}
// A partir de cet instant le maillage contient forcément des TETRA4 intersectant le plan de coupe
exit(0);
}
// A partir de cet instant le maillage contient forcément des TETRA4 intersectant le plan de coupe
@@
-256,7
+256,7
@@
int main(int argc, char *argv[])
epsilon = tolerance * longueurMoyenne;
int nT4coupe = cptLONGUEURS / 6;
epsilon = tolerance * longueurMoyenne;
int nT4coupe = cptLONGUEURS / 6;
- cout << chrono() << " - End of computation of mean length of tetra4 edges near the cut plane" << endl;
+ cout <<
salome_
chrono() << " - End of computation of mean length of tetra4 edges near the cut plane" << endl;
cout << "Number of tetra4 to be cut = " << nT4coupe << endl;
cout << "Mean length = " << longueurMoyenne << endl;
cout << "Number of tetra4 to be cut = " << nT4coupe << endl;
cout << "Mean length = " << longueurMoyenne << endl;
@@
-274,7
+274,7
@@
int main(int argc, char *argv[])
else
POSN[k] = 0;
}
else
POSN[k] = 0;
}
- cout << chrono() << " - End of nodes qualification above or below the cut plane" << endl;
+ cout <<
salome_
chrono() << " - End of nodes qualification above or below the cut plane" << endl;
cout << "Start of iteration on tetra4" << endl;
for (int it4 = 0; it4 < MAILLAGE1->EFFECTIFS_TYPES[TETRA4]; it4++)
cout << "Start of iteration on tetra4" << endl;
for (int it4 = 0; it4 < MAILLAGE1->EFFECTIFS_TYPES[TETRA4]; it4++)
@@
-993,7
+993,7
@@
int main(int argc, char *argv[])
ERREUR("Case not taken into account");
}
ERREUR("Case not taken into account");
}
- cout << chrono() << " - End of iteration on tetra4" << endl;
+ cout <<
salome_
chrono() << " - End of iteration on tetra4" << endl;
// cout << "indexNouveauxNoeuds = " << indexNouveauxNoeuds << endl;
newXX.resize(indexNouveauxNoeuds - MAILLAGE1->nombreNoeudsMaillage);
// cout << "indexNouveauxNoeuds = " << indexNouveauxNoeuds << endl;
newXX.resize(indexNouveauxNoeuds - MAILLAGE1->nombreNoeudsMaillage);
@@
-1011,7
+1011,7
@@
int main(int argc, char *argv[])
// 2. Constitution du maillage final
// =========================================================================================
// 2. Constitution du maillage final
// =========================================================================================
- cout << chrono() << " - Constitution of final mesh" << endl;
+ cout <<
salome_
chrono() << " - Constitution of final mesh" << endl;
MAILLAGE2 = new Maillage(str_id_maillagenew);
MAILLAGE2->dimensionMaillage = MAILLAGE1->dimensionMaillage;
MAILLAGE2 = new Maillage(str_id_maillagenew);
MAILLAGE2->dimensionMaillage = MAILLAGE1->dimensionMaillage;
@@
-1114,10
+1114,10
@@
int main(int argc, char *argv[])
MAILLAGE2->eliminationMailles(TETRA4, cutTetras);
MAILLAGE2->eliminationMailles(TETRA4, cutTetras);
- cout << chrono() << " - MED file writing" << endl;
+ cout <<
salome_
chrono() << " - MED file writing" << endl;
MAILLAGE2->outputMED(ficMEDout);
MAILLAGE2->outputMED(ficMEDout);
- cout << chrono() << " - Finished!" << endl << endl;
+ cout <<
salome_
chrono() << " - Finished!" << endl << endl;
return 0;
return 0;
diff --git
a/src/Tools/MeshCut/MeshCut_Utils.cxx
b/src/Tools/MeshCut/MeshCut_Utils.cxx
index b17e2b4d759e114d60b80699805101acc280c609..3a41721cafda0cccae8d70cce7e845831bb84f38 100644
(file)
--- a/
src/Tools/MeshCut/MeshCut_Utils.cxx
+++ b/
src/Tools/MeshCut/MeshCut_Utils.cxx
@@
-589,7
+589,7
@@
med_geometry_type MESHCUT::InstanceMGE(TYPE_MAILLE TYPE)
return typeBanaliseMED;
}
return typeBanaliseMED;
}
-int MESHCUT::chrono()
+int MESHCUT::
salome_
chrono()
{
return clock() / CLOCKS_PER_SEC;
}
{
return clock() / CLOCKS_PER_SEC;
}
diff --git
a/src/Tools/MeshCut/MeshCut_Utils.hxx
b/src/Tools/MeshCut/MeshCut_Utils.hxx
index df52ed3a9b96f1600151e9ce2c769cfc56d5037e..7ac8e197b498242ceb8f77e1db6dfe2a00ff43bb 100644
(file)
--- a/
src/Tools/MeshCut/MeshCut_Utils.hxx
+++ b/
src/Tools/MeshCut/MeshCut_Utils.hxx
@@
-57,7
+57,7
@@
namespace MESHCUT
int copieFichier(std::string source, std::string cible);
med_geometry_type InstanceMGE(TYPE_MAILLE TYPE);
int copieFichier(std::string source, std::string cible);
med_geometry_type InstanceMGE(TYPE_MAILLE TYPE);
- int chrono();
+ int
salome_
chrono();
TYPE_MAILLE typeMaille(std::string type);
std::string MGE2string(med_geometry_type MGE);
std::string TM2string(TYPE_MAILLE MGE);
TYPE_MAILLE typeMaille(std::string type);
std::string MGE2string(med_geometry_type MGE);
std::string TM2string(TYPE_MAILLE MGE);
diff --git
a/src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
b/src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
index 8986182c02b9c6dcbf389aecfd08eef2f8bc7168..95c35adbab41ff187aed8baa5e475b9c58bbf01a 100644
(file)
--- a/
src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
+++ b/
src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
@@
-129,6
+129,7
@@
MeshJobManager_i::~MeshJobManager_i() {
#include <direct.h> // to get _mkdir
#else
#include <unistd.h> // to get basename
#include <direct.h> // to get _mkdir
#else
#include <unistd.h> // to get basename
+#include <libgen.h> // to get basename - as per posix
#include <sys/stat.h> // to get mkdir
#include <sys/types.h> // to get mkdir options
#endif
#include <sys/stat.h> // to get mkdir
#include <sys/types.h> // to get mkdir options
#endif
@@
-242,7
+243,7
@@
const char* MeshJobManager_i::_writeScriptFile(const char * dataFileName, const
_splitpath( dataFileName, NULL, NULL, fname, NULL );
const char* bname = &fname[0];
#else
_splitpath( dataFileName, NULL, NULL, fname, NULL );
const char* bname = &fname[0];
#else
- const char* bname = basename(
dataFileName
);
+ const char* bname = basename(
const_cast<char *>(dataFileName)
);
#endif
#endif