Path: blob/devel/ElmerGUI/Application/src/meshingthread.h
3203 views
/*****************************************************************************1* *2* Elmer, A Finite Element Software for Multiphysical Problems *3* *4* Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland *5* *6* This program is free software; you can redistribute it and/or *7* modify it under the terms of the GNU General Public License *8* as published by the Free Software Foundation; either version 2 *9* of the License, or (at your option) any later version. *10* *11* This program is distributed in the hope that it will be useful, *12* but WITHOUT ANY WARRANTY; without even the implied warranty of *13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *14* GNU General Public License for more details. *15* *16* You should have received a copy of the GNU General Public License *17* along with this program (in file fem/GPL-2); if not, write to the *18* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *19* Boston, MA 02110-1301, USA. *20* *21*****************************************************************************/2223/*****************************************************************************24* *25* ElmerGUI meshingthread *26* *27*****************************************************************************28* *29* Authors: Mikko Lyly, Juha Ruokolainen and Peter Råback *30* Email: [email protected] *31* Web: http://www.csc.fi/elmer *32* Address: CSC - IT Center for Science Ltd. *33* Keilaranta 14 *34* 02101 Espoo, Finland *35* *36* Original Date: 15 Mar 2008 *37* *38*****************************************************************************/3940#ifndef MESHINGTHREAD_H41#define MESHINGTHREAD_H4243#include <QThread>4445#ifdef WIN3246#include <windows.h>47#else48#include <dlfcn.h>49#endif5051#include "plugins/tetlib_api.h"52#include "plugins/nglib_api.h"5354namespace nglib {55#include "nglib.h"56}5758class MeshingThread : public QThread59{60Q_OBJECT6162public:63MeshingThread(QObject *parent = 0);64~MeshingThread();6566void generate(int generatorType, QString cs,67TetlibAPI *tetlibAPI,68nglib::Ng_Mesh *ngmesh,69nglib::Ng_STL_Geometry *nggeom,70nglib::Ng_Geometry_2D *nggeom2d,71int ngDim, nglib::Ng_Meshing_Parameters *mp);7273void stopMeshing();7475nglib::Ng_Mesh *getNgMesh();7677protected:78void run();7980private:81int generatorType;8283// tetlib:84QString tetgenControlString;85TetlibAPI *tetlibAPI;86tetgenio *in;87tetgenio *out;88delegate_tetrahedralize_t delegate_tetrahedralize;8990// nglib:91NglibAPI *nglibAPI;92nglib::Ng_Mesh *ngmesh;93nglib::Ng_STL_Geometry *nggeom;94nglib::Ng_Geometry_2D *nggeom2d;95nglib::Ng_Meshing_Parameters *mp;96int ngDim;97};9899#endif // MESHINGTHREAD_H100101102