⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drawbdmesh.cpp

📁 FreeFem++可以生成高质量的有限元网格。可以用于流体力学
💻 CPP
字号:
// ********** DO NOT REMOVE THIS BANNER **********//// SUMMARY: Bamg: Bidimensional Anisotrope Mesh Generator// RELEASE: 0 //// AUTHOR:   F. Hecht,    // ORG    :  INRIA// E-MAIL :   Frederic.Hecht@Inria.fr   //// ORIG-DATE:     Dec 97/*  This file is part of Freefem++  Freefem++ 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.  Freefem++  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 Freefem++; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */// E-MAIL :   Frederic.Hecht@Inria.fr   //// ORIG-DATE:     Dec 97#include <cstdlib>#include <cstdio>#include <string.h>#include <setjmp.h>#include <new>#include <cassert>#include "Meshio.h"#include "Mesh2.h"#include "QuadTree.h"using namespace bamg; extern long verbosity;#ifdef DRAWING bool withrgraphique=true; #elsebool withrgraphique=false; #endif//#include <fstream.h>int initgraph=0;void NewHandler();void NewHandler(){ cerr << " Not enought memory " << endl;  exit(1);}void forDebug();void forDebug(){ #ifdef DRAWING if(initgraph) {  rattente(1);  closegraphique();}#endif//  DelAllocData();  cout << "on a fini" << endl;}void  MeshErrorIO(ios& ){  MeshError(999);  exit(1);}int mymain(int argc, char **argv){   MeshIstreamErrorHandler = MeshErrorIO;  //  atexit( forDebug);  double raison=0;  verbosity = 9;    set_new_handler( &NewHandler);   char * fmeshback= "1.mesh";   char * fmetrix= 0;     ostream *f_metr(&cout);    if (argc >=2)      fmeshback = argv[1];     if (argc >=3)      fmetrix   = argv[2];     if (argc >=4)       raison   =  atof(argv[3]);   #ifdef DRAWING    initgraphique();    initgraph=1;#endif   cout << "open " << fmeshback << " raison = " << raison <<  endl;   Triangles TTh(fmeshback);   Real8 hmin = TTh.MinimalHmin();   Real8 hmax = TTh.MaximalHmax();   Real8 coef = 1;   if (fmetrix)         TTh.ReadMetric(fmetrix,hmin,hmax,coef);        #ifdef DRAWING      reffecran();     TTh.InitDraw();     TTh.inquire();	if(raison&& fmetrix)	  {	    TTh.inquire();	    TTh.SmoothMetric(raison);	  }     if (fmetrix)       for(Int4 i=0;i<TTh.nbv;i++)	   ((Metric) TTh.vertices[i]).Draw(TTh.vertices[i]);         TTh.Draw();     TTh.inquire();     closegraphique();#endif   return(0); }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -