../SMESHClient/libSMESHClient.la \
../SMDS/libSMDS.la \
../Controls/libSMESHControls.la \
- $(GUI_LDFLAGS) -lSalomeApp -lSalomeObject -lSVTK -lVTKViewer -lqtx -lsuit \
+ $(GUI_LDFLAGS) -lSalomeApp -lSalomeObject -lSVTK -lVTKViewer -lqtx -lsuit -lstd \
+ -lPlot2d \
+ -lSPlot2d \
$(GEOM_LDFLAGS) -lGEOMObject \
$(CAS_KERNEL) \
$(VTK_LIBS) $(QT_MT_LIBS)
libSMDS_la_LDFLAGS = \
$(VTK_LIBS) \
- $(KERNEL_LDFLAGS) -lSALOMELocalTrace
+ $(KERNEL_LDFLAGS) -lSALOMELocalTrace -lOpUtil
# Executables targets
bin_PROGRAMS = SMDS_MemoryLimit
#include <list>
#include <vector>
#include <vtkSystemIncludes.h>
+#include <cassert>
#include "Utils_SALOME_Exception.hxx"
#define MYASSERT(val) if (!(val)) throw SALOME_Exception(LOCALIZED("assertion not verified"));
#ifndef _SMDS_UNSTRUCTUREDGRID_HXX
#define _SMDS_UNSTRUCTUREDGRID_HXX
+#include "SMESH_SMDS.hxx"
+
#include <vtkUnstructuredGrid.h>
#include <vtkCellLinks.h>
#include "chrono.hxx"
class SMDS_Mesh;
class SMDS_MeshVolume;
-class SMDS_CellLinks: public vtkCellLinks
+class SMDS_EXPORT SMDS_CellLinks: public vtkCellLinks
{
public:
vtkCellLinks::Link* ResizeL(vtkIdType sz);
~SMDS_CellLinks();
};
-class SMDS_UnstructuredGrid: public vtkUnstructuredGrid
+class SMDS_EXPORT SMDS_UnstructuredGrid: public vtkUnstructuredGrid
{
public:
void setSMDS_mesh(SMDS_Mesh *mesh);
#ifndef _CHRONO_HXX_
#define _CHRONO_HXX_
+#include "SMESH_SMDS.hxx"
+
#include <vector>
#include <string>
#include <iostream>
double _ctrCumul;
} cntStruct;
-class counters
+class SMDS_EXPORT counters
{
public:
static cntStruct *_ctrs;
static int _nbChrono;
};
-class chrono
+class SMDS_EXPORT chrono
{
public:
chrono(int i);
{
double minDist = precision * precision;
gp_Pnt p1 ( node.X(), node.Y(), node.Z() );
- set<const SMDS_MeshNode*>::iterator nIt = myNodes.begin();
+ TIDSortedNodeSet::iterator nIt = myNodes.begin();
for ( ; nIt != myNodes.end(); ++nIt )
{
gp_Pnt p2 ( (*nIt)->X(), (*nIt)->Y(), (*nIt)->Z() );
void memostat(const char* f, int l)
{
+#ifdef WIN32
+ //rnv: TODO: find alternative of the malloc_stats() on windows platform
+#else
/* struct mallinfo mem = mallinfo(); */
/* std::cerr << f << ":"<< l << " " << mem.arena << " " << mem.ordblks << " " << mem.hblks << " " << mem.hblkhd << " " << mem.uordblks << " " << mem.fordblks << " " << mem.keepcost << std::endl; */
std::cerr << f << ":" << l << " --------------------------" << std::endl;
malloc_stats();
std::cerr << f << ":" << l << " --------------------------" << std::endl;
+#endif
}
#define MEMOSTAT //memostat( __FILE__, __LINE__ )
../OBJECT/libSMESHObject.la \
$(CAS_LDFLAGS) -lTKV3d \
$(GUI_LDFLAGS) -lSalomePrs -lsuit -lSUITApp -lCAM -lstd \
- $(GEOM_LDFLAGS) -lGEOMBase -lGEOMFiltersSelection -lGEOMObject
-
+ $(GEOM_LDFLAGS) -lGEOMBase -lGEOMFiltersSelection -lGEOMObject \
+ $(PYTHON_LIBS)
+
# resources files
nodist_salomeres_DATA= \
SMESH_images.qm \
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+//To avoid replacing of the min from std by windows macros defined in the WinDef.h
+#ifdef WIN32
+ #define MIN(a,b) (std::min)(a,b)
+#else
+ #define MIN(a,b) std::min(a,b)
+#endif
+
+
using namespace SMESH;
using namespace SMESH::Controls;
std::vector<int> elements;
myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements);
- nbIntervals = CORBA::Short( std::min( nbEvents.size(), funValues.size() - 1));
+ nbIntervals = CORBA::Short(MIN( nbEvents.size(), funValues.size() - 1));
SMESH::Histogram_var histogram = new SMESH::Histogram;
if ( nbIntervals > 0 )
{
for ( ; d != dList.end(); ++d )
if ( d->_subM.count( subMesh ))
{
- set<SMESH_subMesh*>::iterator smIt = d->_subM.begin();
+ set<SMESH_subMesh*,_SubLess>::iterator smIt = d->_subM.begin();
for( ; smIt != d->_subM.end(); ++smIt )
if ( (*smIt)->IsMeshComputed() )
d->_computedSubM.insert( *smIt);
SMDS_MeshElement::iterator node = face->begin_nodes();
for ( unsigned i = 0; i < newNodes.size(); ++i, ++node )
{
- TNodeNodeMap::iterator n2nIt = n2n->insert( make_pair( *node, (SMDS_MeshNode*)0 )).first;
+ StdMeshers_Import_1D::TNodeNodeMap::iterator n2nIt = n2n->insert( make_pair( *node, (SMDS_MeshNode*)0 )).first;
if ( n2nIt->second )
{
if ( !subShapeIDs.count( n2nIt->second->getshapeId() ))
for ( int i = degenSides.size()-1; i > -1; --i )
{
- StdMeshers_FaceSide * & degenSide = quad->side[ degenSides[ i ]];
- delete degenSide;
- quad->side.erase( vector<StdMeshers_FaceSide*>::iterator( & degenSide ));
+ StdMeshers_FaceSide* degenSide = quad->side[ degenSides[ i ]];
+ quad->side.erase( find(quad->side.begin(), quad->side.end(), degenSide ));
+ delete degenSide;
}
for ( unsigned i = TOP_SIDE; i < quad->side.size(); ++i )
quad->side[i]->Reverse();
int ncol_top = nt1 - 1;
int ncol_bot = nb1 - 1;
// number of rows needed to reduce ncol_bot to ncol_top using simple 3->1 "tree" (see below)
- int nrows_tree31 = int( log( ncol_bot / ncol_top ) / log( 3 )); // = log x base 3
+ int nrows_tree31 = int( log( (double)(ncol_bot / ncol_top) ) / log((double) 3 )); // = log x base 3
if ( nrows < nrows_tree31 )
MultipleReduce = true;
}
// maximum number of bottom elements for "tree" simple reduce 4->2
int max_tree42 = 0;
// number of rows needed to reduce ncol_bot to ncol_top using simple 4->2 "tree"
+#ifdef WIN32
+ //<cmath> of the MSVC doesn't contain log2
+ int nrows_tree42 = int( log( (double)(ncol_bot / ncol_top) )/log((double)2) ); // needed to avoid overflow at pow(2)
+#else
int nrows_tree42 = int( log2( ncol_bot / ncol_top )); // needed to avoid overflow at pow(2)
+#endif
+
if (ncol_top > npair_top * 2 && nrows_tree42 < nrows) {
max_tree42 = npair_top * pow(2.0, nrows + 1);
int delta = ncol_bot - int( max_tree42 );
if ( S.ShapeType() != TopAbs_EDGE )
continue; // TODO: find EDGE by VERTEX
E1 = TopoDS::Edge( S );
- set< _LayerEdge* >::iterator eIt = ee.begin();
+ set< _LayerEdge*, _LayerEdgeCmp >::iterator eIt = ee.begin();
while ( E2.IsNull() && eIt != ee.end())
{
_LayerEdge* e2 = *eIt++;
// CORBA includes
#include <CORBA.h>
+#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SMESH_Mesh)
class SUIT_SelectionFilter;
ngro = ETIQFAM[ifam].size();
// Noms des groupes de la famille: variable nomsGN
- char gro[ngro * MED_LNAME_SIZE + 1];
+ char *gro = new char[ngro * MED_LNAME_SIZE + 1];
int cptGN = 0;
for (unsigned int ign = 0; ign < ETIQFAM[ifam].size(); ign++)
{
// Création de la famille
if (MEDfamilyCr(fid, maa, nomfam, numfam, 0, MED_NO_GROUP) < 0)
ERREUR("Error MEDfamilyCr");
-
- }
+ delete gro;
+ }
}
med_float *coo; // Table des coordonnées
// Noms des coordonnées (variable nomcoo)
- char nomcoo[mdim * MED_SNAME_SIZE + 1];
+ char* nomcoo = new char[mdim * MED_SNAME_SIZE + 1];
string strX = (string) "X";
while (strX.size() < MED_SNAME_SIZE)
strX += (string) " ";
nomcoo[mdim * MED_SNAME_SIZE] = '\0';
// Unités des coordonnées (variable unicoo)
- char unicoo[mdim * MED_SNAME_SIZE + 1];
+ char* unicoo = new char[mdim * MED_SNAME_SIZE + 1];
string strmesure = (string) "SI";
while (strmesure.size() < MED_SNAME_SIZE)
strmesure += (string) " ";
ngro = ETIQFAM[ifam].size();
// Noms des groupes de la famille
- char gro[ngro * MED_LNAME_SIZE + 1];
+ char* gro = new char[ngro * MED_LNAME_SIZE + 1];
int cptGM = 0;
for (unsigned int ign = 0; ign < ETIQFAM[ifam].size(); ign++)
{
// Création de la famille
if (MEDfamilyCr(fid, maa, nomfam, numfam, 1, gro) < 0)
ERREUR("Error MEDfamilyCr");
- }
+ delete gro;
+ }
}
// ########################################################################
cout << "Error on close MED file" << endl;
}
+ delete unicoo;
+ delete nomcoo;
+
// cout << endl << endl << "Fin procédure outputMED" << endl;
} // outputMED
#include <sstream>
#include <cstdlib>
#include <cstring>
+#include <ctime>
using namespace std;
using namespace MESHCUT;
float MESHCUT::arrondi(float x)
{
- if (x > 0 and x < 1.0e-5)
+ if (x > 0 && x < 1.0e-5)
return 0;
- else if (x < 0 and x > -1.0e-5)
+ else if (x < 0 && x > -1.0e-5)
return 0;
else
return x;