Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
2cf77a37
Commit
2cf77a37
authored
15 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
correct dg limiter
parent
188fd408
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Solver/TESTCASES/DamBreak.lua
+3
-2
3 additions, 2 deletions
Solver/TESTCASES/DamBreak.lua
Solver/TESTCASES/edge.msh
+21
-381
21 additions, 381 deletions
Solver/TESTCASES/edge.msh
Solver/dgLimiter.cpp
+8
-7
8 additions, 7 deletions
Solver/dgLimiter.cpp
with
32 additions
and
390 deletions
Solver/TESTCASES/DamBreak.lua
+
3
−
2
View file @
2cf77a37
...
...
@@ -11,7 +11,7 @@ function initial_condition( xyz , f )
f
:
set
(
i
,
0
,
40
)
f
:
set
(
i
,
1
,
0
)
else
f
:
set
(
i
,
0
,
5
)
f
:
set
(
i
,
0
,
20
)
f
:
set
(
i
,
1
,
0
)
end
end
...
...
@@ -42,7 +42,8 @@ limiter = dgSlopeLimiter(law)
rk
:
setLimiter
(
limiter
)
-- build solution vector
FS
=
functionLua
(
1
,
'initial_condition'
,
{
'XYZ'
}):
getName
()
xyz
=
functionCoordinates
.
get
()
FS
=
functionLua
(
1
,
'initial_condition'
,
{
xyz
})
solution
=
dgDofContainer
(
groups
,
law
:
getNbFields
())
solution
:
L2Projection
(
FS
)
...
...
This diff is collapsed.
Click to expand it.
Solver/TESTCASES/edge.msh
+
21
−
381
View file @
2cf77a37
...
...
@@ -8,210 +8,30 @@ $PhysicalNames
1 3 "Line"
$EndPhysicalNames
$Nodes
20
0
20
1 -1 0 0
2 1 0 0
3 -0.9899497487437465 0 0
4 -0.9798994974874929 0 0
5 -0.9698492462312395 0 0
6 -0.959798994974986 0 0
7 -0.9497487437187324 0 0
8 -0.9396984924624789 0 0
9 -0.9296482412062255 0 0
10 -0.9195979899499719 0 0
11 -0.9095477386937184 0 0
12 -0.8994974874374648 0 0
13 -0.8894472361812114 0 0
14 -0.8793969849249579 0 0
15 -0.8693467336687044 0 0
16 -0.8592964824124508 0 0
17 -0.8492462311561974 0 0
18 -0.8391959798999438 0 0
19 -0.8291457286436903 0 0
20 -0.8190954773874368 0 0
21 -0.8090452261311832 0 0
22 -0.7989949748749298 0 0
23 -0.7889447236186762 0 0
24 -0.7788944723624227 0 0
25 -0.7688442211061692 0 0
26 -0.7587939698499158 0 0
27 -0.7487437185936622 0 0
28 -0.7386934673374087 0 0
29 -0.7286432160811551 0 0
30 -0.7185929648249016 0 0
31 -0.7085427135686482 0 0
32 -0.6984924623123947 0 0
33 -0.6884422110561411 0 0
34 -0.6783919597998875 0 0
35 -0.6683417085436341 0 0
36 -0.6582914572873806 0 0
37 -0.6482412060311271 0 0
38 -0.6381909547748736 0 0
39 -0.6281407035186201 0 0
40 -0.6180904522623665 0 0
41 -0.608040201006113 0 0
42 -0.5979899497498595 0 0
43 -0.5879396984936061 0 0
44 -0.5778894472373525 0 0
45 -0.567839195981099 0 0
46 -0.5577889447248454 0 0
47 -0.5477386934685919 0 0
48 -0.5376884422123385 0 0
49 -0.527638190956085 0 0
50 -0.5175879396998314 0 0
51 -0.5075376884435778 0 0
52 -0.4974874371873209 0 0
53 -0.4874371859310535 0 0
54 -0.477386934674786 0 0
55 -0.4673366834185185 0 0
56 -0.4572864321622511 0 0
57 -0.4472361809059836 0 0
58 -0.4371859296497161 0 0
59 -0.4271356783934487 0 0
60 -0.4170854271371812 0 0
61 -0.4070351758809138 0 0
62 -0.3969849246246463 0 0
63 -0.3869346733683788 0 0
64 -0.3768844221121114 0 0
65 -0.3668341708558439 0 0
66 -0.3567839195995764 0 0
67 -0.346733668343309 0 0
68 -0.3366834170870415 0 0
69 -0.3266331658307741 0 0
70 -0.3165829145745066 0 0
71 -0.3065326633182391 0 0
72 -0.2964824120619717 0 0
73 -0.2864321608057042 0 0
74 -0.2763819095494368 0 0
75 -0.2663316582931693 0 0
76 -0.2562814070369018 0 0
77 -0.2462311557806344 0 0
78 -0.2361809045243669 0 0
79 -0.2261306532680994 0 0
80 -0.216080402011832 0 0
81 -0.2060301507555645 0 0
82 -0.1959798994992971 0 0
83 -0.1859296482430296 0 0
84 -0.1758793969867621 0 0
85 -0.1658291457304947 0 0
86 -0.1557788944742272 0 0
87 -0.1457286432179598 0 0
88 -0.1356783919616923 0 0
89 -0.1256281407054248 0 0
90 -0.1155778894491574 0 0
91 -0.1055276381928899 0 0
92 -0.09547738693662244 0 0
93 -0.08542713568035498 0 0
94 -0.07537688442408752 0 0
95 -0.06532663316782006 0 0
96 -0.0552763819115526 0 0
97 -0.04522613065528525 0 0
98 -0.03517587939901778 0 0
99 -0.02512562814275032 0 0
100 -0.01507537688648286 0 0
101 -0.005025125630215399 0 0
102 0.005025125626066052 0 0
103 0.01507537688236149 0 0
104 0.02512562813865671 0 0
105 0.03517587939495215 0 0
106 0.04522613065124759 0 0
107 0.0552763819075428 0 0
108 0.06532663316383824 0 0
109 0.07537688442013346 0 0
110 0.0854271356764289 0 0
111 0.09547738693272434 0 0
112 0.1055276381890196 0 0
113 0.115577889445315 0 0
114 0.1256281407016102 0 0
115 0.1356783919579057 0 0
116 0.1457286432142011 0 0
117 0.1557788944704963 0 0
118 0.1658291457267917 0 0
119 0.1758793969830872 0 0
120 0.1859296482393824 0 0
121 0.1959798994956778 0 0
122 0.2060301507519731 0 0
123 0.2160804020082685 0 0
124 0.2261306532645639 0 0
125 0.2361809045208592 0 0
126 0.2462311557771546 0 0
127 0.25628140703345 0 0
128 0.2663316582897453 0 0
129 0.2763819095460407 0 0
130 0.2864321608023359 0 0
131 0.2964824120586314 0 0
132 0.3065326633149268 0 0
133 0.316582914571222 0 0
134 0.3266331658275174 0 0
135 0.3366834170838127 0 0
136 0.3467336683401081 0 0
137 0.3567839195964035 0 0
138 0.3668341708526988 0 0
139 0.3768844221089942 0 0
140 0.3869346733652896 0 0
141 0.3969849246215849 0 0
142 0.4070351758778803 0 0
143 0.4170854271341755 0 0
144 0.427135678390471 0 0
145 0.4371859296467664 0 0
146 0.4472361809030616 0 0
147 0.457286432159357 0 0
148 0.4673366834156525 0 0
149 0.4773869346719477 0 0
150 0.4874371859282431 0 0
151 0.4974874371845384 0 0
152 0.5075376884408442 0 0
153 0.5175879396971537 0 0
154 0.5276381909534629 0 0
155 0.5376884422097721 0 0
156 0.5477386934660815 0 0
157 0.5577889447223907 0 0
158 0.5678391959787001 0 0
159 0.5778894472350093 0 0
160 0.5879396984913188 0 0
161 0.597989949747628 0 0
162 0.6080402010039372 0 0
163 0.6180904522602466 0 0
164 0.6281407035165558 0 0
165 0.6381909547728652 0 0
166 0.6482412060291745 0 0
167 0.6582914572854837 0 0
168 0.6683417085417931 0 0
169 0.6783919597981023 0 0
170 0.6884422110544117 0 0
171 0.6984924623107209 0 0
172 0.7085427135670304 0 0
173 0.7185929648233396 0 0
174 0.7286432160796488 0 0
175 0.7386934673359582 0 0
176 0.7487437185922674 0 0
177 0.7587939698485768 0 0
178 0.768844221104886 0 0
179 0.7788944723611955 0 0
180 0.7889447236175047 0 0
181 0.7989949748738139 0 0
182 0.8090452261301233 0 0
183 0.8190954773864325 0 0
184 0.8291457286427419 0 0
185 0.8391959798990511 0 0
186 0.8492462311553606 0 0
187 0.8592964824116698 0 0
188 0.869346733667979 0 0
189 0.8793969849242884 0 0
190 0.8894472361805976 0 0
191 0.8994974874369071 0 0
192 0.9095477386932163 0 0
193 0.9195979899495255 0 0
194 0.9296482412058349 0 0
195 0.9396984924621441 0 0
196 0.9497487437184535 0 0
197 0.9597989949747627 0 0
198 0.9698492462310722 0 0
199 0.9798994974873814 0 0
200 0.9899497487436906 0 0
3 -0.8947368421055554 0 0
4 -0.7894736842111106 0 0
5 -0.684210526316666 0 0
6 -0.5789473684222213 0 0
7 -0.4736842105277401 0 0
8 -0.3684210526331494 0 0
9 -0.2631578947385587 0 0
10 -0.1578947368439678 0 0
11 -0.0526315789493772 0 0
12 0.05263157894535975 0 0
13 0.1578947368402426 0 0
14 0.2631578947351256 0 0
15 0.3684210526300085 0 0
16 0.4736842105248913 0 0
17 0.5789473684198838 0 0
18 0.6842105263149127 0 0
19 0.7894736842099421 0 0
20 0.8947368421049708 0 0
$EndNodes
$Elements
2
0
1
21
1 15 2 1 1 1
2 15 2 2 2 2
3 1 2 3 1 1 3
...
...
@@ -232,185 +52,5 @@ $Elements
18 1 2 3 1 17 18
19 1 2 3 1 18 19
20 1 2 3 1 19 20
21 1 2 3 1 20 21
22 1 2 3 1 21 22
23 1 2 3 1 22 23
24 1 2 3 1 23 24
25 1 2 3 1 24 25
26 1 2 3 1 25 26
27 1 2 3 1 26 27
28 1 2 3 1 27 28
29 1 2 3 1 28 29
30 1 2 3 1 29 30
31 1 2 3 1 30 31
32 1 2 3 1 31 32
33 1 2 3 1 32 33
34 1 2 3 1 33 34
35 1 2 3 1 34 35
36 1 2 3 1 35 36
37 1 2 3 1 36 37
38 1 2 3 1 37 38
39 1 2 3 1 38 39
40 1 2 3 1 39 40
41 1 2 3 1 40 41
42 1 2 3 1 41 42
43 1 2 3 1 42 43
44 1 2 3 1 43 44
45 1 2 3 1 44 45
46 1 2 3 1 45 46
47 1 2 3 1 46 47
48 1 2 3 1 47 48
49 1 2 3 1 48 49
50 1 2 3 1 49 50
51 1 2 3 1 50 51
52 1 2 3 1 51 52
53 1 2 3 1 52 53
54 1 2 3 1 53 54
55 1 2 3 1 54 55
56 1 2 3 1 55 56
57 1 2 3 1 56 57
58 1 2 3 1 57 58
59 1 2 3 1 58 59
60 1 2 3 1 59 60
61 1 2 3 1 60 61
62 1 2 3 1 61 62
63 1 2 3 1 62 63
64 1 2 3 1 63 64
65 1 2 3 1 64 65
66 1 2 3 1 65 66
67 1 2 3 1 66 67
68 1 2 3 1 67 68
69 1 2 3 1 68 69
70 1 2 3 1 69 70
71 1 2 3 1 70 71
72 1 2 3 1 71 72
73 1 2 3 1 72 73
74 1 2 3 1 73 74
75 1 2 3 1 74 75
76 1 2 3 1 75 76
77 1 2 3 1 76 77
78 1 2 3 1 77 78
79 1 2 3 1 78 79
80 1 2 3 1 79 80
81 1 2 3 1 80 81
82 1 2 3 1 81 82
83 1 2 3 1 82 83
84 1 2 3 1 83 84
85 1 2 3 1 84 85
86 1 2 3 1 85 86
87 1 2 3 1 86 87
88 1 2 3 1 87 88
89 1 2 3 1 88 89
90 1 2 3 1 89 90
91 1 2 3 1 90 91
92 1 2 3 1 91 92
93 1 2 3 1 92 93
94 1 2 3 1 93 94
95 1 2 3 1 94 95
96 1 2 3 1 95 96
97 1 2 3 1 96 97
98 1 2 3 1 97 98
99 1 2 3 1 98 99
100 1 2 3 1 99 100
101 1 2 3 1 100 101
102 1 2 3 1 101 102
103 1 2 3 1 102 103
104 1 2 3 1 103 104
105 1 2 3 1 104 105
106 1 2 3 1 105 106
107 1 2 3 1 106 107
108 1 2 3 1 107 108
109 1 2 3 1 108 109
110 1 2 3 1 109 110
111 1 2 3 1 110 111
112 1 2 3 1 111 112
113 1 2 3 1 112 113
114 1 2 3 1 113 114
115 1 2 3 1 114 115
116 1 2 3 1 115 116
117 1 2 3 1 116 117
118 1 2 3 1 117 118
119 1 2 3 1 118 119
120 1 2 3 1 119 120
121 1 2 3 1 120 121
122 1 2 3 1 121 122
123 1 2 3 1 122 123
124 1 2 3 1 123 124
125 1 2 3 1 124 125
126 1 2 3 1 125 126
127 1 2 3 1 126 127
128 1 2 3 1 127 128
129 1 2 3 1 128 129
130 1 2 3 1 129 130
131 1 2 3 1 130 131
132 1 2 3 1 131 132
133 1 2 3 1 132 133
134 1 2 3 1 133 134
135 1 2 3 1 134 135
136 1 2 3 1 135 136
137 1 2 3 1 136 137
138 1 2 3 1 137 138
139 1 2 3 1 138 139
140 1 2 3 1 139 140
141 1 2 3 1 140 141
142 1 2 3 1 141 142
143 1 2 3 1 142 143
144 1 2 3 1 143 144
145 1 2 3 1 144 145
146 1 2 3 1 145 146
147 1 2 3 1 146 147
148 1 2 3 1 147 148
149 1 2 3 1 148 149
150 1 2 3 1 149 150
151 1 2 3 1 150 151
152 1 2 3 1 151 152
153 1 2 3 1 152 153
154 1 2 3 1 153 154
155 1 2 3 1 154 155
156 1 2 3 1 155 156
157 1 2 3 1 156 157
158 1 2 3 1 157 158
159 1 2 3 1 158 159
160 1 2 3 1 159 160
161 1 2 3 1 160 161
162 1 2 3 1 161 162
163 1 2 3 1 162 163
164 1 2 3 1 163 164
165 1 2 3 1 164 165
166 1 2 3 1 165 166
167 1 2 3 1 166 167
168 1 2 3 1 167 168
169 1 2 3 1 168 169
170 1 2 3 1 169 170
171 1 2 3 1 170 171
172 1 2 3 1 171 172
173 1 2 3 1 172 173
174 1 2 3 1 173 174
175 1 2 3 1 174 175
176 1 2 3 1 175 176
177 1 2 3 1 176 177
178 1 2 3 1 177 178
179 1 2 3 1 178 179
180 1 2 3 1 179 180
181 1 2 3 1 180 181
182 1 2 3 1 181 182
183 1 2 3 1 182 183
184 1 2 3 1 183 184
185 1 2 3 1 184 185
186 1 2 3 1 185 186
187 1 2 3 1 186 187
188 1 2 3 1 187 188
189 1 2 3 1 188 189
190 1 2 3 1 189 190
191 1 2 3 1 190 191
192 1 2 3 1 191 192
193 1 2 3 1 192 193
194 1 2 3 1 193 194
195 1 2 3 1 194 195
196 1 2 3 1 195 196
197 1 2 3 1 196 197
198 1 2 3 1 197 198
199 1 2 3 1 198 199
200 1 2 3 1 199 200
201 1 2 3 1 200 2
21 1 2 3 1 20 2
$EndElements
This diff is collapsed.
Click to expand it.
Solver/dgLimiter.cpp
+
8
−
7
View file @
2cf77a37
...
...
@@ -52,11 +52,12 @@ int dgSlopeLimiter::apply ( dgDofContainer *solution)
}
AVGL
/=
(
double
)
fSize
;
AVGR
/=
(
double
)
fSize
;
MINLeft
(
iElementL
,
k
)
=
std
::
min
(
AVGR
,
MINLeft
(
iElementL
,
k
)
);
MAXLeft
(
iElementL
,
k
)
=
std
::
max
(
AVGR
,
MAXLeft
(
iElementL
,
k
)
);
MINRight
(
iElementR
,
k
)
=
std
::
min
(
AVGL
,
MINRight
(
iElementR
,
k
)
);
MAXRight
(
iElementR
,
k
)
=
std
::
max
(
AVGL
,
MAXRight
(
iElementR
,
k
)
);
MINLeft
(
0
,
iElementL
*
nbFields
+
k
)
=
std
::
min
(
AVGR
,
MINLeft
(
0
,
iElementL
*
nbFields
+
k
)
);
MAXLeft
(
0
,
iElementL
*
nbFields
+
k
)
=
std
::
max
(
AVGR
,
MAXLeft
(
0
,
iElementL
*
nbFields
+
k
)
);
MINRight
(
0
,
iElementR
*
nbFields
+
k
)
=
std
::
min
(
AVGL
,
MINRight
(
0
,
iElementR
*
nbFields
+
k
)
);
MAXRight
(
0
,
iElementR
*
nbFields
+
k
)
=
std
::
max
(
AVGL
,
MAXRight
(
0
,
iElementR
*
nbFields
+
k
)
);
}
}
}
...
...
@@ -77,8 +78,8 @@ int dgSlopeLimiter::apply ( dgDofContainer *solution)
double
AVG
=
0.
;
double
locMax
=
-
1.e22
;
double
locMin
=
1.e22
;
double
neighMax
=
MAXG
(
iElement
,
k
);
double
neighMin
=
MING
(
iElement
,
k
);
double
neighMax
=
MAXG
(
0
,
iElement
*
nbFields
+
k
);
double
neighMin
=
MING
(
0
,
iElement
*
nbFields
+
k
);
for
(
int
i
=
0
;
i
<
fSize
;
++
i
)
{
AVG
+=
Temp
(
i
,
k
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment