// Copyright (C) 2007-2022 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 // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : NETGENplugin_Runnner_main.cxx // Author : Yoann AUDOUIN, EDF // Module : NETGEN // #include "NETGENPlugin_NETGEN_3D_SA.hxx" #include #include #include #include /** * @brief Main function * * @param argc Number of arguments * @param argv Arguments * * @return error code */ int main(int argc, char *argv[]){ if(argc!=9||(argc==2 && (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help")==0))){ std::cout << "Error in number of arguments "<< argc<<" given expected 8" <> thing; if (output_mesh_file == "NONE") output_mesh_file = ""; if (element_orientation_file == "NONE") element_orientation_file = ""; if (new_element_file == "NONE") new_element_file = ""; if (mesher=="NETGEN3D"){ auto begin = std::chrono::high_resolution_clock::now(); NETGENPlugin_NETGEN_3D_SA myplugin; myplugin.run(input_mesh_file, shape_file, hypo_file, element_orientation_file, new_element_file, output_mesh_file, nbThreads); auto end = std::chrono::high_resolution_clock::now(); auto elapsed = std::chrono::duration_cast(end - begin); std::cout << "Time elapsed: " << elapsed.count()*1e-9 << std::endl; } else { std::cerr << "Unknown mesher:" << mesher << std::endl; } return 0; }