Commit 8ad8a353 authored by Adam Powell's avatar Adam Powell

Imported Upstream version 5.5.0.svn.4458.dfsg

parent c0616b4e
......@@ -442,7 +442,17 @@
</item>
<item>
<property name="text" >
<string>TFQMR</string>
<string>BiCGStabl</string>
</property>
</item>
<item>
<property name="text" >
<string>TFQMR</string>
</property>
</item>
<item>
<property name="text" >
<string>GCR</string>
</property>
</item>
<item>
......
***** ElmerGrid input file for structured grid generation *****
Version = 210903
Coordinate System = Cartesian 2D
Subcell Divisions in 2D = 2 1
Subcell Limits 1 = 0 0.2 0.4
Subcell Limits 2 = 0 6.28318531
Material Structure in 2D
1 1
End
Materials Interval = 1 1
Boundary Definitions
! type out int double of the boundaries
1 -2 1 1
End
Numbering = Horizontal
Element Degree = 1
Element Innernodes = False
Triangles = False
Surface Elements = 500
Coordinate Ratios = 1
Element Ratios 1 = 1 1
Element Ratios 2 = 1
Element Densities 1 = 1 1
Element Densities 2 = 1
Revolve Blocks = 4
!Revolve Radius = 2
Revolve Improve = 1.0
Revolve Curve Direct = 0.0
Revolve Curve Angle = 360
Revolve Curve Radius = 1.0
Merge Nodes = 1.0e-6
\ No newline at end of file
# NACA 0012 symmetric airfoil - .in2d file
# start with keyword splinecurves2dv2
splinecurves2dv2
# next the refinement factor
1.1
# keyword points
points
# then the details:
# point nr ( need not be ordered ) --- x-coord --- y-coord --- flags
# the refinement factor is an optional flag, -ref=factor, default 1
# wing profile points
1 1.00000000 0.00000000
2 0.99726095 0.00038712
3 0.98907380 0.00153653
4 0.97552826 0.00341331
5 0.95677273 0.00596209
6 0.93301270 0.00911073
7 0.90450850 0.01277464
8 0.87157241 0.01686084
9 0.83456530 0.02127128
10 0.79389263 0.02590486
11 0.75000000 0.03065806
12 0.70336832 0.03542434
13 0.65450850 0.04009273
14 0.60395585 0.04454642
15 0.55226423 0.04866201
16 0.50000000 0.05231025
17 0.44773577 0.05535862
18 0.39604415 0.05767604
19 0.34549150 0.05913940
20 0.29663168 0.05964120
21 0.25000000 0.05909742
22 0.20610737 0.05745444
23 0.16543470 0.05469379
24 0.12842759 0.05083398
25 0.09549150 0.04592861
26 0.06698730 0.04006079
27 0.04322727 0.03333431
28 0.02447174 0.02586248
29 0.01092620 0.01775595
30 0.00273905 0.00911102
31 0.00000000 0.00000000
32 0.00273905 -0.00911102
33 0.01092620 -0.01775595
34 0.02447174 -0.02586248
35 0.04322727 -0.03333431
36 0.06698730 -0.04006079
37 0.09549150 -0.04592861
38 0.12842759 -0.05083398
39 0.16543470 -0.05469379
40 0.20610737 -0.05745443
41 0.25000000 -0.05909742
42 0.29663168 -0.05964120
43 0.34549150 -0.05913940
44 0.39604415 -0.05767604
45 0.44773577 -0.05535862
46 0.50000000 -0.05231025
47 0.55226423 -0.04866201
48 0.60395585 -0.04454642
49 0.65450850 -0.04009273
50 0.70336832 -0.03542434
51 0.75000000 -0.03065806
52 0.79389263 -0.02590486
53 0.83456530 -0.02127128
54 0.87157241 -0.01686084
55 0.90450850 -0.01277464
56 0.93301270 -0.00911073
57 0.95677273 -0.00596209
58 0.97552826 -0.00341331
59 0.98907380 -0.00153653
60 0.99726095 -0.00038712
61 1.00000000 0.00000000
62 -5.0 -5.0
63 5.0 -5.0
64 10.0 -5.0
65 10.0 -2.0
66 10.0 2.0
67 10.0 5.0
68 5.0 5.0
69 -5.0 5.0
70 -5.0 2.0
71 -5.0 -2.0
# keyword segments for the segments
segments
# then the segment information
# domain in --- domain out --- number of points --- points --- flags
# again, the refinement factor is an optional flag, -ref=factor, default 1
# still on the wishlist: give names to the boundary conditions, and have a default value for non-specified bcs
# (similar to materials in subdomains)
# upper surface, lower surface & bounding box
1 0 2 62 63 -bc=3 -ref=1.0
1 0 2 63 64 -bc=3 -ref=1.0
1 0 2 64 65 -bc=4 -ref=1.0
1 0 2 65 66 -bc=4 -ref=1.0
1 0 2 66 67 -bc=4 -ref=1.0
1 0 2 67 68 -bc=5 -ref=1.0
1 0 2 68 69 -bc=5 -ref=1.0
1 0 2 69 70 -bc=6 -ref=1.0
1 0 2 70 71 -bc=6 -ref=1.0
1 0 2 71 62 -bc=6 -ref=1.0
0 1 3 1 2 3 -bc=1 -ref=50.0
0 1 3 3 4 5 -bc=1 -ref=50.0
0 1 3 5 6 7 -bc=1 -ref=50.0
0 1 3 7 8 9 -bc=1 -ref=50.0
0 1 3 9 10 11 -bc=1 -ref=50.0
0 1 3 11 12 13 -bc=1 -ref=50.0
0 1 3 13 14 15 -bc=1 -ref=50.0
0 1 3 15 16 17 -bc=1 -ref=50.0
0 1 3 17 18 19 -bc=1 -ref=50.0
0 1 3 19 20 21 -bc=1 -ref=50.0
0 1 3 21 22 23 -bc=1 -ref=50.0
0 1 3 23 24 25 -bc=1 -ref=50.0
0 1 3 25 26 27 -bc=1 -ref=50.0
0 1 3 27 28 29 -bc=1 -ref=50.0
0 1 3 29 30 31 -bc=1 -ref=50.0
0 1 3 31 32 33 -bc=2 -ref=50.0
0 1 3 33 34 35 -bc=2 -ref=50.0
0 1 3 35 36 37 -bc=2 -ref=50.0
0 1 3 37 38 39 -bc=2 -ref=50.0
0 1 3 39 40 41 -bc=2 -ref=50.0
0 1 3 41 42 43 -bc=2 -ref=50.0
0 1 3 43 44 45 -bc=2 -ref=50.0
0 1 3 45 46 47 -bc=2 -ref=50.0
0 1 3 47 48 49 -bc=2 -ref=50.0
0 1 3 49 50 51 -bc=2 -ref=50.0
0 1 3 51 52 53 -bc=2 -ref=50.0
0 1 3 53 54 55 -bc=2 -ref=50.0
0 1 3 55 56 57 -bc=2 -ref=50.0
0 1 3 57 58 59 -bc=2 -ref=50.0
0 1 3 59 60 1 -bc=2 -ref=50.0
# keyword for materials
materials
# subdomain nr ---- material
# works the same way as materials in 3d csg geometries,
# non-specified domains get a default value
# maximal meshsize can be given by -maxh=.. flag
1 iron -maxh=1.0
# NACA 0012 symmetric airfoil - .in2d file
# start with keyword splinecurves2dv2
splinecurves2dv2
# next the refinement factor
1.1
# keyword points
points
# then the details:
# point nr ( need not be ordered ) --- x-coord --- y-coord --- flags
# the refinement factor is an optional flag, -ref=factor, default 1
# wing profile points
1 0.000000 0.000000
2 0.000602 0.003165
3 0.002408 0.006306
4 0.005412 0.009416
5 0.009607 0.012480
6 0.014984 0.015489
7 0.021530 0.018441
8 0.029228 0.021348
9 0.038060 0.024219
10 0.048005 0.027062
11 0.059039 0.029874
12 0.071136 0.032644
13 0.084265 0.035360
14 0.098396 0.038011
15 0.113495 0.040585
16 0.129524 0.043071
17 0.146447 0.045457
18 0.164221 0.047729
19 0.182803 0.049874
20 0.202150 0.051885
21 0.222215 0.053753
22 0.242949 0.055470
23 0.264302 0.057026
24 0.286222 0.058414
25 0.308658 0.059629
26 0.331555 0.060660
27 0.354858 0.061497
28 0.378510 0.062133
29 0.402455 0.062562
30 0.426635 0.062779
31 0.450991 0.062774
32 0.475466 0.062530
33 0.500000 0.062029
34 0.524534 0.061254
35 0.549009 0.060194
36 0.573365 0.058845
37 0.597545 0.057218
38 0.621490 0.055344
39 0.645142 0.053258
40 0.668445 0.050993
41 0.691342 0.048575
42 0.713778 0.046029
43 0.735698 0.043377
44 0.757051 0.040641
45 0.777785 0.037847
46 0.797850 0.035017
47 0.817197 0.032176
48 0.835779 0.029347
49 0.853553 0.026554
50 0.870476 0.023817
51 0.886505 0.021153
52 0.901604 0.018580
53 0.915735 0.016113
54 0.928864 0.013769
55 0.940961 0.011562
56 0.951995 0.009508
57 0.961940 0.007622
58 0.970772 0.005915
59 0.978470 0.004401
60 0.985016 0.003092
61 0.990393 0.002001
62 0.994588 0.001137
63 0.997592 0.000510
64 0.999398 0.000128
65 1.000000 0.000000
66 0.000000 0.000000
67 0.000602 -.003160
68 0.002408 -.006308
69 0.005412 -.009443
70 0.009607 -.012559
71 0.014984 -.015649
72 0.021530 -.018707
73 0.029228 -.021722
74 0.038060 -.024685
75 0.048005 -.027586
76 0.059039 -.030416
77 0.071136 -.033170
78 0.084265 -.035843
79 0.098396 -.038431
80 0.113495 -.040929
81 0.129524 -.043326
82 0.146447 -.045610
83 0.164221 -.047773
84 0.182803 -.049805
85 0.202150 -.051694
86 0.222215 -.053427
87 0.242949 -.054994
88 0.264302 -.056376
89 0.286222 -.057547
90 0.308658 -.058459
91 0.331555 -.059046
92 0.354858 -.059236
93 0.378510 -.058974
94 0.402455 -.058224
95 0.426635 -.056979
96 0.450991 -.055257
97 0.475466 -.053099
98 0.500000 -.050563
99 0.524534 -.047719
100 0.549009 -.044642
101 0.573365 -.041397
102 0.597545 -.038043
103 0.621490 -.034631
104 0.645142 -.031207
105 0.668445 -.027814
106 0.691342 -.024495
107 0.713778 -.021289
108 0.735698 -.018232
109 0.757051 -.015357
110 0.777785 -.012690
111 0.797850 -.010244
112 0.817197 -.008027
113 0.835779 -.006048
114 0.853553 -.004314
115 0.870476 -.002829
116 0.886505 -.001592
117 0.901604 -.000600
118 0.915735 0.000157
119 0.928864 0.000694
120 0.940961 0.001033
121 0.951995 0.001197
122 0.961940 0.001212
123 0.970772 0.001112
124 0.978470 0.000935
125 0.985016 0.000719
126 0.990393 0.000497
127 0.994588 0.000296
128 0.997592 0.000137
129 0.999398 0.000035
130 1.000000 0.000000
131 -5.0 -5.0
132 5.0 -5.0
133 10.0 -5.0
134 10.0 -2.0
135 10.0 2.0
136 10.0 5.0
137 5.0 5.0
138 -5.0 5.0
139 -5.0 2.0
140 -5.0 -2.0
# keyword segments for the segments
segments
# then the segment information
# domain in --- domain out --- number of points --- points --- flags
# again, the refinement factor is an optional flag, -ref=factor, default 1
# still on the wishlist: give names to the boundary conditions, and have a default value for non-specified bcs
# (similar to materials in subdomains)
# upper surface, lower surface & bounding box
1 0 2 131 132 -bc=3 -ref=1.0
1 0 2 132 133 -bc=3 -ref=1.0
1 0 2 133 134 -bc=4 -ref=1.0
1 0 2 134 135 -bc=4 -ref=1.0
1 0 2 135 136 -bc=4 -ref=1.0
1 0 2 136 137 -bc=5 -ref=1.0
1 0 2 137 138 -bc=5 -ref=1.0
1 0 2 138 139 -bc=6 -ref=1.0
1 0 2 139 140 -bc=6 -ref=1.0
1 0 2 140 131 -bc=6 -ref=1.0
1 0 3 1 2 3 -bc=1 -ref=50.0
1 0 3 3 4 5 -bc=1 -ref=50.0
1 0 3 5 6 7 -bc=1 -ref=50.0
1 0 3 7 8 9 -bc=1 -ref=50.0
1 0 3 9 10 11 -bc=1 -ref=50.0
1 0 3 11 12 13 -bc=1 -ref=50.0
1 0 3 13 14 15 -bc=1 -ref=50.0
1 0 3 15 16 17 -bc=1 -ref=50.0
1 0 3 17 18 19 -bc=1 -ref=50.0
1 0 3 19 20 21 -bc=1 -ref=50.0
1 0 3 21 22 23 -bc=1 -ref=50.0
1 0 3 23 24 25 -bc=1 -ref=50.0
1 0 3 25 26 27 -bc=1 -ref=50.0
1 0 3 27 28 29 -bc=1 -ref=50.0
1 0 3 29 30 31 -bc=1 -ref=50.0
1 0 3 31 32 33 -bc=1 -ref=50.0
1 0 3 33 34 35 -bc=1 -ref=50.0
1 0 3 35 36 37 -bc=1 -ref=50.0
1 0 3 37 38 39 -bc=1 -ref=50.0
1 0 3 39 40 41 -bc=1 -ref=50.0
1 0 3 41 42 43 -bc=1 -ref=50.0
1 0 3 43 44 45 -bc=1 -ref=50.0
1 0 3 45 46 47 -bc=1 -ref=50.0
1 0 3 47 48 49 -bc=1 -ref=50.0
1 0 3 49 50 51 -bc=1 -ref=50.0
1 0 3 51 52 53 -bc=1 -ref=50.0
1 0 3 53 54 55 -bc=1 -ref=50.0
1 0 3 55 56 57 -bc=1 -ref=50.0
1 0 3 57 58 59 -bc=1 -ref=50.0
1 0 3 59 60 61 -bc=1 -ref=50.0
1 0 3 61 62 63 -bc=1 -ref=50.0
1 0 3 63 64 65 -bc=1 -ref=50.0
0 1 3 1 67 68 -bc=2 -ref=50.0
0 1 3 68 69 70 -bc=2 -ref=50.0
0 1 3 70 71 72 -bc=2 -ref=50.0
0 1 3 72 73 74 -bc=2 -ref=50.0
0 1 3 74 75 76 -bc=2 -ref=50.0
0 1 3 76 77 78 -bc=2 -ref=50.0
0 1 3 78 79 80 -bc=2 -ref=50.0
0 1 3 80 81 82 -bc=2 -ref=50.0
0 1 3 82 83 84 -bc=2 -ref=50.0
0 1 3 84 85 86 -bc=2 -ref=50.0
0 1 3 86 87 88 -bc=2 -ref=50.0
0 1 3 88 89 90 -bc=2 -ref=50.0
0 1 3 90 91 92 -bc=2 -ref=50.0
0 1 3 92 93 94 -bc=2 -ref=50.0
0 1 3 94 95 96 -bc=2 -ref=50.0
0 1 3 96 97 98 -bc=2 -ref=50.0
0 1 3 98 99 100 -bc=2 -ref=50.0
0 1 3 100 101 102 -bc=2 -ref=50.0
0 1 3 102 103 104 -bc=2 -ref=50.0
0 1 3 104 105 106 -bc=2 -ref=50.0
0 1 3 106 107 108 -bc=2 -ref=50.0
0 1 3 108 109 110 -bc=2 -ref=50.0
0 1 3 110 111 112 -bc=2 -ref=50.0
0 1 3 112 113 114 -bc=2 -ref=50.0
0 1 3 114 115 116 -bc=2 -ref=50.0
0 1 3 116 117 118 -bc=2 -ref=50.0
0 1 3 118 119 120 -bc=2 -ref=50.0
0 1 3 120 121 122 -bc=2 -ref=50.0
0 1 3 122 123 124 -bc=2 -ref=50.0
0 1 3 124 125 126 -bc=2 -ref=50.0
0 1 3 126 127 128 -bc=2 -ref=50.0
0 1 3 128 129 65 -bc=2 -ref=50.0
# keyword for materials
materials
# subdomain nr ---- material
# works the same way as materials in 3d csg geometries,
# non-specified domains get a default value
# maximal meshsize can be given by -maxh=.. flag
1 iron -maxh=1.0
#
# L.poly
#
# Part 1 - node list
12 3 0 0
1 0 0 0
2 2 0 0
3 2 1 0
4 1 1 0
5 1 2 0
6 0 2 0
7 0 0 1
8 2 0 1
9 2 1 1
10 1 1 1
11 1 2 1
12 0 2 1
# Part 2 - facet list
8 1
1 0 1
6 1 6 5 4 3 2
1 0 1
4 1 7 8 2
1 0 1
4 2 3 9 8
1 0 1
4 4 10 9 3
1 0 1
4 5 11 10 4
1 0 1
4 6 12 11 5
1 0 1
4 1 7 12 6
1 0 1
6 7 8 9 10 11 12
# Part 3 - hole list
0
# Part 4 - region list
0
......@@ -35,25 +35,36 @@
#include <sys/types.h>
#include <time.h>
/* Possible monitoring of memory usage, if supported */
#define MEM_USAGE 0
#if MEM_USAGE
#include <sys/resource.h>
#endif
#include "common.h"
static Real timer_t0, timer_dt;
static int timer_active = FALSE;
static char timer_filename[600];
void timer_init()
{
timer_active = FALSE;
}
void timer_activate()
void timer_activate(const char *prefix)
{
Real time;
timer_active = TRUE;
time = clock() / (double)CLOCKS_PER_SEC;
AddExtension(prefix,timer_filename,"time");
printf("Activating timer (s): %.2lf\n",time);
printf("Saving timer info to file %s\n",timer_filename);
timer_dt = time;
timer_t0 = time;
}
......@@ -61,13 +72,55 @@ void timer_activate()
void timer_show()
{
static int visited = 0;
Real time;
char filename[512];
FILE *out;
#if MEM_USAGE
int who,ret;
Real memusage;
static struct rusage usage;
#endif
if(!timer_active) return;
time = clock() / (double)CLOCKS_PER_SEC;
printf("Elapsed time (s): %.2lf %.2lf\n",time-timer_t0,time-timer_dt);
timer_dt = time;
#if MEM_USAGE
who = RUSAGE_SELF;
ret = getrusage( who, &usage );
if( !ret ) {
printf("maxrss %ld\n",usage.ru_maxrss);
printf("ixrss %ld\n",usage.ru_ixrss);
printf("idrss %ld\n",usage.ru_idrss);
printf("isrss %ld\n",usage.ru_isrss);
memusage = (double) 1.0 * usage.ru_maxrss;
}
else {
printf("Failed to obtain resource usage!\n");
memusage = 0.0;
}
#endif
visited = visited + 1;
if( visited == 1 ) {
out = fopen(timer_filename,"w");
}
else {
out = fopen(timer_filename,"a");
}
#if MEM_USAGE
fprintf(out,"%3d %12.4le %12.4le %12.4le\n",visited,time-timer_t0,time-timer_dt,memusage);
#else
fprintf(out,"%3d %12.4le %12.4le\n",visited,time-timer_t0,time-timer_dt);
#endif
fclose(out);
timer_dt = time;
}
......
......@@ -20,7 +20,7 @@ typedef double Real;
#define FALSE 0
void timer_init();
void timer_activate();
void timer_activate(const char *prefix);
void timer_show();
void bigerror(char error_text[]);
......
This diff is collapsed.
......@@ -13,6 +13,8 @@ int SaveSolutionElmer(struct FemType *data,struct BoundaryType *bound,
int SaveSolutionElmerTriangles(struct FemType *data,char *prefix,int info);
int SaveElmerInput(struct FemType *data,struct BoundaryType *bound,
char *prefix,int decimals, int info);
int SaveSizeInfo(struct FemType *data,struct BoundaryType *bound,
char *prefix,int info);
int SaveElmerInputFemBem(struct FemType *data,struct BoundaryType *bound,
char *prefix,int decimals, int info);
int ElmerToElmerMapQuick(struct FemType *data1,struct FemType *data2,
......
......@@ -3446,7 +3446,7 @@ allocate:
free_Ivector(revindx,1,maxindx);
}
ElementsToBoundaryConditions(data,bound,info);
ElementsToBoundaryConditions(data,bound,FALSE,info);
printf("Succesfully read the mesh from the Gmsh input file.\n");
......@@ -3640,7 +3640,7 @@ omstart:
free_Ivector(revindx,1,maxindx);
}
ElementsToBoundaryConditions(data,bound,info);
ElementsToBoundaryConditions(data,bound,FALSE,info);
/* The geometric entities are rather randomly numbered */
if( usetaggeom ) {
......@@ -3708,6 +3708,10 @@ int UnvToElmerType(int unvtype)
elmertype = 202;
break;
case 23:
elmertype = 203;
break;
case 41:
case 51:
case 61:
......@@ -3726,6 +3730,14 @@ int UnvToElmerType(int unvtype)
elmertype = 306;
break;
case 43:
case 53:
case 63:
case 73:
case 93:
elmertype = 310;
break;
case 44:
case 54:
case 64:
......@@ -3735,6 +3747,14 @@ int UnvToElmerType(int unvtype)
elmertype = 404;
break;
case 46:
case 56:
case 66:
case 76:
case 96:
elmertype = 408;
break;
case 111:
elmertype = 504;
break;
......@@ -3767,14 +3787,31 @@ int UnvToElmerType(int unvtype)
return(elmertype);
}
static int CheckRedundantIndexes(int nonodes,int *ind)
{
int i,j,redundant;
redundant = FALSE;
for(i=0;i<nonodes;i++) {
if( ind[i] == 0 ) redundant = TRUE;
for(j=i+1;j<nonodes;j++)
if(ind[i] == ind[j]) redundant = TRUE;
}
if( redundant ) {
printf("Redundant element %d: ",nonodes);
for(i=0;i<nonodes;i++)
printf(" %d ",ind[i]);
printf("\n");
}
return(redundant);
}
int LoadUniversalMesh(struct FemType *data,char *prefix,int info)
/* Load the grid in universal file format */
{
int noknots,totknots,noelements,elemcode,maxnodes;
int allocated,maxknot,dim,ind;
int reordernodes,reorderelements,nogroups,maxnode,maxelem,elid,unvtype,elmertype;
int reordernodes,reorderelements,nogroups,maxnodeind,maxelem,elid,unvtype,elmertype;
int nonodes,group,grouptype,mode,nopoints,nodeind,matind,physind,colorind;
int debug,mingroup,maxgroup,nogroup,noentities,dummy;
int *u2eind,*u2eelem;
......@@ -3809,6 +3846,10 @@ int LoadUniversalMesh(struct FemType *data,char *prefix,int info)
for(i=0;i<=820;i++) elementtypes[i] = FALSE;
}