-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 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 "NETGENPlugin_DriverParam.hxx"
-#include "NETGENPlugin_Hypothesis.hxx"
-
-#include <SMESH_Gen.hxx>
-#include <StdMeshers_MaxElementVolume.hxx>
#include <iostream>
#include <fstream>
std::cout << "checkoverlap: " << aParams.checkoverlap << std::endl;
std::cout << "checkchartboundary: " << aParams.checkchartboundary << std::endl;
std::cout << "closeedgefac: " << aParams.closeedgefac << std::endl;
+ std::cout << "nbThreadMesher: " << aParams.nbThreads << std::endl;
std::cout << "has_local_size: " << aParams.has_local_size << std::endl;
std::cout << "meshsizefilename: " << aParams.meshsizefilename << std::endl;
std::cout << "has_maxelementvolume_hyp: " << aParams.has_maxelementvolume_hyp << std::endl;
* @param param_file Name of the file
* @param aParams Structure to fill
*/
-void importNetgenParams(const std::string param_file, netgen_params& aParams, SMESH_Gen *gen){
+void importNetgenParams(const std::string param_file, netgen_params& aParams){
std::ifstream myfile(param_file);
std::string line;
std::getline(myfile, line);
aParams.closeedgefac = std::stoi(line);
std::getline(myfile, line);
+ aParams.nbThreads = std::stoi(line);
+ std::getline(myfile, line);
aParams.has_local_size = std::stoi(line);
std::getline(myfile, line);
aParams.meshsizefilename = line;
std::getline(myfile, line);
aParams.maxElementVolume = std::stoi(line);
- if(aParams.has_netgen_param){
- aParams._hypParameters = new NETGENPlugin_Hypothesis(0, gen);
-
- aParams._hypParameters->SetMaxSize(aParams.maxh);
- aParams._hypParameters->SetMinSize(aParams.minh);
- aParams._hypParameters->SetNbSegPerEdge(aParams.segmentsperedge);
- aParams._hypParameters->SetGrowthRate(aParams.grading);
- aParams._hypParameters->SetNbSegPerRadius(aParams.curvaturesafety);
- aParams._hypParameters->SetSecondOrder(aParams.secondorder);
- aParams._hypParameters->SetQuadAllowed(aParams.quad);
- aParams._hypParameters->SetOptimize(aParams.optimize);
- aParams._hypParameters->SetFineness((NETGENPlugin_Hypothesis::Fineness)aParams.fineness);
- aParams._hypParameters->SetSurfaceCurvature(aParams.uselocalh);
- aParams._hypParameters->SetFuseEdges(aParams.merge_solids);
- aParams._hypParameters->SetChordalErrorEnabled(aParams.chordalError);
- if(aParams.optimize){
- aParams._hypParameters->SetNbSurfOptSteps(aParams.optsteps2d);
- aParams._hypParameters->SetNbVolOptSteps(aParams.optsteps3d);
- }
- aParams._hypParameters->SetElemSizeWeight(aParams.elsizeweight);
- aParams._hypParameters->SetWorstElemMeasure(aParams.opterrpow);
- aParams._hypParameters->SetUseDelauney(aParams.delaunay);
- aParams._hypParameters->SetCheckOverlapping(aParams.checkoverlap);
- aParams._hypParameters->SetCheckChartBoundary(aParams.checkchartboundary);
- aParams._hypParameters->SetMeshSizeFile(aParams.meshsizefilename);
- }
- if(aParams.has_maxelementvolume_hyp){
- aParams._hypMaxElementVolume = new StdMeshers_MaxElementVolume(1, gen);
- }
- // TODO: Handle viscous layer
};
/**
myfile << aParams.checkoverlap << std::endl;
myfile << aParams.checkchartboundary << std::endl;
myfile << aParams.closeedgefac << std::endl;
+ myfile << aParams.nbThreads << std::endl;
myfile << aParams.has_local_size << std::endl;
myfile << aParams.meshsizefilename << std::endl;
myfile << aParams.has_maxelementvolume_hyp << std::endl;