|
13 | 13 | #ATS:t1 = test( SELF, "--graphics False --clearDirectories True --checkError False --dataDirBase dumps-PlanarCompaction-1d-sph-restart --restartStep 100 --steps 200", label="Planar porous aluminum compaction problem -- 1-D (serial, restart test step 1)")
|
14 | 14 | #ATS:t2 = testif(t1, SELF, "--graphics False --clearDirectories False --checkError False --dataDirBase dumps-PlanarCompaction-1d-sph-restart --restartStep 100 --steps 100 --checkRestart True --restoreCycle 100 --postCleanup True", label="Planar porous aluminum compaction problem -- 1-D (serial, restart test step 2)")
|
15 | 15 | #
|
| 16 | +# Ordinary SPH with no initial porosity |
| 17 | +# |
| 18 | +#ATS:t3 = testif(t0, SELF, "--alpha0 1.0 --useDamage False --goalTime 1.0 --graphics False --clearDirectories True --checkError True --dataDirBase dumps-PlanarCompaction-1d-sph --restartStep 100000 --postCleanup True", np=4, label="Planar porous aluminum compaction problem with no initial porosity -- 1-D (4 proc, no damage model)") |
| 19 | +#ATS:t4 = testif(t3, SELF, "--alpha0 1.0 --useDamage True --goalTime 1.0 --graphics False --clearDirectories True --checkError True --dataDirBase dumps-PlanarCompaction-1d-sph --restartStep 100000 --postCleanup True", np=4, label="Planar porous aluminum compaction problem with no initial porosity -- 1-D (4 proc, with damage model)") |
| 20 | +# |
16 | 21 | # FSISPH
|
17 | 22 | #
|
18 | 23 | #ATS:t10 = test( SELF, "--graphics False --clearDirectories True --checkError True --hydroType FSISPH --dataDirBase dumps-PlanarCompaction-1d-fsisph --restartStep 100000 --postCleanup True", np=4, label="Planar porous aluminum compaction problem -- 1-D (FSISPH, 4 proc)", fsisph=True)
|
|
131 | 136 | #-------------------------------------------------------------------------------
|
132 | 137 | # The reference values for error norms checking for pass/fail
|
133 | 138 | #-------------------------------------------------------------------------------
|
134 |
| -LnormRef = {"SPH": {"Mass density" : {"L1" : 0.06784186300927694, |
135 |
| - "L2" : 0.012774373437299643, |
136 |
| - "Linf" : 0.6245679444354701}, |
137 |
| - "Spec Therm E" : {"L1" : 0.0001200742460791407, |
138 |
| - "L2" : 2.2616105613742583e-05, |
139 |
| - "Linf" : 0.0010923440797387786}, |
140 |
| - "velocity " : {"L1" : 0.004921931042558655, |
141 |
| - "L2" : 0.0009173594117158436, |
142 |
| - "Linf" : 0.0448725433453345}, |
143 |
| - "pressure " : {"L1" : 0.0022217375280911347, |
144 |
| - "L2" : 0.00039479153550769805, |
145 |
| - "Linf" : 0.018793913196205617}, |
146 |
| - "alpha " : {"L1" : 0.0590391542763204, |
147 |
| - "L2" : 0.007963583413760916, |
148 |
| - "Linf" : 0.2738180402369801}, |
149 |
| - "h " : {"L1" : 0.00043261838627472803, |
150 |
| - "L2" : 8.062946952637553e-05, |
151 |
| - "Linf" : 0.014201309070925212}}, |
152 |
| - |
153 |
| - "FSISPH": {"Mass density" : {"L1" : 0.06781314493410028, |
154 |
| - "L2" : 0.012767602580471844, |
155 |
| - "Linf" : 0.6245698198195724}, |
156 |
| - "Spec Therm E" : {"L1" : 0.00011965457154529887, |
157 |
| - "L2" : 2.254867764655585e-05, |
158 |
| - "Linf" : 0.0010923441579020216}, |
159 |
| - "velocity " : {"L1" : 0.004913235403786584, |
160 |
| - "L2" : 0.0009163181868064007, |
161 |
| - "Linf" : 0.044872645505280966}, |
162 |
| - "pressure " : {"L1" : 0.002210222289968727, |
163 |
| - "L2" : 0.00039387994606202237, |
164 |
| - "Linf" : 0.018793847854203908}, |
165 |
| - "alpha " : {"L1" : 0.05903530352469833, |
166 |
| - "L2" : 0.007960855343380124, |
167 |
| - "Linf" : 0.2738175996911776}, |
168 |
| - "h " : {"L1" : 0.0004319674641541397, |
169 |
| - "L2" : 8.05536967933465e-05, |
170 |
| - "Linf" : 0.014201309071287523}}, |
171 |
| - |
172 |
| - "CRKSPH": {"Mass density" : {"L1" : 0.0679707220773017, |
173 |
| - "L2" : 0.012783621322270034, |
174 |
| - "Linf" : 0.6245687018640083}, |
175 |
| - "Spec Therm E" : {"L1" : 0.0001201303520771047, |
176 |
| - "L2" : 2.2622550331357265e-05, |
177 |
| - "Linf" : 0.00109234444748564}, |
178 |
| - "velocity " : {"L1" : 0.004926121368235753, |
179 |
| - "L2" : 0.0009173629106343205, |
180 |
| - "Linf" : 0.044872623201390446}, |
181 |
| - "pressure " : {"L1" : 0.0022258225868044238, |
182 |
| - "L2" : 0.00039496818856079414, |
183 |
| - "Linf" : 0.018793890216913627}, |
184 |
| - "alpha " : {"L1" : 0.05909030710035451, |
185 |
| - "L2" : 0.007965976598237856, |
186 |
| - "Linf" : 0.2738173870953471}, |
187 |
| - "h " : {"L1" : 0.00043274827065262975, |
188 |
| - "L2" : 8.062817025125132e-05, |
189 |
| - "Linf" : 0.014201309070451522}}, |
| 139 | +LnormRef = {("SPH", 1.275) : {"Mass density" : {"L1" : 0.06784186300927694, |
| 140 | + "L2" : 0.012774373437299643, |
| 141 | + "Linf" : 0.6245679444354701}, |
| 142 | + "Spec Therm E" : {"L1" : 0.0001200742460791407, |
| 143 | + "L2" : 2.2616105613742583e-05, |
| 144 | + "Linf" : 0.0010923440797387786}, |
| 145 | + "velocity " : {"L1" : 0.004921931042558655, |
| 146 | + "L2" : 0.0009173594117158436, |
| 147 | + "Linf" : 0.0448725433453345}, |
| 148 | + "pressure " : {"L1" : 0.0022217375280911347, |
| 149 | + "L2" : 0.00039479153550769805, |
| 150 | + "Linf" : 0.018793913196205617}, |
| 151 | + "alpha " : {"L1" : 0.0590391542763204, |
| 152 | + "L2" : 0.007963583413760916, |
| 153 | + "Linf" : 0.2738180402369801}, |
| 154 | + "h " : {"L1" : 0.00043261838627472803, |
| 155 | + "L2" : 8.062946952637553e-05, |
| 156 | + "Linf" : 0.014201309070925212}}, |
| 157 | + |
| 158 | + ("SPH", 1.0) : {"Mass density" : {"L1" : 0.005403187072834507, |
| 159 | + "L2" : 0.001992916969258407, |
| 160 | + "Linf" : 0.22292338017813007}, |
| 161 | + "Spec Therm E" : {"L1" : 2.9770274733200942e-05, |
| 162 | + "L2" : 1.038711319331483e-05, |
| 163 | + "Linf" : 0.0010487495498077324}, |
| 164 | + "velocity " : {"L1" : 0.001085888733217598, |
| 165 | + "L2" : 0.00040460303212683284, |
| 166 | + "Linf" : 0.04537793164974422}, |
| 167 | + "pressure " : {"L1" : 0.0018074730403377138, |
| 168 | + "L2" : 0.0006629679859824688, |
| 169 | + "Linf" : 0.0730479929478202}, |
| 170 | + "alpha " : {"L1" : 0.0, |
| 171 | + "L2" : 0.0, |
| 172 | + "Linf" : 0.0}, |
| 173 | + "h " : {"L1" : 6.116234877070288e-05, |
| 174 | + "L2" : 3.0869281685704505e-05, |
| 175 | + "Linf" : 0.014204020975568329}}, |
| 176 | + |
| 177 | + ("FSISPH", 1.275) : {"Mass density" : {"L1" : 0.06781314493410028, |
| 178 | + "L2" : 0.012767602580471844, |
| 179 | + "Linf" : 0.6245698198195724}, |
| 180 | + "Spec Therm E" : {"L1" : 0.00011965457154529887, |
| 181 | + "L2" : 2.254867764655585e-05, |
| 182 | + "Linf" : 0.0010923441579020216}, |
| 183 | + "velocity " : {"L1" : 0.004913235403786584, |
| 184 | + "L2" : 0.0009163181868064007, |
| 185 | + "Linf" : 0.044872645505280966}, |
| 186 | + "pressure " : {"L1" : 0.002210222289968727, |
| 187 | + "L2" : 0.00039387994606202237, |
| 188 | + "Linf" : 0.018793847854203908}, |
| 189 | + "alpha " : {"L1" : 0.05903530352469833, |
| 190 | + "L2" : 0.007960855343380124, |
| 191 | + "Linf" : 0.2738175996911776}, |
| 192 | + "h " : {"L1" : 0.0004319674641541397, |
| 193 | + "L2" : 8.05536967933465e-05, |
| 194 | + "Linf" : 0.014201309071287523}}, |
| 195 | + |
| 196 | + ("CRKSPH", 1.275) : {"Mass density" : {"L1" : 0.0679707220773017, |
| 197 | + "L2" : 0.012783621322270034, |
| 198 | + "Linf" : 0.6245687018640083}, |
| 199 | + "Spec Therm E" : {"L1" : 0.0001201303520771047, |
| 200 | + "L2" : 2.2622550331357265e-05, |
| 201 | + "Linf" : 0.00109234444748564}, |
| 202 | + "velocity " : {"L1" : 0.004926121368235753, |
| 203 | + "L2" : 0.0009173629106343205, |
| 204 | + "Linf" : 0.044872623201390446}, |
| 205 | + "pressure " : {"L1" : 0.0022258225868044238, |
| 206 | + "L2" : 0.00039496818856079414, |
| 207 | + "Linf" : 0.018793890216913627}, |
| 208 | + "alpha " : {"L1" : 0.05909030710035451, |
| 209 | + "L2" : 0.007965976598237856, |
| 210 | + "Linf" : 0.2738173870953471}, |
| 211 | + "h " : {"L1" : 0.00043274827065262975, |
| 212 | + "L2" : 8.062817025125132e-05, |
| 213 | + "Linf" : 0.014201309070451522}}, |
190 | 214 | }
|
191 | 215 |
|
192 | 216 | #-------------------------------------------------------------------------------
|
@@ -579,10 +603,10 @@ def epsX_from_alphaX(alphaX,
|
579 | 603 | Linf = Pn.gridpnorm("inf", xmin, xmax)
|
580 | 604 | print(f"{name}\t\t{L1} \t\t{L2} \t\t{Linf}")
|
581 | 605 |
|
582 |
| - if checkError and not (np.allclose(L1, LnormRef[hydroType][name]["L1"], tol, tol) and |
583 |
| - np.allclose(L2, LnormRef[hydroType][name]["L2"], tol, tol) and |
584 |
| - np.allclose(Linf, LnormRef[hydroType][name]["Linf"], tol, tol)): |
585 |
| - print("Failing Lnorm tolerance for ", name, (L1, L2, Linf), LnormRef[hydroType][name]) |
| 606 | + if checkError and not (np.allclose(L1, LnormRef[(hydroType, alpha0)][name]["L1"], tol, tol) and |
| 607 | + np.allclose(L2, LnormRef[(hydroType, alpha0)][name]["L2"], tol, tol) and |
| 608 | + np.allclose(Linf, LnormRef[(hydroType, alpha0)][name]["Linf"], tol, tol)): |
| 609 | + print("Failing Lnorm tolerance for ", name, (L1, L2, Linf), LnormRef[(hydroType, alpha0)][name]) |
586 | 610 | failure = True
|
587 | 611 | sys.stdout.flush()
|
588 | 612 |
|
|
0 commit comments