-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
#include "StdMeshers_Adaptive1D.hxx"
+#include "SMESHDS_Mesh.hxx"
#include "SMESH_Gen.hxx"
+#include "SMESH_HypoFilter.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_MesherHelper.hxx"
#include "SMESH_Octree.hxx"
#include "SMESH_subMesh.hxx"
-#include "SMESH_HypoFilter.hxx"
#include <Utils_SALOME_Exception.hxx>
class AdaptiveAlgo : public StdMeshers_Regular_1D
{
public:
- AdaptiveAlgo(int hypId, int studyId, SMESH_Gen* gen);
+ AdaptiveAlgo(int hypId, SMESH_Gen* gen);
virtual bool Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape );
virtual bool Evaluate(SMESH_Mesh & theMesh,
const TopoDS_Shape & theShape,
double a[3];
bool isDone[3];
double size = -1., maxLinkLen;
- int jLongest;
+ int jLongest = 0;
//int nbLinks = 0;
for ( int i = 1; i <= myPolyTrias->Upper(); ++i )
//================================================================================
/*!
- * \brief Consturct ElementBndBoxTree of Poly_Triangulation of a FACE
+ * \brief Construct ElementBndBoxTree of Poly_Triangulation of a FACE
*/
//================================================================================
//function : StdMeshers_Adaptive1D
//purpose : Constructor
StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(int hypId,
- int studyId,
SMESH_Gen * gen)
- :SMESH_Hypothesis(hypId, studyId, gen)
+ :SMESH_Hypothesis(hypId, gen)
{
myMinSize = 1e-10;
myMaxSize = 1e+10;
//function : SetDeflection
//purpose :
void StdMeshers_Adaptive1D::SetDeflection(double value)
- throw(SALOME_Exception)
{
if (value <= std::numeric_limits<double>::min() )
throw SALOME_Exception("Deflection must be greater that zero");
//function : SetMinSize
//purpose : Sets minimal allowed segment length
void StdMeshers_Adaptive1D::SetMinSize(double minSize)
- throw(SALOME_Exception)
{
if (minSize <= std::numeric_limits<double>::min() )
throw SALOME_Exception("Min size must be greater that zero");
//function : SetMaxSize
//purpose : Sets maximal allowed segment length
void StdMeshers_Adaptive1D::SetMaxSize(double maxSize)
- throw(SALOME_Exception)
{
if (maxSize <= std::numeric_limits<double>::min() )
throw SALOME_Exception("Max size must be greater that zero");
istream & StdMeshers_Adaptive1D::LoadFrom(istream & load)
{
int dummyParam;
- bool isOK = (load >> myMinSize >> myMaxSize >> myDeflection >> dummyParam >> dummyParam);
+ bool isOK = static_cast<bool>(load >> myMinSize >> myMaxSize >> myDeflection >> dummyParam >> dummyParam);
if (!isOK)
load.clear(ios::badbit | load.rdstate());
return load;
if ( !myAlgo )
{
AdaptiveAlgo* newAlgo =
- new AdaptiveAlgo( _gen->GetANewId(), _studyId, _gen );
+ new AdaptiveAlgo( _gen->GetANewId(), _gen );
newAlgo->SetHypothesis( this );
((StdMeshers_Adaptive1D*) this)->myAlgo = newAlgo;
//================================================================================
AdaptiveAlgo::AdaptiveAlgo(int hypId,
- int studyId,
SMESH_Gen* gen)
- : StdMeshers_Regular_1D( hypId, studyId, gen ),
+ : StdMeshers_Regular_1D( hypId, gen ),
myHyp(NULL)
{
_name = "AdaptiveAlgo_1D";