//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
-bool GMSHPlugin_GMSH::CheckHypothesis
- (SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- SMESH_Hypothesis::Hypothesis_Status& aStatus)
+bool GMSHPlugin_GMSH::CheckHypothesis (SMESH_Mesh& aMesh,
+ const TopoDS_Shape& aShape,
+ SMESH_Hypothesis::Hypothesis_Status& aStatus)
{
MESSAGE("GMSHPlugin_GMSH::CheckHypothesis");
-
+
_hypothesis = NULL;
-
+
const list<const SMESHDS_Hypothesis*>& hyps = GetUsedHypothesis(aMesh, aShape);
int nbHyp = hyps.size();
if (!nbHyp)
}
// use only the first hypothesis
const SMESHDS_Hypothesis* theHyp = hyps.front();
-
+
string hypName = theHyp->GetName();
if ( find( _compatibleHypothesis.begin(), _compatibleHypothesis.end(),
hypName ) != _compatibleHypothesis.end() )
//=============================================================================
bool GMSHPlugin_GMSH::Compute(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape)
+ const TopoDS_Shape& aShape)
{
GMSHPlugin_Mesher mesher(&aMesh, aShape);
mesher.SetParameters(dynamic_cast<const GMSHPlugin_Hypothesis*>(_hypothesis));
//=============================================================================
bool GMSHPlugin_GMSH::Evaluate(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- MapShapeNbElems& aResMap)
+ const TopoDS_Shape& aShape,
+ MapShapeNbElems& aResMap)
{
- std::vector<int> aResVec(SMDSEntity_Last);
- for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
+ std::vector<smIdType> aResVec(SMDSEntity_Last);
+ for(smIdType i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Evaluation is not implemented",this));
-
+
return true;
}
const TopoDS_Shape& aShape,
MapShapeNbElems& aResMap)
{
- std::vector<int> aResVec(SMDSEntity_Last);
- for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
+ std::vector<smIdType> aResVec(SMDSEntity_Last);
+ for(smIdType i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
printf("We chose _useIncomplElem %d \n", (_useIncomplElem)?1:0);
printf("We are in dimension %d \n", (_is2d)?2:3);
//*/
-
+
std::map <int,double> mapAlgo2d;
mapAlgo2d[0]=2; mapAlgo2d[1]=1; mapAlgo2d[2]=5; mapAlgo2d[3]=6; mapAlgo2d[4]=8; mapAlgo2d[5]=9;
std::map <int,double> mapAlgo3d;
ok = GmshSetOption("Mesh", "Algorithm" , mapAlgo2d[_algo2d]) ;
ASSERT(ok);
if ( !_is2d)
- {
+ {
ok = GmshSetOption("Mesh", "Algorithm3D" , mapAlgo2d[_algo3d]) ;
ASSERT(ok);
- }
+ }
ok = GmshSetOption("Mesh", "RecombinationAlgorithm" , (double)_recomb2DAlgo) ;
ASSERT(ok);
ok = GmshSetOption("Mesh", "RecombineAll" , (_recombineAll)?1.:0.) ;
ok = GmshSetOption("Mesh", "ElementOrder" , (_secondOrder)?2.:1.) ;
ASSERT(ok);
if (_secondOrder)
- {
+ {
ok = GmshSetOption("Mesh", "SecondOrderIncomplete" ,(_useIncomplElem)?1.:0.);
ASSERT(ok);
- }
+ }
}
//================================================================================
void GMSHPlugin_Mesher::CreateGmshCompounds()
{
MESSAGE("GMSHPlugin_Mesher::CreateGmshCompounds");
-
+
SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
-
+
OCC_Internals* occgeo = _gModel->getOCCInternals();
bool toSynchronize = false;