1 |
|
5 |
//------------------------------------------------------------
|
2 |
|
|
//------------------------------------------------------------
|
3 |
|
|
// MAGiC
|
4 |
|
|
// Jean Christophe Cuillière et Vincent FRANCOIS
|
5 |
|
|
// Département de Génie Mécanique - UQTR
|
6 |
|
|
//------------------------------------------------------------
|
7 |
|
|
// Le projet MAGIC est un projet de recherche du département
|
8 |
|
|
// de génie mécanique de l'Université du Québec à
|
9 |
|
|
// Trois Rivières
|
10 |
|
|
// Les librairies ne peuvent être utilisées 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 |
|
|
|
25 |
|
|
#ifdef WINDOWS_VERSION
|
26 |
|
|
#include "fenetre.h"
|
27 |
|
|
#endif
|
28 |
|
|
|
29 |
|
|
#pragma hdrstop
|
30 |
|
|
|
31 |
|
|
#include "main.h"
|
32 |
|
|
#include "sl_solve_elastique.h"
|
33 |
|
|
//--------------------------------------------------------------------------
|
34 |
|
|
#include <sstream.h>
|
35 |
|
|
#include <iostream.h>
|
36 |
|
|
#include <fstream.h>
|
37 |
|
|
#include "sl_rigidite_globale.h"
|
38 |
|
|
#include "sl_conditions_aux_limites.h"
|
39 |
|
|
#include "sl_op_plastique.h"
|
40 |
|
|
#include <iomanip.h>
|
41 |
|
|
#include "sl_tetra.h"
|
42 |
|
|
#include "sl_tetra11.h"
|
43 |
|
|
#include "sl_tetra21.h"
|
44 |
|
|
#include "sl_tetra24.h"
|
45 |
|
|
#include "fem_tetra10.h"
|
46 |
|
|
#include "sl_charge_globale_elastique.h"
|
47 |
|
|
#include "SL_RIGIDITE_3D_ELEMENTAIRE_ELASTIQUE.h"
|
48 |
|
|
#include "sl_critere.h"
|
49 |
|
|
#include "sl_update.h"
|
50 |
|
|
#include "sl_solve_elastoplastique.h"
|
51 |
|
|
#include "ot_systeme.h"
|
52 |
|
|
#include "sld_fonction.h"
|
53 |
|
|
|
54 |
|
|
#include <string>
|
55 |
|
|
#include "tpl_liste_entite.h"
|
56 |
|
|
|
57 |
|
|
//---------------------------------------------------------------------------
|
58 |
|
|
|
59 |
|
|
void affiche(char* message)
|
60 |
|
|
{
|
61 |
|
|
#ifdef WINDOWS_VERSION
|
62 |
|
|
Form1->Memo1->Lines->Add(message);
|
63 |
|
|
#else
|
64 |
|
|
std::cout << message << std::endl;
|
65 |
|
|
#endif
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
#ifdef WINDOWS_VERSION
|
71 |
|
|
int amain(int argc,char **argv)
|
72 |
|
|
#else
|
73 |
|
|
int main(int argc,char **argv)
|
74 |
|
|
#endif
|
75 |
|
|
{
|
76 |
|
|
|
77 |
|
|
//**********************************************************************************//
|
78 |
|
|
// programme principale
|
79 |
|
|
//**********************************************************************************//
|
80 |
|
|
|
81 |
|
|
if (argc<4) return 1;
|
82 |
|
|
int num;
|
83 |
|
|
long id;
|
84 |
|
|
char fichier[500];
|
85 |
|
|
int calcul;
|
86 |
|
|
for (int i=0;i<argc;i++)
|
87 |
|
|
{
|
88 |
|
|
if (strcmp(argv[i],"-fichier")==0) strcpy(fichier,argv[i+1]);
|
89 |
|
|
if (strcmp(argv[i],"-code")==0) num=atoi(argv[i+1]);
|
90 |
|
|
if (strcmp(argv[i],"-id")==0) id=atol(argv[i+1]);
|
91 |
|
|
if (strcmp(argv[i],"-elastique")==0) calcul=1;
|
92 |
|
|
if (strcmp(argv[i],"-elastoplastique")==0) calcul=2;
|
93 |
|
|
}
|
94 |
|
|
affiche("=====================================");
|
95 |
|
|
affiche("SOLVEUR ELASTO-PLASTIQUE MAGiC");
|
96 |
|
|
affiche(" UQTR-LGM");
|
97 |
|
|
affiche("=====================================");
|
98 |
|
|
affiche("");
|
99 |
|
|
affiche("");
|
100 |
|
|
affiche("Lecture du fichier de données");
|
101 |
|
|
affiche("Calcul élastique");
|
102 |
|
|
affiche("------------------------------------");
|
103 |
|
|
SL_SOLVE_ELASTIQUE solve1(num,fichier,id,1);
|
104 |
|
|
solve1.resoud();
|
105 |
|
|
if (calcul==2)
|
106 |
|
|
{
|
107 |
|
|
affiche("Calcul élastique");
|
108 |
|
|
affiche("------------------------------------");
|
109 |
|
|
//SL_SOLVE_ELASTOPLASTIQUE solve2(num,fichier,id,1);
|
110 |
|
|
//solve2.resoud();
|
111 |
|
|
}
|
112 |
|
|
|
113 |
|
|
return 0;
|
114 |
|
|
}
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
#pragma package(smart_init)
|
120 |
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
|
|
|
135 |
|
|
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
|