1 // Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // NETGENPlugin : C++ implementation
21 // File : NETGENPlugin_NETGEN_2D_SA.hxx
22 // Author : Cesar Conopoima (OCC)
25 //=============================================================================
27 #ifndef _NETGENPlugin_NETGEN_2D_SA_HXX_
28 #define _NETGENPlugin_NETGEN_2D_SA_HXX_
30 #include "NETGENPlugin_Defs.hxx"
31 #include "NETGENPlugin_DriverParam.hxx"
32 #include "NETGENPlugin_NETGEN_2D_ONLY.hxx"
33 #include "SMESH_Algo.hxx"
34 #include "SMESH_Mesh.hxx"
36 class NETGENPlugin_Mesher;
38 class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D_SA: public NETGENPlugin_NETGEN_2D_ONLY
41 NETGENPlugin_NETGEN_2D_SA();
42 virtual ~NETGENPlugin_NETGEN_2D_SA();
44 bool Compute(SMESH_Mesh& aMesh, TopoDS_Shape &aShape, std::string new_element_file );
46 int run(const std::string input_mesh_file,
47 const std::string shape_file,
48 const std::string hypo_file,
49 const std::string element_orientation_file,
50 const std::string new_element_file,
51 const std::string output_mesh_file);
53 bool fillNewElementFile( std::string new_element_file,
54 const int numberOfGlobalPremeshedNodes,
55 std::map<int,const SMDS_MeshNode*>& premeshedNodes,
56 std::map<int,std::vector<double>>& newNetgenCoordinates,
57 std::map<int,std::vector<smIdType>>& newNetgenElements );
60 bool checkOrientationFile( const std::string element_orientation_file );
61 void fillHyp(const std::string param_file, netgen_params aParams);