ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/app/CAD4FE/src/main.cpp
Revision: 253
Committed: Tue Jul 13 19:40:46 2010 UTC (15 years ago) by francois
File size: 21314 byte(s)
Log Message:
changement de hiearchie et utilisation de ccmake + mise a jour

File Contents

# User Rev Content
1 foucault 30 //------------------------------------------------------------
2     //------------------------------------------------------------
3     // MAGiC
4     // Jean Christophe Cuilli�e et Vincent FRANCOIS
5     // D�artement de G�ie M�anique - UQTR
6     //------------------------------------------------------------
7     // Le projet MAGIC est un projet de recherche du d�artement
8     // de g�ie m�anique de l'Universit�du Qu�ec �
9     // Trois Rivi�es
10     // Les librairies ne peuvent �re utilis�s sans l'accord
11     // des auteurs (contact : francois@uqtr.ca)
12     //------------------------------------------------------------
13     //------------------------------------------------------------
14     //
15     // main.cpp
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 �11H25
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23     #include "gestionversion.h"
24     #ifdef WINDOWS_VERSION
25     #include "fenetre.h"
26     #endif
27     #include <sstream>
28     #include <fstream>
29     #include <string>
30     #include <time.h>
31     #include <float.h>
32    
33     #pragma hdrstop
34    
35     #include "main.h"
36    
37     #include "mg_file.h"
38     #include "fct_taille.h"
39     #include "CAD4FE_mailleur0d.h"
40     #include "CAD4FE_mailleur1d.h"
41     #include "CAD4FE_mailleur2d.h"
42     #include "mailleur3d_dia.h"
43     #include "CAD4FE_MeshQualityReport.h"
44     #include "fct_generateur_3D.h"
45     #include "fct_generateur_constante.h"
46    
47    
48     #include "CAD4FE_MCAA.h"
49     #include "CAD4FE_FileUtils.h"
50     #include "CAD4FE_MCAAHtmlReport.h"
51     #include "mg_gestionnaire.h"
52     #include "CAD4FE_MCBody.h"
53     #include "CAD4FE_MCVertex.h"
54     #include "CAD4FE_MCEdge.h"
55     #include "CAD4FE_MCFace.h"
56     #include "CAD4FE_PolyCurve.h"
57     #include "CAD4FE_PolySurface.h"
58     #include "CAD4FE_InventorText_MCAA.h"
59     #include "CAD4FE_InventorText_MG_MAILLAGE.h"
60     #include "CAD4FE_InventorText_MCMesh.h"
61     #include "CAD4FE_SW_FeatureSimplification.h"
62     #include "CAD4FE_construire_fem_maillage_quadratique.h"
63     #include "CAD4FE_MCMesh_SetSaveFormat.h"
64     #include "fct_generateur_3D.h"
65    
66     //---------------------------------------------------------------------------
67    
68     void affiche(char* message)
69     {
70     #if !defined(CONSOLE) && defined(WINDOWS_VERSION)
71     Form1->Memo1->Lines->Add(message);
72     #else
73     std::cout << message << std::endl;
74     #endif
75     }
76    
77 foucault 64 #define FLOAT_UNDEF -504333333341.5
78 foucault 30
79     #if !defined(CONSOLE) && defined(WINDOWS_VERSION)
80     int amain(int argc,char **argv)
81     #else
82     int main(int argc,char **argv)
83     #endif
84     {
85     #ifdef __BORLANDC__
86     // Very important in Borland C++ : disable floating point overflow exceptions !
87     // (because we don't want unexpected program terminations during production phase)
88     // For more information, see float.h file, and Borland C++ help files
89     _control87(MCW_EM,MCW_EM);
90     #endif
91    
92    
93     int debug = 0;
94     int res=0;
95    
96     /// internal parameters
97     MG_VOLUME * refBody=NULL, *mcBody=NULL;
98     MG_MAILLAGE * refTessellation;
99     MG_MAILLAGE * mgmai;
100     MG_GESTIONNAIRE * gest=NULL;
101     MG_GEOMETRIE * mggeo=NULL;
102     FCT_TAILLE *metrique;
103    
104     /// general parameters
105     char CTT_filename[5000];
106     char MAGIC_filename[5000];
107     char TEMP_SLD_filename[5000];
108     char SLD_filename[5000];
109     int typecarte;
110     double eng;
111    
112     double qual_couleurs[100],qual_intervalles[100];
113     int qual_nb;
114     double qual_forme_couleurs[100],qual_forme_intervalles[100];
115     int qual_forme_nb;
116    
117 foucault 64 //// Feature Simplification parameters
118     bool bNothing;
119 foucault 30 bool bFillet=false, bHole=false, bExtrusion=false;
120 foucault 64 bool bFastener=false, bImplicitHoles=false, bRibs=false;
121 foucault 30 int stopetape1 = 0;
122 foucault 64
123     /// MCT parameters
124     double epsilon_max=FLOAT_UNDEF, beta_max=FLOAT_UNDEF, J_max=FLOAT_UNDEF;
125 foucault 30
126     /// CAD4FE Mesher parameters
127     int niveau=2;
128     double prioritemetrique=0.65;
129     int formatmaillage = 0;
130    
131     /// FEM Maillage and Export COSMOS/M parameters
132     FEM_MAILLAGE * femMesh = NULL;
133     int fem_maillage_degre=-1;
134     char * fem_maillage_export_cosmos=0;
135    
136     /// Reading the command line parameters :
137     for (int i=0;i<argc;i++)
138     {
139     if (strcmp(argv[i],"-debug")==0)
140     debug=1;
141     //// Example : -fillet -hole -extrusion -fastener -niveau 2 -prioritemetrique 0.65 -console -carte c:/gilles/doctorat/CAD_FEA_models/Plots_fixation/plots_fixationMAGiC.txt.ctt -sld c:/gilles/doctorat/CAD_FEA_models/Plots_fixation/plots_fixation2MAGIC.Sldprt
142     /// general parameters
143     if (strcmp(argv[i],"-carte")==0)
144     sprintf(CTT_filename,"%s",argv[i+1]);
145     if (strcmp(argv[i],"-magic")==0)
146     strcpy(MAGIC_filename,argv[i+1]);
147     if (strcmp(argv[i],"-sld")==0)
148     strcpy(SLD_filename,argv[i+1]);
149     if (strcmp(argv[i],"-typecarte")==0)
150     typecarte=atoi(argv[i+1]);
151     if (strcmp(argv[i],"-eng")==0)
152     eng=atof(argv[i+1]);
153     if (strcmp(argv[i],"-stopetape1")==0)
154     stopetape1=1;
155     if (strcmp(argv[i],"-formatmaillage")==0)
156     // 0=save as MCNode, MCSegment, MCTriangle
157     // 1=save as MG_NOEUD, MG_SEGMENT, MG_TRIANGLE
158     // 2=no MCT adaptation, generate mesh on the CAD topology
159     formatmaillage=atoi(argv[i+1]);
160     if (strcmp(argv[i],"-couleurqualite")==0)
161     {
162     int j=i+1;
163     qual_nb = atoi(argv[j++]);
164     qual_couleurs[0]=qual_couleurs[1]=qual_couleurs[2]=0;
165     for (int k=1;k<qual_nb+1; k++)
166     {
167     qual_couleurs[3*k+0]=atof(argv[j++]);
168     qual_couleurs[3*k+1]=atof(argv[j++]);
169     qual_couleurs[3*k+2]=atof(argv[j++]);
170     }
171     qual_intervalles[0]=0;
172     qual_intervalles[qual_nb]=1;
173     for (int k=1;k<qual_nb; k++)
174     {
175     qual_intervalles[k]=atof(argv[j++]);
176     }
177     }
178     //// Feature Simplification parameters
179     if (strcmp(argv[i],"-fillet")==0)bFillet=true;
180     if (strcmp(argv[i],"-hole")==0)bHole=true;
181     if (strcmp(argv[i],"-extrusion")==0)bExtrusion=true;
182     if (strcmp(argv[i],"-fastener")==0)bFastener=true;
183     if (strcmp(argv[i],"-implicitholes")==0)bImplicitHoles=true;
184 foucault 64 if (strcmp(argv[i],"-ribs")==0)bRibs=true;
185     bNothing = (!bFillet&&!bHole&&!bExtrusion&&!bFastener&&!bImplicitHoles&&!bRibs);
186 foucault 30
187     /// MCAA parameters
188 foucault 64 if (strcmp(argv[i],"-epsilonmax")==0) epsilon_max=atof(argv[i+1]);
189     if (strcmp(argv[i],"-betamax")==0) beta_max=atof(argv[i+1]);
190     if (strcmp(argv[i],"-jmax")==0) J_max=atof(argv[i+1]);
191 foucault 30
192 foucault 64
193 foucault 30 /// CAD4FE Mesher parameters
194     if (strcmp(argv[i],"-niveau")==0)
195     niveau=atoi(argv[i+1]);
196     if (strcmp(argv[i],"-prioritemetrique")==0)
197     prioritemetrique=atof(argv[i+1]);
198    
199     /// FEM Maillage and Export COSMOS/M parameters
200     if (strcmp(argv[i],"-femmaillagedegre")==0)
201     fem_maillage_degre = atoi(argv[i+1]);
202     if (strcmp(argv[i],"-femmaillageexportcosmos")==0)
203     fem_maillage_export_cosmos = argv[i+1];
204     }
205    
206     //// Basename of reports
207     std::string basename (getenv("TEMP"));
208     basename += std::string("\\CAD4FE");
209    
210     // Copy file to temporary file
211     strncpy(TEMP_SLD_filename,SLD_filename,strlen(SLD_filename)-strlen(".SLDPRT"));
212     TEMP_SLD_filename[strlen(SLD_filename)-strlen(".SLDPRT")]='\0';
213     strcat(TEMP_SLD_filename,"TEMP.SLDPRT");
214     res=CAD4FE::FileUtils::Copy(SLD_filename,TEMP_SLD_filename);
215     if (res == 0)
216     {
217     affiche( "Error occured while reading SolidWorks file" );
218     return 0;
219     }
220    
221     // Open SolidWorks part
222     affiche ("Starting SolidWorks ATL/COM server");
223     CAD4FE::SW_FeatureSimplification featureSimplification;
224     featureSimplification.OpenPart(TEMP_SLD_filename);
225     if (typecarte == 1)
226     {
227     affiche("Type of size map : constant value");
228     double bbox[6];
229     featureSimplification.GetPartBoundaryBox(bbox);
230     MG_GESTIONNAIRE gesttmp;
231     metrique = new FCT_GENERATEUR_CONSTANTE ( gesttmp, eng );
232     ((FCT_GENERATEUR_CONSTANTE*)metrique)->construit(bbox[0]-1,bbox[1]-1,bbox[2]-1,bbox[0+3]+1,bbox[1+3]+1,bbox[2+3]+1,2,2);
233     ((FCT_GENERATEUR_CONSTANTE*)metrique)->enregistrer((char*)(basename+std::string("_MCBody.magic.ctt")).c_str());
234 foucault 64 featureSimplification.SetSizeMap(metrique);
235 foucault 30 }
236     if (typecarte == 2)
237     {
238     affiche("Type of size map : ctt file");
239     FCT_GENERATEUR_3D<4> * sizeMap = new FCT_GENERATEUR_3D<4>();
240     sizeMap->lire(CTT_filename);
241 foucault 64 metrique=sizeMap;
242     featureSimplification.SetSizeMap(metrique);
243 foucault 30 }
244 foucault 64 if (typecarte == 3)
245     {
246     affiche("Type of size map : pog file");
247     featureSimplification.ReadSizeMapRefinementFile(CTT_filename);
248     metrique = featureSimplification.GetSizeMap();
249     }
250    
251 foucault 30 affiche("*** Adapting the SolidWorks Feature-Tree for Meshing***");
252 foucault 64
253     if (bNothing == false)
254     {
255     featureSimplification.DeleteAllConstraintsInSketches();
256     int nbThickenFeature = featureSimplification.ThickenFeature_GetCount();
257     //int nbThickenFeature = 0;
258     for (int i=0;i<=nbThickenFeature;i++)
259     {
260     if (i==nbThickenFeature)
261     featureSimplification.EndEditRollback();
262     else
263     featureSimplification.ThickenFeature_EditRollback(i);
264    
265     char tempMessage[5000];
266     sprintf(tempMessage,"Pass %d of %d",i+1,nbThickenFeature+1);
267     affiche (tempMessage);
268    
269     if (bFastener) {
270     affiche("Simplifying fastener features");
271     featureSimplification.SimplifyFeature_PlotFixation();
272     }
273     if (bHole) {
274     affiche("Simplifying 'hole wizard' and 'revolution cut' features");
275     featureSimplification.SimplifyFeature_HoleWzd();
276     }
277     if (bExtrusion) {
278     affiche("Simplifying 'Cut' 'Boss' 'BossThin' 'CutThin' features");
279     featureSimplification.SimplifyFeature_GlobalCutBoss();
280     }
281     if (bFillet) {
282     affiche("Simplifying constant-radius fillets");
283     featureSimplification.SimplifyFeature_Fillet();
284     affiche("Simplifying chamfers");
285     featureSimplification.SimplifyFeature_Chamfers();
286     }
287     if (bExtrusion)
288     featureSimplification.SimplifyFeature_GlobalCutBoss();
289    
290     if (bRibs)
291     {
292     affiche("Simplifying ribs");
293     featureSimplification.SimplifyFeature_Rib();
294     }
295     }
296     // Features that are recognized on the final B-Rep
297    
298     if (bImplicitHoles)
299     {
300     affiche("Deleting small revolved holes/bosses that are implicit (skecth holes)");
301     featureSimplification.SimplifyFeature_Body();
302     }
303 foucault 30 }
304 foucault 64
305 foucault 30 affiche("*** End of the SolidWorks Feature-Tree adaptation ***");
306    
307     /// Generate HTML Report file
308     CAD4FE::HtmlText_Page out;
309     out.Add("<h2>MCAA Mesher Report</h2>");
310     out.Add(featureSimplification.HtmlReport());
311     affiche("MAGiC: Generating MAGiC file with SolidWorks part...");
312     featureSimplification.SaveAsMagicFile(MAGIC_filename, &gest);
313     if( remove( TEMP_SLD_filename ) != 0)
314     affiche ("Error deleting SolidWorks file : (SolidWorks still open?)");
315 foucault 64 out.WriteFile(basename+".html");
316 foucault 30 if (stopetape1)
317     {
318     affiche("Exit with success!");
319     return 0;
320     }
321    
322     /// initialize MAGIC data-structure
323     mggeo=gest->get_mg_geometrie(0);
324     refBody = mggeo->get_mg_volume(0);
325     refTessellation=gest->get_mg_maillage(0);
326    
327     /// MCAA : generation of the MCT (Meshing Constraints Topology)
328     affiche ("Generation of the MCT (Meshing Constraints Topology)");
329     affiche ("Initializing the Meshing Constraints Automatic Adaptation with the B-Rep");
330     CAD4FE::MCAA * mcaa = new CAD4FE::MCAA(refBody,refTessellation,gest,mggeo);
331     gest->enregistrer((char*)(basename+std::string("_MCBody.magic")).c_str());
332 foucault 64 if (J_max != FLOAT_UNDEF) mcaa->SetMaxOverdensity(J_max);
333     if (beta_max != FLOAT_UNDEF) mcaa->SetLimitAngle(beta_max*M_PI/180);
334     if (epsilon_max != FLOAT_UNDEF) mcaa->SetRelativeSag(epsilon_max);
335    
336 foucault 30 CAD4FE::MCAAHtmlReport mcaaReport (mcaa, basename);
337     mcaa->SetSizeMap(metrique);
338     mcaaReport.WriteInitialCriteriaFile();
339     if (formatmaillage != 2)
340     {
341     affiche ("Adapting the MCT for Meshing");
342     mcaa->Simplify();
343     char tmpMessage[5000];
344     sprintf(tmpMessage,"Deleted %d MC Edges",mcaa->GetEdgeDeletionCount()); affiche(tmpMessage);
345     sprintf(tmpMessage,"Deleted %d MC Vertices",mcaa->GetVertexDeletionCount()); affiche(tmpMessage);
346     sprintf(tmpMessage,"Contracted %d MC Edges on MC Vertices",mcaa->GetEdgeCollapseCount()); affiche(tmpMessage);
347     sprintf(tmpMessage,"Collapsed %d constricted sections",mcaa->GetConstrictedSectionCollapseCount()); affiche(tmpMessage);
348     sprintf(tmpMessage,"Deleted %d small loops",mcaa->GetLoopDeletionCount()); affiche(tmpMessage);
349     }
350     mcaaReport.WriteFinalFEMeshFile();
351 foucault 64 mcaaReport.WriteFinalMCTFile();
352 foucault 30 affiche ("Converting MCT hypergraphs to B-Rep model");
353     mcBody = mcaa->GetMCBody()->ExportBRep();
354     mcaaReport.Build();
355     out.Add(mcaaReport);
356     if (formatmaillage != 2)
357     {
358     delete mcaa;
359 foucault 64 }
360     out.WriteFile(basename+".html");
361 foucault 30
362     gest->enregistrer((char*)(basename+std::string("_MCBody.magic")).c_str());
363     /// Meshing the MCT
364     std::set < CAD4FE::MCFace * > lst_mc_faces;
365     std::set < CAD4FE::MCEdge * > lst_mc_edges;
366     std::set < CAD4FE::MCVertex * > lst_mc_vertices;
367     std::set < MG_COQUILLE * > lst_mc_shell;
368     std::set < MG_BOUCLE * > lst_mc_loop;
369    
370     // initialize MC face, MC edge, MC loop, MC shell, and MC vertices lists
371     unsigned nb_shells = mcBody->get_nb_mg_coquille ();
372     for (unsigned it_shells = 0; it_shells < nb_shells; it_shells++)
373     {
374     MG_COQUILLE * shell = mcBody->get_mg_coquille(it_shells);
375     lst_mc_shell.insert(shell);
376     unsigned nb_coface = shell->get_nb_mg_coface();
377     for (unsigned it_coface = 0; it_coface < nb_coface; it_coface++)
378     {
379     CAD4FE::MCFace * face = (CAD4FE::MCFace *)shell->get_mg_coface(it_coface)->get_face();
380     lst_mc_faces.insert(face);
381    
382     unsigned nb_loop = face->get_nb_mg_boucle();
383     for (unsigned it_loop = 0; it_loop < nb_loop; it_loop++)
384     {
385     MG_BOUCLE * loop = face->get_mg_boucle(it_loop);
386     lst_mc_loop.insert(loop);
387     unsigned nb_edge = loop->get_nb_mg_coarete();
388    
389     for (unsigned it_edge = 0; it_edge < nb_edge; it_edge++)
390     {
391     CAD4FE::MCEdge * edge = (CAD4FE::MCEdge*)loop->get_mg_coarete(it_edge)->get_arete();
392     lst_mc_edges.insert(edge);
393    
394     lst_mc_vertices.insert ((CAD4FE::MCVertex*)edge->get_cosommet1()->get_sommet());
395     lst_mc_vertices.insert ((CAD4FE::MCVertex*)edge->get_cosommet2()->get_sommet());
396     }
397     }
398     }
399     }
400    
401     mgmai=new MG_MAILLAGE(mggeo);
402     gest->ajouter_mg_maillage(mgmai);
403    
404     if (niveau>-1)
405     {
406     affiche("MAILLAGE 0D");
407     for (std::set<CAD4FE::MCVertex *>::iterator itVertex = lst_mc_vertices.begin(); itVertex != lst_mc_vertices.end(); itVertex++)
408     {
409 foucault 64 double coo[3];
410     CAD4FE::MCVertex * mcVertex = *itVertex;
411     mcVertex->get_point()->evaluer(coo);
412     CAD4FE::MCNode * n = new CAD4FE::MCNode(mcVertex,mcVertex->GetRefVertex(),coo[0],coo[1],coo[2]);
413     n->incrementer();
414     mcVertex->get_lien_maillage()->ajouter(n);
415 foucault 30 mgmai->ajouter_mg_noeud(n);
416     }
417     }
418     if (niveau>0)
419     {
420     affiche("MAILLAGE 1D");
421     for (std::set<CAD4FE::MCEdge *>::iterator itEdge = lst_mc_edges.begin(); itEdge != lst_mc_edges.end(); itEdge++)
422     {
423     CAD4FE::MCEdge* mcEdge=*itEdge;
424     printf("Arete %d\n", mcEdge->get_id());
425     CAD4FE::MAILLEUR1D m1d(mgmai,mggeo,mcEdge,metrique);
426     m1d.maille();
427     }
428     }
429     if (niveau>1)
430     {
431     affiche("MAILLAGE 2D");
432     CAD4FE::MAILLEUR2D::priorite_metrique=prioritemetrique;
433     int iFace=0;
434     for (std::set<CAD4FE::MCFace *>::iterator itFace = lst_mc_faces.begin(); itFace != lst_mc_faces.end(); itFace++)
435     {
436     char mess[100];
437     CAD4FE::MCFace* face=*itFace;
438     sprintf(mess," face %d / %d ",++iFace,lst_mc_faces.size());
439     affiche(mess);
440     affiche("");
441     CAD4FE::MAILLEUR2D m2d(mgmai,mggeo,face,metrique);
442     m2d.debug=debug;
443     #if !defined(CONSOLE) && defined(WINDOWS_VERSION)
444     clock_t time = clock();
445     sprintf(Form1->filenameNbTriangles,"%s\\CAD4FE_%d.txt",getenv("TEMP"),time);
446     strcpy(m2d.filenameNbTriangles,Form1->filenameNbTriangles);
447     #endif
448     m2d.maille();
449     #if !defined(CONSOLE) && defined(WINDOWS_VERSION)
450     remove(Form1->filenameNbTriangles);
451     #endif
452     }
453     }
454    
455     CAD4FE::MeshQualityReport meshQualReport(mgmai, metrique, basename);
456     meshQualReport.SetQualityColorMap(qual_nb, qual_intervalles, qual_couleurs);
457     meshQualReport.Build();
458     out.Add(meshQualReport);
459     out.Add("<h3>FEM_MAILLAGE and COSMOS/M output</h3>");
460     if ((fem_maillage_degre==1||fem_maillage_degre==2) && (niveau == 3))
461     {
462     std::ostringstream tmp;tmp<<"Degree of elements = "<<(fem_maillage_degre)<<"<br>";
463 foucault 64 tmp<<"The session file is located <a href=\"file:///"<<fem_maillage_export_cosmos<<".ses\">here</a>, Use the following command in COSMOS/M";
464     tmp<<"<pre>FILE,"<<fem_maillage_export_cosmos<<".ses,0,0,0</pre><br>";
465 foucault 30 out.Add(tmp.str());
466     }
467     if (niveau == 1)
468     {
469     std::ostringstream tmp;tmp<<"The \"FEM_MAILLAGE\" and COSMOS meshes were not generated because only the mesh of curves was generated<br>";
470     out.Add(tmp.str());
471     }
472    
473     if (niveau == 2)
474     {
475     std::ostringstream tmp;tmp<<"The \"FEM_MAILLAGE\" and COSMOS meshes were not generated because only the surfacic mesh was generated<br>";
476     out.Add(tmp.str());
477     }
478     out.WriteFile(basename+".html");
479    
480    
481     CAD4FE::MCMesh_SetSaveFormat(mgmai,formatmaillage);
482     if (formatmaillage==2)
483     {
484     mcaa->GetMCBody()->DeleteBRep(gest,mggeo);
485     }
486    
487     if (niveau==3)
488     {
489     affiche("MAILLAGE 3D");
490     if (formatmaillage == 2)
491     {
492     ::MAILLEUR3D_DIA m3d(mgmai,mggeo,refBody);
493     m3d.maille(refBody);
494     }
495     else
496     {
497     ::MAILLEUR3D_DIA m3d(mgmai,mggeo,mcBody);
498     m3d.maille(mcBody);
499     }
500     }
501    
502     /// FEM Maillage
503     if (fem_maillage_degre==1 && niveau == 3)
504     {
505     affiche("Generating \"FEM maillage\" with linear mesh elements");
506     femMesh = new FEM_MAILLAGE (mggeo, mgmai, 1);
507     gest->ajouter_fem_maillage(femMesh);
508     femMesh->construire(0);
509     }
510     if (fem_maillage_degre==2 && niveau == 3)
511     {
512     affiche("Generating \"FEM maillage\" with quadratic mesh elements");
513     femMesh = new FEM_MAILLAGE (mggeo, mgmai, 2);
514     gest->ajouter_fem_maillage(femMesh);
515     CAD4FE::construire_fem_maillage_quadratique(femMesh);
516     }
517     if (fem_maillage_export_cosmos && femMesh)
518     {
519     affiche ("Exporting to COSMOS/M session file");
520     std::string tmpFilename(fem_maillage_export_cosmos);
521     femMesh->exporter_cosmos(tmpFilename);
522     }
523    
524     affiche("Enregistrement");
525     gest->enregistrer(MAGIC_filename);
526    
527     affiche("Finished successfully");
528    
529     delete metrique;
530     delete gest;
531    
532     return 0;
533     }
534    
535    
536    
537     #pragma package(smart_init)