Salome HOME
[bos #38045] [EDF] (2023-T3) Stand alone version for Netgen meshers.
[plugins/netgenplugin.git] / src / NETGENPlugin / NETGENPlugin_NETGEN_2D_SA.hxx
1 // Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // NETGENPlugin : C++ implementation
21 // File      : NETGENPlugin_NETGEN_2D_SA.hxx
22 // Author    : Cesar Conopoima (OCC)
23 // Date      : 23/10/2023
24 // Project   : SALOME
25 //=============================================================================
26 //
27 #ifndef _NETGENPlugin_NETGEN_2D_SA_HXX_
28 #define _NETGENPlugin_NETGEN_2D_SA_HXX_
29
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"
35
36 class NETGENPlugin_Mesher;
37
38 class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D_SA: public NETGENPlugin_NETGEN_2D_ONLY
39 {
40 public:
41   NETGENPlugin_NETGEN_2D_SA();
42   virtual ~NETGENPlugin_NETGEN_2D_SA();
43
44   bool Compute(SMESH_Mesh& aMesh, TopoDS_Shape &aShape, std::string new_element_file );
45   
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);
52
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 );
58 protected:
59   
60   void fillHyp(const std::string param_file, netgen_params aParams);
61 };
62
63 #endif