mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
Merge from V6_3_BR 19/07/2011
This commit is contained in:
parent
191bcced1c
commit
39f36db219
@ -76,7 +76,9 @@ libSMESHObject_la_LDFLAGS = \
|
|||||||
../SMESHClient/libSMESHClient.la \
|
../SMESHClient/libSMESHClient.la \
|
||||||
../SMDS/libSMDS.la \
|
../SMDS/libSMDS.la \
|
||||||
../Controls/libSMESHControls.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 \
|
$(GEOM_LDFLAGS) -lGEOMObject \
|
||||||
$(CAS_KERNEL) \
|
$(CAS_KERNEL) \
|
||||||
$(VTK_LIBS) $(QT_MT_LIBS)
|
$(VTK_LIBS) $(QT_MT_LIBS)
|
||||||
|
@ -127,7 +127,7 @@ libSMDS_la_CPPFLAGS = \
|
|||||||
|
|
||||||
libSMDS_la_LDFLAGS = \
|
libSMDS_la_LDFLAGS = \
|
||||||
$(VTK_LIBS) \
|
$(VTK_LIBS) \
|
||||||
$(KERNEL_LDFLAGS) -lSALOMELocalTrace
|
$(KERNEL_LDFLAGS) -lSALOMELocalTrace -lOpUtil
|
||||||
|
|
||||||
# Executables targets
|
# Executables targets
|
||||||
bin_PROGRAMS = SMDS_MemoryLimit
|
bin_PROGRAMS = SMDS_MemoryLimit
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <vtkSystemIncludes.h>
|
#include <vtkSystemIncludes.h>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
#include "Utils_SALOME_Exception.hxx"
|
#include "Utils_SALOME_Exception.hxx"
|
||||||
#define MYASSERT(val) if (!(val)) throw SALOME_Exception(LOCALIZED("assertion not verified"));
|
#define MYASSERT(val) if (!(val)) throw SALOME_Exception(LOCALIZED("assertion not verified"));
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#ifndef _SMDS_UNSTRUCTUREDGRID_HXX
|
#ifndef _SMDS_UNSTRUCTUREDGRID_HXX
|
||||||
#define _SMDS_UNSTRUCTUREDGRID_HXX
|
#define _SMDS_UNSTRUCTUREDGRID_HXX
|
||||||
|
|
||||||
|
#include "SMESH_SMDS.hxx"
|
||||||
|
|
||||||
#include <vtkUnstructuredGrid.h>
|
#include <vtkUnstructuredGrid.h>
|
||||||
#include <vtkCellLinks.h>
|
#include <vtkCellLinks.h>
|
||||||
#include "chrono.hxx"
|
#include "chrono.hxx"
|
||||||
@ -48,7 +50,7 @@ class SMDS_Downward;
|
|||||||
class SMDS_Mesh;
|
class SMDS_Mesh;
|
||||||
class SMDS_MeshVolume;
|
class SMDS_MeshVolume;
|
||||||
|
|
||||||
class SMDS_CellLinks: public vtkCellLinks
|
class SMDS_EXPORT SMDS_CellLinks: public vtkCellLinks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vtkCellLinks::Link* ResizeL(vtkIdType sz);
|
vtkCellLinks::Link* ResizeL(vtkIdType sz);
|
||||||
@ -59,7 +61,7 @@ protected:
|
|||||||
~SMDS_CellLinks();
|
~SMDS_CellLinks();
|
||||||
};
|
};
|
||||||
|
|
||||||
class SMDS_UnstructuredGrid: public vtkUnstructuredGrid
|
class SMDS_EXPORT SMDS_UnstructuredGrid: public vtkUnstructuredGrid
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void setSMDS_mesh(SMDS_Mesh *mesh);
|
void setSMDS_mesh(SMDS_Mesh *mesh);
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#ifndef _CHRONO_HXX_
|
#ifndef _CHRONO_HXX_
|
||||||
#define _CHRONO_HXX_
|
#define _CHRONO_HXX_
|
||||||
|
|
||||||
|
#include "SMESH_SMDS.hxx"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -33,7 +35,7 @@ typedef struct acnt
|
|||||||
double _ctrCumul;
|
double _ctrCumul;
|
||||||
} cntStruct;
|
} cntStruct;
|
||||||
|
|
||||||
class counters
|
class SMDS_EXPORT counters
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static cntStruct *_ctrs;
|
static cntStruct *_ctrs;
|
||||||
@ -44,7 +46,7 @@ protected:
|
|||||||
static int _nbChrono;
|
static int _nbChrono;
|
||||||
};
|
};
|
||||||
|
|
||||||
class chrono
|
class SMDS_EXPORT chrono
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
chrono(int i);
|
chrono(int i);
|
||||||
|
@ -214,7 +214,7 @@ bool SMESH_OctreeNode::NodesAround(const gp_XYZ &node,
|
|||||||
{
|
{
|
||||||
double minDist = precision * precision;
|
double minDist = precision * precision;
|
||||||
gp_Pnt p1 ( node.X(), node.Y(), node.Z() );
|
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 )
|
for ( ; nIt != myNodes.end(); ++nIt )
|
||||||
{
|
{
|
||||||
gp_Pnt p2 ( (*nIt)->X(), (*nIt)->Y(), (*nIt)->Z() );
|
gp_Pnt p2 ( (*nIt)->X(), (*nIt)->Y(), (*nIt)->Z() );
|
||||||
|
@ -27,11 +27,15 @@ void memostat(const char* f, int l);
|
|||||||
|
|
||||||
void memostat(const char* f, int l)
|
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(); */
|
/* 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 << " " << mem.arena << " " << mem.ordblks << " " << mem.hblks << " " << mem.hblkhd << " " << mem.uordblks << " " << mem.fordblks << " " << mem.keepcost << std::endl; */
|
||||||
std::cerr << f << ":" << l << " --------------------------" << std::endl;
|
std::cerr << f << ":" << l << " --------------------------" << std::endl;
|
||||||
malloc_stats();
|
malloc_stats();
|
||||||
std::cerr << f << ":" << l << " --------------------------" << std::endl;
|
std::cerr << f << ":" << l << " --------------------------" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MEMOSTAT //memostat( __FILE__, __LINE__ )
|
#define MEMOSTAT //memostat( __FILE__, __LINE__ )
|
||||||
|
@ -268,8 +268,9 @@ libSMESH_la_LDFLAGS = \
|
|||||||
../OBJECT/libSMESHObject.la \
|
../OBJECT/libSMESHObject.la \
|
||||||
$(CAS_LDFLAGS) -lTKV3d \
|
$(CAS_LDFLAGS) -lTKV3d \
|
||||||
$(GUI_LDFLAGS) -lSalomePrs -lsuit -lSUITApp -lCAM -lstd \
|
$(GUI_LDFLAGS) -lSalomePrs -lsuit -lSUITApp -lCAM -lstd \
|
||||||
$(GEOM_LDFLAGS) -lGEOMBase -lGEOMFiltersSelection -lGEOMObject
|
$(GEOM_LDFLAGS) -lGEOMBase -lGEOMFiltersSelection -lGEOMObject \
|
||||||
|
$(PYTHON_LIBS)
|
||||||
|
|
||||||
# resources files
|
# resources files
|
||||||
nodist_salomeres_DATA= \
|
nodist_salomeres_DATA= \
|
||||||
SMESH_images.qm \
|
SMESH_images.qm \
|
||||||
|
@ -604,7 +604,11 @@ SMESH::Histogram* NumericalFunctor_i::GetHistogram(CORBA::Short nbIntervals)
|
|||||||
std::vector<int> elements;
|
std::vector<int> elements;
|
||||||
myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements);
|
myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements);
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
nbIntervals = CORBA::Short( min( nbEvents.size(), funValues.size() - 1));
|
||||||
|
#else
|
||||||
nbIntervals = CORBA::Short( std::min( nbEvents.size(), funValues.size() - 1));
|
nbIntervals = CORBA::Short( std::min( nbEvents.size(), funValues.size() - 1));
|
||||||
|
#endif
|
||||||
SMESH::Histogram_var histogram = new SMESH::Histogram;
|
SMESH::Histogram_var histogram = new SMESH::Histogram;
|
||||||
if ( nbIntervals > 0 )
|
if ( nbIntervals > 0 )
|
||||||
{
|
{
|
||||||
|
@ -486,7 +486,7 @@ namespace // INTERNAL STUFF
|
|||||||
for ( ; d != dList.end(); ++d )
|
for ( ; d != dList.end(); ++d )
|
||||||
if ( d->_subM.count( subMesh ))
|
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 )
|
for( ; smIt != d->_subM.end(); ++smIt )
|
||||||
if ( (*smIt)->IsMeshComputed() )
|
if ( (*smIt)->IsMeshComputed() )
|
||||||
d->_computedSubM.insert( *smIt);
|
d->_computedSubM.insert( *smIt);
|
||||||
|
@ -214,7 +214,7 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
|
|||||||
SMDS_MeshElement::iterator node = face->begin_nodes();
|
SMDS_MeshElement::iterator node = face->begin_nodes();
|
||||||
for ( unsigned i = 0; i < newNodes.size(); ++i, ++node )
|
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 ( n2nIt->second )
|
||||||
{
|
{
|
||||||
if ( !subShapeIDs.count( n2nIt->second->getshapeId() ))
|
if ( !subShapeIDs.count( n2nIt->second->getshapeId() ))
|
||||||
|
@ -895,9 +895,9 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & aMes
|
|||||||
|
|
||||||
for ( int i = degenSides.size()-1; i > -1; --i )
|
for ( int i = degenSides.size()-1; i > -1; --i )
|
||||||
{
|
{
|
||||||
StdMeshers_FaceSide * & degenSide = quad->side[ degenSides[ i ]];
|
StdMeshers_FaceSide* degenSide = quad->side[ degenSides[ i ]];
|
||||||
delete degenSide;
|
delete degenSide;
|
||||||
quad->side.erase( vector<StdMeshers_FaceSide*>::iterator( & degenSide ));
|
quad->side.erase( quad->side.begin() + degenSides[ i ] );
|
||||||
}
|
}
|
||||||
for ( unsigned i = TOP_SIDE; i < quad->side.size(); ++i )
|
for ( unsigned i = TOP_SIDE; i < quad->side.size(); ++i )
|
||||||
quad->side[i]->Reverse();
|
quad->side[i]->Reverse();
|
||||||
@ -2219,7 +2219,7 @@ bool StdMeshers_Quadrangle_2D::ComputeReduced (SMESH_Mesh & aMesh,
|
|||||||
int ncol_top = nt1 - 1;
|
int ncol_top = nt1 - 1;
|
||||||
int ncol_bot = nb1 - 1;
|
int ncol_bot = nb1 - 1;
|
||||||
// number of rows needed to reduce ncol_bot to ncol_top using simple 3->1 "tree" (see below)
|
// 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 )
|
if ( nrows < nrows_tree31 )
|
||||||
MultipleReduce = true;
|
MultipleReduce = true;
|
||||||
}
|
}
|
||||||
@ -2545,7 +2545,13 @@ bool StdMeshers_Quadrangle_2D::ComputeReduced (SMESH_Mesh & aMesh,
|
|||||||
// maximum number of bottom elements for "tree" simple reduce 4->2
|
// maximum number of bottom elements for "tree" simple reduce 4->2
|
||||||
int max_tree42 = 0;
|
int max_tree42 = 0;
|
||||||
// number of rows needed to reduce ncol_bot to ncol_top using simple 4->2 "tree"
|
// 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)
|
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) {
|
if (ncol_top > npair_top * 2 && nrows_tree42 < nrows) {
|
||||||
max_tree42 = npair_top * pow(2.0, nrows + 1);
|
max_tree42 = npair_top * pow(2.0, nrows + 1);
|
||||||
int delta = ncol_bot - int( max_tree42 );
|
int delta = ncol_bot - int( max_tree42 );
|
||||||
|
@ -2511,7 +2511,7 @@ bool _ViscousBuilder::updateNormals( _SolidData& data,
|
|||||||
if ( S.ShapeType() != TopAbs_EDGE )
|
if ( S.ShapeType() != TopAbs_EDGE )
|
||||||
continue; // TODO: find EDGE by VERTEX
|
continue; // TODO: find EDGE by VERTEX
|
||||||
E1 = TopoDS::Edge( S );
|
E1 = TopoDS::Edge( S );
|
||||||
set< _LayerEdge* >::iterator eIt = ee.begin();
|
set< _LayerEdge*, _LayerEdgeCmp >::iterator eIt = ee.begin();
|
||||||
while ( E2.IsNull() && eIt != ee.end())
|
while ( E2.IsNull() && eIt != ee.end())
|
||||||
{
|
{
|
||||||
_LayerEdge* e2 = *eIt++;
|
_LayerEdge* e2 = *eIt++;
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
// CORBA includes
|
// CORBA includes
|
||||||
#include <CORBA.h>
|
#include <CORBA.h>
|
||||||
|
|
||||||
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||||
|
|
||||||
class SUIT_SelectionFilter;
|
class SUIT_SelectionFilter;
|
||||||
|
@ -1093,7 +1093,7 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
ngro = ETIQFAM[ifam].size();
|
ngro = ETIQFAM[ifam].size();
|
||||||
|
|
||||||
// Noms des groupes de la famille: variable nomsGN
|
// 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;
|
int cptGN = 0;
|
||||||
for (unsigned int ign = 0; ign < ETIQFAM[ifam].size(); ign++)
|
for (unsigned int ign = 0; ign < ETIQFAM[ifam].size(); ign++)
|
||||||
{
|
{
|
||||||
@ -1121,8 +1121,8 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
// Création de la famille
|
// Création de la famille
|
||||||
if (MEDfamilyCr(fid, maa, nomfam, numfam, 0, MED_NO_GROUP) < 0)
|
if (MEDfamilyCr(fid, maa, nomfam, numfam, 0, MED_NO_GROUP) < 0)
|
||||||
ERREUR("Error MEDfamilyCr");
|
ERREUR("Error MEDfamilyCr");
|
||||||
|
delete gro;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1136,7 +1136,7 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
med_float *coo; // Table des coordonnées
|
med_float *coo; // Table des coordonnées
|
||||||
|
|
||||||
// Noms des coordonnées (variable nomcoo)
|
// 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";
|
string strX = (string) "X";
|
||||||
while (strX.size() < MED_SNAME_SIZE)
|
while (strX.size() < MED_SNAME_SIZE)
|
||||||
strX += (string) " ";
|
strX += (string) " ";
|
||||||
@ -1155,7 +1155,7 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
nomcoo[mdim * MED_SNAME_SIZE] = '\0';
|
nomcoo[mdim * MED_SNAME_SIZE] = '\0';
|
||||||
|
|
||||||
// Unités des coordonnées (variable unicoo)
|
// 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";
|
string strmesure = (string) "SI";
|
||||||
while (strmesure.size() < MED_SNAME_SIZE)
|
while (strmesure.size() < MED_SNAME_SIZE)
|
||||||
strmesure += (string) " ";
|
strmesure += (string) " ";
|
||||||
@ -1408,7 +1408,7 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
ngro = ETIQFAM[ifam].size();
|
ngro = ETIQFAM[ifam].size();
|
||||||
|
|
||||||
// Noms des groupes de la famille
|
// 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;
|
int cptGM = 0;
|
||||||
for (unsigned int ign = 0; ign < ETIQFAM[ifam].size(); ign++)
|
for (unsigned int ign = 0; ign < ETIQFAM[ifam].size(); ign++)
|
||||||
{
|
{
|
||||||
@ -1436,8 +1436,9 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
// Création de la famille
|
// Création de la famille
|
||||||
if (MEDfamilyCr(fid, maa, nomfam, numfam, 1, gro) < 0)
|
if (MEDfamilyCr(fid, maa, nomfam, numfam, 1, gro) < 0)
|
||||||
ERREUR("Error MEDfamilyCr");
|
ERREUR("Error MEDfamilyCr");
|
||||||
}
|
|
||||||
|
|
||||||
|
delete gro;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ########################################################################
|
// ########################################################################
|
||||||
@ -1557,6 +1558,9 @@ void Maillage::outputMED(std::string fichierMED)
|
|||||||
cout << "Error on close MED file" << endl;
|
cout << "Error on close MED file" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete unicoo;
|
||||||
|
delete nomcoo;
|
||||||
|
|
||||||
// cout << endl << endl << "Fin procédure outputMED" << endl;
|
// cout << endl << endl << "Fin procédure outputMED" << endl;
|
||||||
} // outputMED
|
} // outputMED
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <ctime>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace MESHCUT;
|
using namespace MESHCUT;
|
||||||
@ -92,9 +93,9 @@ bool MESHCUT::appartient(std::string e, std::string tableau[], int taille)
|
|||||||
|
|
||||||
float MESHCUT::arrondi(float x)
|
float MESHCUT::arrondi(float x)
|
||||||
{
|
{
|
||||||
if (x > 0 and x < 1.0e-5)
|
if (x > 0 && x < 1.0e-5)
|
||||||
return 0;
|
return 0;
|
||||||
else if (x < 0 and x > -1.0e-5)
|
else if (x < 0 && x > -1.0e-5)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return x;
|
return x;
|
||||||
|
Loading…
Reference in New Issue
Block a user