_downTypes.clear();
_downArray.clear();
_mesh = 0;
- _counters = new counters(100);
}
SMDS_UnstructuredGrid::~SMDS_UnstructuredGrid()
}
}
}CHRONOSTOP(24);CHRONOSTOP(2);
- _counters->stats();
+ counters::stats();
}
/*! Get the neighbors of a cell.
std::vector<int> _cellIdToDownId; //!< convert vtk Id to downward[vtkType] id, initialized with -1
std::vector<unsigned char> _downTypes;
std::vector<SMDS_Downward*> _downArray;
- counters *_counters;
};
#endif /* _SMDS_UNSTRUCTUREDGRID_HXX */
using namespace std;
cntStruct* counters::_ctrs = 0;
-
+int counters::_nbChrono = 0;
+
counters::counters(int nb)
{
MESSAGE("counters::counters(int nb)");
_nbChrono = nb;
_ctrs = new cntStruct[_nbChrono];
- for (int i=0; i< _nbChrono; i++)
+ for (int i = 0; i < _nbChrono; i++)
{
_ctrs[i]._ctrNames = 0;
_ctrs[i]._ctrLines = 0;
void counters::stats()
{
MESSAGE("counters::stats()");
- for (int i=0; i < _nbChrono; i++)
+ for (int i = 0; i < _nbChrono; i++)
if (_ctrs[i]._ctrOccur)
{
MESSAGE("Compteur[" << i << "]: "<< _ctrs[i]._ctrNames << "[" << _ctrs[i]._ctrLines << "]");
}
}
-
-
-chrono::chrono(int i) : _ctr(i), _run(true)
+chrono::chrono(int i) :
+ _ctr(i), _run(true)
{
//MESSAGE("chrono::chrono " << _ctr << " " << _run);
- _start = clock();
+ _start = clock();
}
chrono::~chrono()
{
- if (_run) stop();
+ if (_run)
+ stop();
}
void chrono::stop()
{
_run = false;
_end = clock();
- double elapse = double(_end - _start)/double(CLOCKS_PER_SEC);
+ double elapse = double(_end - _start) / double(CLOCKS_PER_SEC);
counters::_ctrs[_ctr]._ctrOccur++;
counters::_ctrs[_ctr]._ctrCumul += elapse;
}
static cntStruct *_ctrs;
counters(int nb);
~counters();
- void stats();
+ static void stats();
protected:
- int _nbChrono;
+ static int _nbChrono;
};
class chrono
// Author : Paul RASCLE, EDF
// Module : SMESH
//
+#define CHRONODEF
#include "SMESH_Gen.hxx"
#include "SMESH_subMesh.hxx"
#include "SMESH_HypoFilter.hxx"
_segmentation = 10;
SMDS_Mesh::_meshList.clear();
MESSAGE(SMDS_Mesh::_meshList.size());
+ _counters = new counters(100);
}
//=============================================================================
#include "SMESH_3D_Algo.hxx"
#include "SMESH_Mesh.hxx"
+#include "chrono.hxx"
+
#include <TopoDS_Shape.hxx>
#include <map>
int _segmentation;
// default of segments
int _nbSegments;
+ counters *_counters;
};
#endif
// Created : Mon Apr 12 16:10:22 2004
// Author : Edward AGAPOV (eap)
//
+#define CHRONODEF
#include "SMESH_MeshEditor.hxx"
#include "SMDS_FaceOfNodes.hxx"
SMESHDS_Mesh *meshDS = this->myMesh->GetMeshDS();
meshDS->BuildDownWardConnectivity(false);
+ CHRONO(50);
SMDS_UnstructuredGrid *grid = meshDS->getGrid();
// --- build the list of faces shared by 2 domains (group of elements), with their domain and volume indexes
grid->BuildLinks();
// TODO replace also old nodes by new nodes in faces and edges
+ CHRONOSTOP(50);
+ counters::stats();
}
//================================================================================