ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/app/tutoriel/src/main2.cpp
Revision: 1063
Committed: Wed Jun 2 17:59:49 2021 UTC (4 years, 2 months ago) by francois
File size: 1102 byte(s)
Log Message:
reorganisation des repertoires de magic suite

File Contents

# Content
1 #include "gestionversion.h"
2 #include <stdio.h>
3 #include "mg_file.h"
4 #include "fct_taille_fem_solution.h"
5 #include "mailleur0d.h"
6 #include "mailleur1d.h"
7 #include "mailleur2d.h"
8 #include "mailleur3d.h"
9
10
11 int main(void)
12 {
13 printf("Projet2\n");
14 MG_FILE gest((char*)"ejectorBG.magic");
15 MG_GEOMETRIE *geo=gest.get_mg_geometrie(0);
16 FCT_TAILLE_FEM_SOLUTION sizemap((char*)"ejectorB.ctt");
17 int nbcell=sizemap.get_maillage()->get_nb_fem_element3();
18 printf("%d cellules\n",nbcell);
19 MG_MAILLAGE *mai=new MG_MAILLAGE(geo);
20 gest.ajouter_mg_maillage(mai);
21 printf("0D\n");
22 MAILLEUR0D m0d(mai,geo);
23 m0d.maille();
24 printf("1D\n");
25 MAILLEUR1D m1d(mai,geo,&sizemap);
26 m1d.maille();
27 printf("2D\n");
28 MAILLEUR2D m2d(mai,geo,&sizemap);
29 m2d.maille();
30 printf("3D\n");
31 MAILLEUR3D m3d(mai,geo,&sizemap,false);
32 m3d.maille();
33 int nbnode=mai->get_nb_mg_noeud();
34 int nbseg=mai->get_nb_mg_segment();
35 int nbtri=mai->get_nb_mg_triangle();
36 int nbtetra=mai->get_nb_mg_tetra();
37 printf("%d nodes %d segments %d triangles %d tetra\n",nbnode,nbseg,nbtri,nbtetra);
38 gest.enregistrer("ejectorBGM.magic");
39 }

Properties

Name Value
svn:executable *