Skip to content

Commit f4a24ec

Browse files
Merge pull request #287 from arcaneframework/dev/mab-regression-test-elastodynamics
[tests] new tests
2 parents 310ec49 + 66bc9f7 commit f4a24ec

File tree

9 files changed

+306
-18
lines changed

9 files changed

+306
-18
lines changed

modules/elastodynamics/CMakeLists.txt

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/meshes)
2828
set(MESH_FILES
2929
bar_dynamic.msh
3030
bar_dynamic_3D.msh
31-
semi-circle.msh
31+
semi-circle.msh
32+
truncated_cube.msh
3233
)
3334
foreach(MESH_FILE IN LISTS MESH_FILES)
3435
file(COPY ${MSH_DIR}/${MESH_FILE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/meshes)
@@ -41,26 +42,49 @@ if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC)
4142
add_test(NAME [elastodynamics]2D_bar COMMAND Elastodynamics
4243
-A,//fem/petsc-flags=-ksp_monitor
4344
inputs/bar.arc)
45+
4446
add_test(NAME [elastodynamics]2D_bar_RowElimination COMMAND Elastodynamics
4547
-A,//fem/enforce-Dirichlet-method=RowElimination
4648
inputs/bar.arc)
49+
4750
add_test(NAME [elastodynamics]2D_bar_RowColumnElimination COMMAND Elastodynamics
4851
-A,//fem/enforce-Dirichlet-method=RowColumnElimination
4952
inputs/bar.arc)
53+
5054
add_test(NAME [elastodynamics]3D_bar COMMAND Elastodynamics
5155
inputs/bar.3D.arc)
56+
5257
add_test(NAME [elastodynamics]3D_bar_RowColumnElimination_bjacobi COMMAND Elastodynamics
5358
-A,//fem/enforce-Dirichlet-method=RowColumnElimination
54-
-A,//fem/petsc-flags=-ksp_monitor\ -ksp_type\ gmres\ -pc_type\ bjacobi\ -ksp_rtol\ 1e-8
59+
-A,//fem/petsc-flags=-mat_type\ baij\ -mat_block_size\ 3\ -ksp_monitor\ -ksp_type\ gmres\ -pc_type\ bjacobi\ -ksp_rtol\ 1e-8
5560
inputs/bar.3D.arc)
61+
5662
add_test(NAME [elastodynamics]2D_transient_traction COMMAND Elastodynamics
5763
inputs/bar.transient-traction.arc)
64+
65+
add_test(NAME [elastodynamics]Dirichlet_pointBc_Penalty COMMAND Elastodynamics
66+
-A,//fem/enforce-Dirichlet-method=Penalty
67+
-A,//fem/petsc-flags=-mat_type\ baij\ -mat_block_size\ 2\ -ksp_view\ -ksp_monitor\ -ksp_type\ cg\ -pc_type\ bjacobi\ -ksp_rtol\ 1e-15
68+
inputs/semi-circle.pointBC.arc)
69+
70+
add_test(NAME [elastodynamics]2D_pointBc_RowElimination COMMAND Elastodynamics
71+
-A,//fem/enforce-Dirichlet-method=RowElimination
72+
-A,//fem/petsc-flags=-mat_type\ baij\ -mat_block_size\ 2\ -ksp_monitor\ -ksp_type\ gmres\ -pc_type\ bjacobi\ -ksp_rtol\ 1e-15
73+
inputs/semi-circle.pointBC.arc)
74+
75+
add_test(NAME [elastodynamics]3D_truncated-cube_pointBc_Penalty COMMAND Elastodynamics
76+
-A,//fem/enforce-Dirichlet-method=Penalty
77+
inputs/truncated-cube.pointBC.arc)
78+
5879
add_test(NAME [elastodynamics]3D_transient_traction COMMAND Elastodynamics
5980
inputs/bar.3D.transient-traction.arc)
81+
6082
add_test(NAME [elastodynamics]2D_constant_traction_and_damping COMMAND Elastodynamics
6183
inputs/bar.damping.arc)
84+
6285
add_test(NAME [elastodynamics]2D_time-discretization_Galpha COMMAND Elastodynamics
6386
inputs/bar.Galpha.arc)
87+
6488
add_test(NAME [elastodynamics]parse_and_exit COMMAND Elastodynamics
6589
-A,//fem/assemble-linear-system=false
6690
-A,//fem/solve-linear-system=false
@@ -94,15 +118,6 @@ if(FEMUTILS_HAS_SOLVER_BACKEND_HYPRE)
94118

95119
add_test(NAME [elastodynamics]Dirichlet_traction_bodyforce COMMAND Elastodynamics
96120
inputs/bar.dirichlet.traction.bodyforce.arc)
97-
add_test(NAME [elastodynamics]Dirichlet_pointBc_Penalty COMMAND Elastodynamics
98-
-A,//fem/enforce-Dirichlet-method=Penalty
99-
inputs/semi-circle.pointBC.arc)
100-
add_test(NAME [elastodynamics]2D_pointBc_RowElimination COMMAND Elastodynamics
101-
-A,//fem/enforce-Dirichlet-method=RowElimination
102-
inputs/semi-circle.pointBC.arc)
103-
add_test(NAME [elastodynamics]2D_pointBc_RowColumnElimination COMMAND Elastodynamics
104-
-A,//fem/enforce-Dirichlet-method=RowColumnElimination
105-
inputs/semi-circle.pointBC.arc)
106121

107122
arcanefem_add_gpu_test(NAME [elastodynamics]2D_bar_bsr_bsr COMMAND ./Elastodynamics ARGS
108123
-A,//fem/matrix-format=BSR
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
1 159911471.2070522 10224273.755594065 6387319993.2046242
2+
2 1.9242551626179824e-55 5.2402356449789534e-58 1.1117429671693686e-55
3+
3 1.4311905033119731e-55 -4.4148350283204487e-58 8.1304990919456511e-56
4+
4 -1.9207647392020506e-55 -6.6606634308186404e-57 -9.8321332991427042e-56
5+
5 -1.4360940747670691e-55 6.6902306993781977e-57 -6.848196610195382e-56
6+
6 -170090090.52081832 9765731.3783571385 6388513928.4856977
7+
7 -169961104.00251269 9755192.1656164322 6387291969.5421295
8+
8 159795823.43729058 10274515.715140739 6388534218.3163528
9+
9 53661488.077685311 -800214.78948161658 178871480.03101042
10+
10 85121029.623619944 688666.17816764372 535853256.38141382
11+
11 110232886.03715438 1984938.2213193974 1042082266.8040936
12+
12 128605609.58161867 3228877.754411581 1661827508.3151617
13+
13 141287843.85356489 4007990.1339085586 2360533291.903419
14+
14 151608607.29857841 6334237.6972562457 3127889436.9488258
15+
15 156089814.21835569 7919246.2807972515 3925325902.6334729
16+
16 158260612.37350908 9490959.7861722764 4740757797.8598976
17+
17 159573096.58969486 10130570.437965551 5563551315.6809053
18+
18 -169831526.23991066 9579227.6001180969 5563659583.3595495
19+
19 -168989741.38955534 8853573.7547841333 4740790250.0501347
20+
20 -166517396.90588304 7927773.2720449073 3925596273.310586
21+
21 -160781374.7774311 6613403.3112302395 3128125314.5770311
22+
22 -151428503.54698175 5696559.9548505647 2361347215.1586337
23+
23 -134668666.3013567 3426509.7865082552 1663754990.1416514
24+
24 -113951154.62028122 1835748.6338060875 1044520361.651484
25+
25 -86212214.855648443 405322.5258703971 538793091.15700686
26+
26 -50604480.846768074 511763.29989341076 183286116.30802771
27+
27 54238907.97446762 1603774.1348703147 178910736.41312841
28+
28 86120659.858576745 1824484.6451836147 535921133.9552539
29+
29 111494202.27312499 2884173.7191189197 1042178567.2625924
30+
30 130007560.23785272 4371405.2363921525 1661941336.2159083
31+
31 142747743.53932285 6494199.2088406645 2360657523.5800066
32+
32 153077792.32211015 7119888.4381197514 3128026389.3034821
33+
33 157509796.10062307 8453696.3774418887 3925364709.5586443
34+
34 159179803.36629698 9512728.609644115 4739828622.4697142
35+
35 159709316.13580811 10130651.059956633 5562359204.5813961
36+
36 -169708455.12132925 9719470.1567377523 5562535229.3810854
37+
37 -168327729.34896851 9320553.7196608167 4740132523.7308254
38+
38 -164874487.94373813 8531104.2297233436 3925641873.5500174
39+
39 -159300455.06251732 6935952.4676091112 3128263089.5982313
40+
40 -149967544.6278933 4905774.5013093147 2361470318.7083755
41+
41 -133260896.61520137 4265559.0473646102 1663863775.4623284
42+
42 -112677061.99636605 3111371.8452262976 1044606107.6119174
43+
43 -85189555.15923731 2163850.9589716992 538842930.21095514
44+
44 -49982140.054327041 317239.63865921908 183293162.69781631
45+
45 146779230.97053573 5987640.7069098335 2737637021.583333
46+
46 66794687.128236912 759122.11107401957 323654164.70919693
47+
47 135308184.06387433 4517122.0275819423 1999430119.248878
48+
48 118893798.93061036 3094348.0097096995 1332603956.2744262
49+
49 96451427.462713048 1801198.2602711639 762777589.31075025
50+
50 27310965.975075416 111965.89112684295 58049079.141804792
51+
51 159434688.37701824 9856071.6431140658 5150973029.1768579
52+
52 159852969.97625634 10187383.538008973 5975486694.6389208
53+
53 153585613.07179949 7464906.8873153506 3521428150.9626403
54+
54 157575344.78367171 8805116.4337293897 4330321366.1060181
55+
55 -144779745.89171043 4565953.883486026 2001131608.0026956
56+
56 -169991647.08182764 9698229.8241536133 5975439493.8174305
57+
57 -169407051.66481522 9401129.0647379868 5150949593.2576971
58+
58 -156544377.32955524 6037835.5914165629 2737869484.6996746
59+
59 -163835754.9770427 7503626.1964121321 3522004006.7377529
60+
60 -167434784.04752284 8896900.3881373387 4330961354.8993559
61+
61 -76645122.81057243 784750.44387475098 325553057.1134032
62+
62 -128722436.42906103 3139017.4063039464 1334054117.8028495
63+
63 -106184431.26668176 1838563.8869615714 764472141.10273242
64+
64 -39291889.153470933 117740.44801487069 58319282.39296905
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
1 0.0024546879182017344 0.028195228275310465 6.5576160048976049e-05
2+
2 -7.7103423010082675e-55 -4.5247320164506964e-55 -2.944490015534756e-57
3+
3 -1.9669543960254113e-55 -3.5667341783787962e-55 4.0535161519153006e-55
4+
4 2.1415135203388135e-54 -8.187009886317946e-56 5.6069148092964407e-55
5+
5 1.2259214199100598e-54 -6.4560396557833203e-55 -5.9597544088349946e-55
6+
6 -0.0024666173668264893 0.028332275308650942 -0.0002777773125016734
7+
7 0.0024939565077344364 0.028332068313137684 6.2606376578063969e-05
8+
8 -0.0024881270233895534 0.028196915804566458 -0.00028104116869049012
9+
9 -0.00026411984977222144 0.00030252442674021443 -1.4421830564381488e-05
10+
10 -0.00055098763907600822 0.0011269577936938941 -2.9492253621763651e-05
11+
11 -0.00084797627487599172 0.0025321537984678336 -5.0320211207655226e-05
12+
12 -0.0011536276854587483 0.0045440663134718329 -7.135381387393879e-05
13+
13 -0.0014594281542855165 0.0071760649500437887 -9.65920721518435e-05
14+
14 -0.0017503845749907263 0.010408802780035323 -0.00011992830529208313
15+
15 -0.00201757425933515 0.014210453636897004 -0.00013501839478668944
16+
16 -0.0022567114064053939 0.018498634978987506 -0.00016851151406348027
17+
17 -0.0024310384975170744 0.023208855806234756 -0.00020907166377625731
18+
18 -0.0023944620829021543 0.023356705173188462 -0.000203271883447845
19+
19 -0.0022450248934640406 0.018651213532982477 -0.00015825104763129909
20+
20 -0.0020366282063825803 0.014333800948641215 -0.00012103512369919567
21+
21 -0.0017721879656756839 0.010510275031398149 -0.00010481430638492455
22+
22 -0.0014796960040714857 0.0072601203554647541 -8.022502311204514e-05
23+
23 -0.0011771565390912477 0.0046097712767562311 -5.4719808475908388e-05
24+
24 -0.00087152805868909145 0.002576947733988413 -3.3776548316967314e-05
25+
25 -0.00057378200829754137 0.0011523947038222073 -1.3468815141615891e-05
26+
26 -0.00028944613113943786 0.00031065125298368755 2.9785871911633338e-06
27+
27 0.00026496503862498627 0.00030254923331652224 1.7361271996870589e-05
28+
28 0.00055224614871201714 0.0011269729185496404 3.7997377788215888e-05
29+
29 0.00084948330601890189 0.0025321659507596219 6.6208366805266161e-05
30+
30 0.0011552344477831706 0.0045440800065117328 9.5568751137666e-05
31+
31 0.0014610276712678366 0.0071760343400912923 0.00012939668892062784
32+
32 0.0017519964123872034 0.010408938919391554 0.00016118453858539095
33+
33 0.0020179736015817329 0.014210583126839094 0.00018524134386837732
34+
34 0.0022447515035447225 0.018515364222075139 0.00018422653730777499
35+
35 0.0023979799469603224 0.023215110552851786 0.00014539671893440751
36+
36 0.002423112301433768 0.023349989062001666 0.00013900970370970146
37+
37 0.0022586247674696944 0.018635749108157237 0.00017045783639214605
38+
38 0.00203530879842095 0.014328723341261651 0.00017152283546545573
39+
39 0.0017705138348690884 0.010510713878885844 0.0001461280751819281
40+
40 0.0014779034880182565 0.0072600916603031617 0.00011304283356285719
41+
41 0.0011753918101382748 0.0046097843591391616 7.8955389657287643e-05
42+
42 0.00086990876604958311 0.0025769590696320109 4.9702016153009302e-05
43+
43 0.00057247319552627854 0.0011524129380939138 2.2025532796388433e-05
44+
44 0.00028863828584722043 0.00031065447749967326 4.0310814456840989e-08
45+
45 7.7734764263185744e-07 0.0086960172135089851 1.8499213153623231e-05
46+
46 5.1126387817928111e-07 0.00061565022919516223 2.6311560437227611e-06
47+
47 8.0834636705844878e-07 0.0057504369558759368 1.4253171489658373e-05
48+
48 7.8079415582155798e-07 0.003429705487289852 9.9700851168126708e-06
49+
49 6.8935222711842933e-07 0.0017244425024800724 5.9625344070716751e-06
50+
50 2.19892271561009e-07 6.7522539219308996e-05 4.9031281044351553e-07
51+
51 -1.0202190138757105e-05 0.020813415863681017 2.283014397738019e-06
52+
52 -1.4784731710599579e-05 0.02568662242739761 -6.8845730426472828e-05
53+
53 7.5837957397029533e-07 0.012221358387113463 2.2841939142547577e-05
54+
54 2.0107090595715435e-06 0.016284957773457495 2.7704192824618046e-05
55+
55 -8.9128181224749364e-07 0.0058347081601942486 1.425786297948454e-05
56+
56 1.6633675873607232e-05 0.025825576400839351 -6.8249961597659467e-05
57+
57 8.3551290741826864e-06 0.020946017936685303 1.287350058120612e-06
58+
58 -9.1381836001673519e-07 0.0087798675437302503 1.8499091572493004e-05
59+
59 -6.3776336763925645e-07 0.012326305436029047 2.2934614473630071e-05
60+
60 -3.5004767671410275e-06 0.016409236961759083 2.747866286165023e-05
61+
61 -5.9153547532465038e-07 0.00063861796741575695 2.6526606527475295e-06
62+
62 -8.6611737939161552e-07 0.0034923355764792255 9.9837324705231801e-06
63+
63 -7.7067914065037203e-07 0.0017666351791598362 5.9810441217656444e-06
64+
64 -3.1735987630494092e-07 7.0401065046384937e-05 4.979097609586421e-07
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
1 10 10 0
2+
2 0 0 0
3+
3 0.0010503268686121547 -0.0010589889694234741 0
4+
4 0 0 0
5+
5 0 0 0
6+
6 0 0 0
7+
7 0 0 0
8+
8 0 0 0
9+
9 0 0 0
10+
10 0 0 0
11+
11 0 0 0
12+
12 0 0 0
13+
13 0 0 0
14+
14 0 0 0
15+
15 0 0 0
16+
16 0 0 0
17+
17 0 0 0
18+
18 0 0 0
19+
19 0 0 0
20+
20 0 0 0
21+
21 0 0 0
22+
22 0 0 0
23+
23 0 0 0
24+
24 -0.00024749244508518028 3.1517616455304585e-05 0
25+
25 -0.00016744757121333058 -0.00023310960382076483 0
26+
26 0.00024491157831083092 0.00019601505261209975 0
27+
27 5.9729351623796903e-05 0.00024032572963334162 0
28+
28 0.0002387233350635108 0.00056425134568454847 0
29+
29 -0.00037525684880332865 0.00057818499078251488 0
30+
30 -0.00054182636560420633 -0.00019835415740537135 0
31+
31 3.3282846980750127e-05 -0.00029005608616990386 0
32+
32 0.0013686210307381694 0.00025036763935017088 0
33+
33 0.00051407534809216622 0.00066540059052046816 0
34+
34 -0.00019809151135476516 -5.743369340471573e-05 0
35+
35 -0.00014069401171690299 -0.00013495054617399468 0
36+
36 -0.00042150143349727444 9.2949690255026172e-05 0
37+
37 0.00068567916742231941 -0.00027159327132437593 0
38+
38 -0.00014203987902500445 -0.00043559409398752428 0
39+
39 2.6597005991049663e-06 7.480614237308156e-05 0
40+
40 0.00068651949833869292 0.00056012423808115901 0
41+
41 -0.00024350679890168298 -0.00027490071223338258 0
42+
42 0.00044832243919932797 -0.00065708337995888557 0
43+
43 0.0029759389687928559 0.0024358742655623531 0
44+
44 0.017266071275677919 -0.0041278991118656599 0
45+
45 0.090246575290667666 0.040379862004037329 0
46+
46 0.2757004876670871 0.037383652633592182 0
47+
47 0.94176182429013466 0.20488425397485244 0
48+
48 1.4004372814976922 0.81485639020290468 0
49+
49 1.6639459418996918 -1.0902010326116087 0
50+
50 3.9784349345735972 -0.97199386315800318 0
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
1 0 0 0
2+
2 -1.3877787807814457e-17 0 0
3+
3 -3018.1415764543867 316126.67001206044 47983.980987126197
4+
4 37713.46452619214 373968.48275290243 87806.768613568158
5+
5 0 0 0
6+
6 0 1.1102230246251565e-16 0
7+
7 -71768.870807173313 842013.38971149968 120566.19963704069
8+
8 2652.8745902000996 655947.15271238657 158802.66681393795
9+
9 -46216.686068142917 824132.42679823888 73477.704195429396
10+
10 9272.6548984784204 316825.08885243133 68387.108076573626
11+
11 -26788.461766356053 879817.16645658668 110838.40605812201
12+
12 54286.959042564158 733318.1896666945 135813.74047882837
13+
13 49755.00416689118 634138.96628761489 112018.48492170568
14+
14 18 13 14
15+
15 0 0 0
16+
16 0 0 0
17+
17 0 0 0
18+
18 0 0 0
19+
19 0 -1.1102230246251565e-16 0
20+
20 35199.906173658412 346084.8505320609 31349.181388884837
21+
21 23160.508941969638 576590.88057828834 25887.630633950143
22+
22 -58559.693900229635 725408.15869891539 157669.15477601608
23+
23 3582.3907773831593 470290.61764081265 51080.09426460434
24+
24 -28242.254358420068 417420.87270481989 73277.697823271053
25+
25 -19127.043917144911 406824.72092612938 61706.270826532826
26+
26 -45859.227725491408 499842.60481209203 11855.256867543874
27+
27 -47701.580105090063 941892.33545494708 101014.15549069506
28+
28 -152361.24208917902 653046.78012549924 148747.00310306222
29+
29 -52299.338104886432 317057.0542709477 86502.58334456131
30+
30 -5723.1737844995432 238546.48765471345 63678.610790411869
31+
31 78424.80664638654 467088.67567224801 149156.32009823323
32+
32 -6409.223080283431 716312.03979096946 151104.6132100657
33+
33 -60651.06528245721 456673.53710414842 6260.3207763696701
34+
34 22454.272594012251 204513.3011370762 65786.88802975454
35+
35 0 0 -1.1102230246251565e-16
36+
36 0 -1.1102230246251565e-16 0
37+
37 0 0 2.7755575615628914e-17
38+
38 0 0 0
39+
39 0 0 0
40+
40 0 0 0
41+
41 0 0 0
42+
42 0 0 1.1102230246251565e-16
43+
43 0 0 0
44+
44 0 0 0
45+
45 0 1.1102230246251565e-16 0
46+
46 0 0 0
47+
47 0 0 0
48+
48 -1.3877787807814457e-17 0 0
49+
49 0 0 0
50+
50 -21372.059231256837 558896.91630317725 105470.8123932184

modules/elastodynamics/inputs/bar.3D.arc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
</meshes>
2222

2323
<fem>
24+
<result-file>check/bar_3d.txt</result-file>
2425
<time-discretization>Newmark-beta</time-discretization>
2526
<tmax>.5</tmax>
2627
<dt>0.08</dt>
2728
<rho>1.0</rho>
28-
<f>0.0 0.0 0.0</f>
29+
<f>131.0e2 113.8e6 567.0e8</f>
2930
<lambda>576.9230769</lambda>
3031
<mu>384.6153846</mu>
3132
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method>
@@ -36,7 +37,7 @@
3637
</dirichlet-boundary-condition>
3738
<traction-boundary-condition>
3839
<surface>surfaceright</surface>
39-
<t>NULL 0.01 NULL</t>
40+
<t>NULL 1869.1e2 NULL</t>
4041
</traction-boundary-condition>
4142
</fem>
4243
</case>

modules/elastodynamics/inputs/bar.3D.transient-traction.arc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
</meshes>
2222

2323
<fem>
24+
<result-file>check/bar_3d_transient-traction.txt</result-file>
2425
<tmax>0.5</tmax>
2526
<dt>0.1</dt>
2627
<rho>1.0</rho>

modules/elastodynamics/inputs/semi-circle.pointBC.arc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
</meshes>
2323

2424
<fem>
25+
<result-file>check/semi-ciricle_point-bc.txt</result-file>
2526
<tmax>1.</tmax>
2627
<dt>0.08</dt>
2728
<rho>1.0</rho>
@@ -37,10 +38,5 @@
3738
<node>source</node>
3839
<u>10.0 10.0</u>
3940
</dirichlet-point-condition>
40-
<linear-system>
41-
<solver-backend>hypre</solver-backend>
42-
<solver-method>bicgstab</solver-method>
43-
<epsilon>1e-8</epsilon>
44-
</linear-system>
4541
</fem>
4642
</case>

0 commit comments

Comments
 (0)