DAMASK with grid solvers  Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
grid_mech_spectral_basic.f90
Go to the documentation of this file.
1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_basic.f90"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_basic.f90"
5 !--------------------------------------------------------------------------------------------------
10 !--------------------------------------------------------------------------------------------------
12 
13 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h" 1
14 !
15 ! Include file for Fortran use of the SNES package in 1
16 !
17 
18 
19 
20 
21 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h" 1
22 !
23 !
24 ! Include file for Fortran use of the KSP package in 1
25 !
26 
27 
28 
29 
30 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h" 1
31 !
32 !
33 ! Include file for Fortran use of the PC (preconditioner) package in 1
34 !
35 
36 
37 
38 
39 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 1
40 !
41 !
42 ! Include file for Fortran use of the Mat package in 1
43 !
44 
45 
46 
47 
48 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 1
49 !
50 !
51 ! Include file for Fortran use of the Vec package in 1
52 !
53 
54 
55 
56 
57 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscao.h" 1
58 !
59 !
60 ! Include file for Fortran use of the AO (application ordering) package in 1
61 !
62 
63 
64 
65 
66 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 1
67 !
68 !
69 ! Include file for Fortran use of the IS (index set) package in 1
70 !
71 
72 
73 
74 
75 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 1
76 !
77 !
78 ! Part of the base include file for Fortran use of 1.
79 ! Note: This file should contain only define statements and
80 ! not the declaration of variables.
81 
82 ! No spaces for #defines as some compilers (PGI) also adds
83 ! those additional spaces during preprocessing - bad for fixed format
84 !
85 
86 
87 
88 # 1 "/opt/petsc-3.10.3/Intel-18.4-IntelMPI-2018/include/petscconf.h" 1
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
174 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
224 
225 
226 
227 
228 
229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
240 
241 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 
267 
268 
269 
270 
271 
272 
273 
274 
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 
286 
287 
288 
289 
290 
291 
292 
293 
294 
295 
296 
297 
298 
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
313 
314 
315 
316 
317 
318 
319 
320 
321 
322 
323 
324 
325 
326 
327 
328 
329 
330 
331 
332 
333 
334 
335 
336 
337 
338 
339 
340 
341 
342 
343 
344 
345 
346 
347 
348 
349 
350 
351 
352 
353 
354 
355 
356 
357 
358 
359 
360 
361 
362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 
380 
381 
382 
383 
384 
385 
386 
387 
388 
389 
390 
391 
392 
393 
394 
395 
396 
397 
398 
399 
400 
401 
402 
403 
404 
405 
406 
407 
408 
409 
410 
411 
412 
413 
414 
415 
416 
417 
418 
419 
420 
421 
422 
423 
424 
425 
426 
427 
428 
429 
430 
431 
432 
433 
434 
435 
436 
437 
438 
439 
440 
441 
442 
443 
444 
445 
446 
447 
448 
449 
450 
451 
452 
453 
454 
455 
456 
457 
458 
459 
460 
461 
462 
463 
464 
465 
466 
467 
468 
469 
470 
471 
472 
473 
474 
475 
476 
477 
478 
479 
480 
481 
482 
483 
484 
485 
486 
487 
488 
489 
490 
491 
492 
493 
494 
495 
496 
497 
498 
499 
500 
501 
502 
503 
504 
505 
506 
507 
508 
509 
510 
511 
512 
513 
514 
515 
516 
517 
518 
519 
520 
521 
522 
523 
524 
525 
526 
527 
528 
529 
530 
531 
532 
533 
534 
535 
536 
537 
538 
539 
540 
541 
542 
543 
544 
545 
546 
547 
548 
549 
550 
551 
552 
553 
554 
555 
556 
557 
558 
559 
560 
561 
562 
563 
564 
565 
566 
567 
568 
569 
570 
571 
572 
573 
574 
575 
576 
577 
578 
579 
580 
581 
582 
583 
584 
585 
586 
587 
588 
589 
590 
591 
592 
593 
594 
595 
596 
597 
598 
599 
600 
601 
602 
603 
604 
605 
606 
607 
608 
609 
610 
611 
612 
613 
614 
615 
616 
617 
618 
619 
620 
621 
622 
623 
624 
625 
626 
627 
628 
629 
630 
631 
632 
633 
634 
635 
636 
637 
638 
639 
640 
641 
642 
643 
644 
645 
646 
647 
648 
649 
650 
651 
652 
653 
654 
655 
656 
657 
658 
659 
660 
661 
662 
663 
664 
665 
666 
667 
668 
669 
670 
671 
672 
673 
674 
675 
676 
677 
678 
679 
680 
681 
682 
683 
684 
685 
686 
687 
688 
689 
690 
691 
692 
693 
694 
695 
696 
697 
698 
699 
700 
701 
702 
703 
704 
705 
706 
707 
708 
709 
710 
711 
712 
713 
714 
715 
716 
717 
718 
719 
720 
721 
722 
723 
724 
725 
726 
727 
728 
729 
730 
731 
732 
733 
734 
735 
736 
737 
738 
739 
740 
741 
742 
743 
744 
745 
746 
747 
748 
749 
750 
751 
752 
753 
754 
755 
756 
757 
758 
759 
760 
761 
762 
763 
764 
765 
766 
767 
768 
769 
770 
771 
772 
773 
774 
775 
776 
777 
778 
779 
780 
781 
782 
783 
784 
785 
786 
787 
788 
789 
790 
791 
792 
793 
794 
795 
796 
797 
798 
799 
800 
801 
802 
803 
804 
805 
806 
807 
808 
809 
810 
811 
812 
813 
814 
815 
816 
817 
818 
819 
820 
821 
822 
823 
824 
825 
826 
827 
828 
829 
830 
831 
832 
833 
834 
835 
836 
837 
838 
839 
840 
841 
842 
843 
844 
845 
846 
847 
848 
849 
850 
851 
852 
853 
854 
855 
856 
857 
858 
859 
860 
861 
862 
863 
864 
865 
866 
867 
868 
869 
870 
871 
872 
873 
874 
875 
876 
877 
878 
879 
880 
881 
882 
883 
884 
885 
886 
887 
888 
889 
890 
891 
892 
893 
894 
895 
896 
897 
898 
899 
900 
901 
902 
903 
904 
905 
906 
907 
908 
909 
910 
911 
912 
913 
914 
915 
916 
917 
918 
919 
920 
921 
922 
923 
924 
925 
926 
927 
928 
929 
930 
931 
932 
933 
934 
935 
936 
937 
938 
939 
940 
941 
942 
943 
944 
945 
946 
947 
948 
949 
950 
951 
952 
953 
954 
955 
956 
957 
958 
959 
960 
961 
962 
963 
964 
965 
966 
967 
968 
969 
970 
971 
972 
973 
974 
975 
976 
977 
978 
979 
980 
981 
982 
983 
984 
985 
986 
987 
988 
989 
990 
991 
992 
993 
994 
995 
996 
997 
998 
999 
1000 
1001 
1002 
1003 
1004 
1005 
1006 
1007 
1008 
1009 
1010 
1011 
1012 
1013 
1014 
1015 
1016 
1017 
1018 
1019 
1020 
1021 
1022 
1023 
1024 
1025 
1026 
1027 
1028 
1029 
1030 
1031 
1032 
1033 
1034 
1035 
1036 
1037 
1038 
1039 
1040 
1041 
1042 
1043 
1044 
1045 
1046 
1047 
1048 
1049 
1050 
1051 
1052 
1053 
1054 
1055 
1056 
1057 
1058 
1059 
1060 
1061 
1062 
1063 
1064 
1065 
1066 
1067 
1068 
1069 
1070 
1071 
1072 
1073 
1074 
1075 
1076 
1077 
1078 
1079 
1080 
1081 
1082 
1083 
1084 
1085 
1086 
1087 
1088 
1089 
1090 
1091 
1092 
1093 
1094 
1095 
1096 
1097 
1098 
1099 
1100 
1101 
1102 
1103 
1104 
1105 
1106 
1107 
1108 
1109 
1110 
1111 
1112 
1113 
1114 
1115 
1116 
1117 
1118 
1119 
1120 
1121 
1122 
1123 
1124 
1125 
1126 
1127 
1128 
1129 
1130 
1131 
1132 
1133 
1134 
1135 
1136 
1137 
1138 
1139 
1140 
1141 
1142 
1143 
1144 
1145 
1146 
1147 
1148 
1149 
1150 
1151 
1152 
1153 
1154 
1155 
1156 
1157 
1158 
1159 
1160 
1161 
1162 
1163 
1164 
1165 
1166 
1167 
1168 
1169 
1170 
1171 
1172 
1173 
1174 
1175 
1176 
1177 
1178 
1179 
1180 
1181 
1182 
1183 
1184 
1185 
1186 
1187 
1188 
1189 
1190 
1191 
1192 
1193 
1194 
1195 
1196 
1197 
1198 
1199 
1200 
1201 
1202 
1203 
1204 
1205 
1206 
1207 
1208 
1209 
1210 
1211 
1212 
1213 
1214 
1215 
1216 
1217 
1218 
1219 
1220 
1221 
1222 
1223 
1224 
1225 
1226 
1227 
1228 
1229 
1230 
1231 
1232 
1233 
1234 
1235 
1236 
1237 
1238 
1239 
1240 
1241 
1242 
1243 
1244 
1245 
1246 
1247 
1248 
1249 
1250 
1251 
1252 
1253 
1254 
1255 
1256 
1257 
1258 
1259 
1260 
1261 
1262 
1263 
1264 
1265 
1266 
1267 
1268 
1269 
1270 
1271 
1272 
1273 
1274 
1275 
1276 
1277 
1278 
1279 
1280 
1281 
1282 
1283 
1284 
1285 
1286 
1287 
1288 
1289 
1290 
1291 
1292 
1293 
1294 
1295 
1296 # 13 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1297 
1298 
1299 
1300 
1301 # 1 "/opt/petsc-3.10.3/include/petscversion.h" 1
1302 
1303 
1304 
1305 
1306 
1307 
1308 
1309 
1310 
1311 
1312 
1313 
1314 
1315 
1316 
1317 
1318 
1319 
1320 
1321 
1322 
1323 
1324 
1325 
1326 
1327 
1328 
1329 
1330 
1331 
1332 
1333 
1334 
1335 
1336 
1337 
1338 
1339 
1340 
1341 
1342 
1343 
1344 
1345 
1346 
1347 # 17 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1348 
1349 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscviewer.h" 1
1350 !
1351 ! Include file for Fortran use of the PetscViewer package in 1
1352 !
1353 
1354 
1355 
1356 
1357 
1358 
1359 
1360 
1361 
1362 
1363 
1364 
1365 
1366 # 31 "/opt/petsc-3.10.3/include/petsc/finclude/petscviewer.h"
1367 
1368 # 18 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1369 
1370 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscerror.h" 1
1371 
1372 !
1373 ! Include file for Fortran error codes
1374 ! These are also in include/petscerror.h
1375 !
1376 
1377 
1378 
1379 # 24 "/opt/petsc-3.10.3/include/petsc/finclude/petscerror.h"
1380 
1381 # 38 "/opt/petsc-3.10.3/include/petsc/finclude/petscerror.h"
1382 
1383 
1384 
1385 
1386 
1387 
1388 
1389 
1390 
1391 
1392 
1393 
1394 
1395 
1396 
1397 
1398 # 19 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1399 
1400 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petsclog.h" 1
1401 !
1402 ! No includes needed for logging
1403 # 20 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1404 
1405 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscbag.h" 1
1406 !
1407 !
1408 ! Include file for Fortran use of the Bag package in 1
1409 !
1410 
1411 
1412 
1413 
1414 
1415 !
1416 ! End of Fortran include file for the IS package in 1
1417 
1418 # 21 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1419 
1420 !
1421 ! The real*8,complex*16 notatiton is used so that the
1422 ! 1 double/complex variables are not affected by
1423 ! compiler options like -r4,-r8, sometimes invoked
1424 ! by the user. NAG compiler does not like integer*4,real*8
1425 
1426 # 41 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1427 
1428 
1429 
1430 
1431 
1432 
1433 
1434 
1435 
1436 # 63 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1437 
1438 
1439 
1440 
1441 
1442 
1443 !
1444 
1445 
1446 
1447 
1448 
1449 !
1450 # 85 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1451 !
1452 
1453 
1454 
1455 
1456 
1457 
1458 !
1459 
1460 
1461 
1462 
1463 !
1464 
1465 !
1466 
1467 
1468 !
1469 # 128 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1470 
1471 # 150 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1472 !
1473 ! Macro for templating between real and complex
1474 !
1475 # 174 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1476 
1477 
1478 
1479 
1480 
1481 
1482 
1483 
1484 
1485 !
1486 ! Allows the matrix Fortran Kernels to work with single precision
1487 ! matrix data structures
1488 !
1489 
1490 !
1491 ! PetscLogDouble variables are used to contain double precision numbers
1492 ! that are not used in the numerical computations, but rather in logging,
1493 ! timing etc.
1494 !
1495 
1496 
1497 !
1498 ! Macros for error checking
1499 !
1500 
1501 
1502 
1503 
1504 
1505 
1506 
1507 
1508 # 215 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1509 
1510 
1511 
1512 
1513 
1514 
1515 
1516 
1517 
1518 
1519 
1520 
1521 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 2
1522 
1523 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscviewer.h" 1
1524 !
1525 ! Include file for Fortran use of the type(tPetscViewer) package in 1
1526 !
1527 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 2
1528 
1529 
1530 
1531 
1532 
1533 
1534 
1535 
1536 
1537 
1538 
1539 
1540 
1541 
1542 
1543 
1544 
1545 
1546 
1547 
1548 
1549 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscao.h" 2
1550 
1551 
1552 
1553 
1554 
1555 
1556 
1557 
1558 
1559 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 2
1560 
1561 
1562 
1563 
1564 
1565 
1566 
1567 
1568 
1569 
1570 
1571 
1572 
1573 # 30 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h"
1574 
1575 
1576 
1577 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 2
1578 
1579 
1580 
1581 
1582 
1583 # 49 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1584 
1585 
1586 
1587 
1588 
1589 
1590 
1591 
1592 
1593 
1594 
1595 
1596 
1597 # 71 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1598 !
1599 ! Matrix types
1600 !
1601 # 115 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1602 
1603 # 140 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1604 
1605 !
1606 ! MatMFFDType values
1607 !
1608 
1609 
1610 
1611 !
1612 ! MatSolverTypes
1613 !
1614 # 168 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1615 
1616 !
1617 ! GPU Storage Formats for CUSPARSE
1618 !
1619 
1620 
1621 
1622 !
1623 ! sparsity reducing ordering for STRUMPACK
1624 !
1625 
1626 
1627 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h" 2
1628 
1629 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 1
1630 
1631 !
1632 ! Include file for Fortran use of the DM package in 1
1633 !
1634 
1635 
1636 
1637 
1638 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 1
1639 !
1640 !
1641 ! Include file for Fortran use of the type(tIS) (index set) package in 1
1642 !
1643 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 2
1644 
1645 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 1
1646 !
1647 !
1648 ! Include file for Fortran use of the type(tVec) package in 1
1649 !
1650 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 2
1651 
1652 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 1
1653 !
1654 !
1655 ! Include file for Fortran use of the type(tMat) package in 1
1656 !
1657 # 11 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 2
1658 
1659 
1660 
1661 
1662 
1663 
1664 
1665 
1666 
1667 
1668 
1669 # 32 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h"
1670 
1671 
1672 # 47 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h"
1673 
1674 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h" 2
1675 
1676 
1677 
1678 # 26 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h"
1679 !
1680 ! GAMG types
1681 !
1682 
1683 
1684 !
1685 ! Various preconditioners
1686 !
1687 # 74 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h"
1688 
1689 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h" 2
1690 
1691 
1692 
1693 
1694 # 21 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h"
1695 !
1696 ! Various Krylov subspace methods
1697 !
1698 # 57 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h"
1699 !
1700 ! Various Initial guesses for Krylov subspace methods
1701 !
1702 # 8 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h" 2
1703 
1704 
1705 
1706 
1707 
1708 # 30 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h"
1709 
1710 !
1711 ! character*(80)
1712 !
1713 # 47 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h"
1714 
1715 !
1716 ! character*(80)
1717 !
1718 
1719 
1720 
1721 
1722 
1723 
1724 
1725 !
1726 ! integer(kind=selected_int_kind(5))
1727 !
1728 
1729 
1730 
1731 
1732 
1733 
1734 !
1735 ! character*(80)
1736 !
1737 # 78 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h"
1738 
1739 
1740 
1741 # 9 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_basic.f90" 2
1742 
1743 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 1
1744 
1745 !
1746 ! Include file for Fortran use of the 'da' (distributed array) package in 1
1747 !
1748 
1749 
1750 
1751 
1752 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 1
1753 !
1754 !
1755 ! Include file for Fortran use of the type(tIS) (index set) package in 1
1756 !
1757 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1758 
1759 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 1
1760 !
1761 !
1762 ! Include file for Fortran use of the type(tVec) package in 1
1763 !
1764 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1765 
1766 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 1
1767 !
1768 !
1769 ! Include file for Fortran use of the type(tMat) package in 1
1770 !
1771 # 11 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1772 
1773 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 1
1774 
1775 !
1776 ! Include file for Fortran use of the type(tDM) package in 1
1777 !
1778 # 12 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1779 
1780 
1781 
1782 
1783 
1784 !
1785 ! DMDA_LOCAL_INFO_SIZE is one large than the size incase the DA is larger than an integer (on 64 bit systems).
1786 ! non-int fields are not accessiable from fortran.
1787 !
1788 # 39 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h"
1789 
1790 
1791 
1792 
1793 
1794 
1795 
1796 
1797 
1798 
1799 
1800 
1801 
1802 # 10 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_basic.f90" 2
1803  use petscdmda
1804  use petscsnes
1805 
1806  use prec
1807  use damask_interface
1808  use hdf5_utilities
1809  use math
1810  use spectral_utilities
1811  use fesolving
1812  use config
1813  use numerics
1814  use homogenization
1816  use debug
1817 
1818  implicit none
1819  private
1820 
1821 !--------------------------------------------------------------------------------------------------
1822 ! derived types
1823  type(tsolutionparams), private :: params
1824 
1825  type, private :: tnumerics
1826  logical :: update_gamma
1827  end type tnumerics
1828 
1829  type(tnumerics) :: num ! numerics parameters. Better name?
1830 
1831 !--------------------------------------------------------------------------------------------------
1832 ! 1 data
1833  type(tdm), private :: da
1834  type(tsnes), private :: snes
1835  type(tvec), private :: solution_vec
1836 
1837 !--------------------------------------------------------------------------------------------------
1838 ! common pointwise data
1839  real(preal), private, dimension(:,:,:,:,:), allocatable :: &
1840  f_lastinc, & !< field of previous compatible deformation gradients
1841  fdot
1842 
1843 !--------------------------------------------------------------------------------------------------
1844 ! stress, stiffness and compliance average etc.
1845  real(preal), private, dimension(3,3) :: &
1846  f_aimdot = 0.0_preal, &
1847  f_aim = math_i3, &
1848  f_aim_lastinc = math_i3, &
1849  p_av = 0.0_preal
1850 
1851  character(len=pStringLen), private :: incinfo
1852  real(preal), private, dimension(3,3,3,3) :: &
1853  c_volavg = 0.0_preal, &
1854  c_volavglastinc = 0.0_preal, &
1855  c_minmaxavg = 0.0_preal, &
1856  c_minmaxavglastinc = 0.0_preal, &
1857  s = 0.0_preal
1858 
1859  real(preal), private :: &
1860  err_bc, & !< deviation from stress BC
1861  err_div
1862 
1863  integer, private :: &
1864  totaliter = 0
1865 
1866  public :: &
1872 
1873 contains
1874 
1875 !--------------------------------------------------------------------------------------------------
1877 !--------------------------------------------------------------------------------------------------
1880  real(preal), dimension(3,3,grid(1),grid(2),grid3) :: p
1881  real(preal), dimension(3,3) :: &
1882  temp33_real = 0.0_preal
1883 
1884  integer(kind=selected_int_kind(5)) :: ierr
1885  real(kind=selected_real_kind(10)), pointer, dimension(:,:,:,:) :: &
1886  f ! pointer to solution data
1887  integer(kind=selected_int_kind(5)), dimension(worldsize) :: localk
1888  integer(HID_T) :: filehandle, grouphandle
1889  integer :: fileunit
1890  character(len=pStringLen) :: filename
1891 
1892  write(6,'(/,a)') ' <<<+- grid_mech_spectral_basic init -+>>>'; flush(6)
1893 
1894  write(6,'(/,a)') ' Eisenlohr et al., International Journal of Plasticity 46:37–53, 2013'
1895  write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2012.09.012'
1896 
1897  write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
1898  write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
1899 
1900  num%update_gamma = config_numerics%getInt('update_gamma',defaultval=0) > 0
1901 
1902 !--------------------------------------------------------------------------------------------------
1903 ! set default and user defined options for 1
1904  call petscoptionsinsertstring(petsc_null_options,'-mech_snes_type ngmres',ierr)
1905  if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1906  call petscoptionsinsertstring(petsc_null_options,trim(petsc_options),ierr)
1907  if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1908 
1909 !--------------------------------------------------------------------------------------------------
1910 ! allocate global fields
1911  allocate (f_lastinc(3,3,grid(1),grid(2),grid3),source = 0.0_preal)
1912  allocate (fdot(3,3,grid(1),grid(2),grid3),source = 0.0_preal)
1913 
1914 !--------------------------------------------------------------------------------------------------
1915 ! initialize solver specific parts of 1
1916  call snescreate(petsc_comm_world,snes,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1917  call snessetoptionsprefix(snes,'mech_',ierr);if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1918  localk = 0
1919  localk(worldrank+1) = grid3
1920  call mpi_allreduce(mpi_in_place,localk,worldsize,mpi_integer,mpi_sum,petsc_comm_world,ierr)
1921  call dmdacreate3d(petsc_comm_world, &
1922  dm_boundary_none, dm_boundary_none, dm_boundary_none, & ! cut off stencil at boundary
1923  dmda_stencil_box, & ! Moore (26) neighborhood around central point
1924  grid(1),grid(2),grid(3), & ! global grid
1925  1 , 1, worldsize, &
1926  9, 0, & ! #dof (F tensor), ghost boundary width (domain overlap)
1927  [grid(1)],[grid(2)],localk, & ! local grid
1928  da,ierr) ! handle, error
1929  if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1930  call snessetdm(snes,da,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif ! connect snes to da
1931  call dmsetfromoptions(da,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1932  call dmsetup(da,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1933  call dmcreateglobalvector(da,solution_vec,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif ! global solution vector (grid x 9, i.e. every def grad tensor)
1934  call dmdasnessetfunctionlocal(da,insert_values,formresidual,petsc_null_snes,ierr) ! residual vector of same shape as solution vector
1935  if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1936  call snessetconvergencetest(snes,converged,petsc_null_snes,petsc_null_function,ierr) ! specify custom convergence check function "converged"
1937  if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
1938  call snessetfromoptions(snes,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif ! pull it all together with additional CLI arguments
1939 
1940 !--------------------------------------------------------------------------------------------------
1941 ! init fields
1942  call dmdavecgetarrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif ! places pointer on 1 data
1943 
1944  restartread: if (interface_restartinc > 0) then
1945  write(6,'(/,a,i0,a)') ' reading restart data of increment ', interface_restartinc, ' from file'
1946 
1947  write(filename,'(a,a,i0,a)') trim(getsolverjobname()),'_',worldrank,'.hdf5'
1948  filehandle = hdf5_openfile(filename)
1949  grouphandle = hdf5_opengroup(filehandle,'solver')
1950 
1951  call hdf5_read(grouphandle,f_aim, 'F_aim')
1952  call hdf5_read(grouphandle,f_aim_lastinc,'F_aim_lastInc')
1953  call hdf5_read(grouphandle,f_aimdot, 'F_aimDot')
1954  call hdf5_read(grouphandle,f, 'F')
1955  call hdf5_read(grouphandle,f_lastinc, 'F_lastInc')
1956 
1957  elseif (interface_restartinc == 0) then restartread
1958  f_lastinc = spread(spread(spread(math_i3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
1959  f = reshape(f_lastinc,[9,grid(1),grid(2),grid3])
1960  endif restartread
1961 
1962  materialpoint_f0 = reshape(f_lastinc, [3,3,1,product(grid(1:2))*grid3]) ! set starting condition for materialpoint_stressAndItsTangent
1963  call utilities_updatecoords(reshape(f,shape(f_lastinc)))
1964  call utilities_constitutiveresponse(p,temp33_real,c_volavg,c_minmaxavg, & ! stress field, stress avg, global average of stiffness and (min+max)/2
1965  reshape(f,shape(f_lastinc)), & ! target F
1966  0.0_preal) ! time increment
1967  call dmdavecrestorearrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif ! deassociate pointer
1968 
1969  restartread2: if (interface_restartinc > 0) then
1970  write(6,'(/,a,i0,a)') ' reading more restart data of increment ', interface_restartinc, ' from file'
1971  call hdf5_read(grouphandle,c_volavg, 'C_volAvg')
1972  call hdf5_read(grouphandle,c_volavglastinc,'C_volAvgLastInc')
1973 
1974  call hdf5_closegroup(grouphandle)
1975  call hdf5_closefile(filehandle)
1976 
1977  call mpi_file_open(petsc_comm_world, trim(getsolverjobname())//'.C_ref', &
1978  mpi_mode_rdonly,mpi_info_null,fileunit,ierr)
1979  call mpi_file_read(fileunit,c_minmaxavg,81,mpi_double,mpi_status_ignore,ierr)
1980  call mpi_file_close(fileunit,ierr)
1981  endif restartread2
1982 
1985 
1986 end subroutine grid_mech_spectral_basic_init
1987 
1988 
1989 !--------------------------------------------------------------------------------------------------
1991 !--------------------------------------------------------------------------------------------------
1992 function grid_mech_spectral_basic_solution(incInfoIn,timeinc,timeinc_old,stress_BC,rotation_BC) result(solution)
1994 !--------------------------------------------------------------------------------------------------
1995 ! input data for solution
1996  character(len=*), intent(in) :: &
1997  incinfoin
1998  real(preal), intent(in) :: &
1999  timeinc, & !< time increment of current solution
2000  timeinc_old
2001  type(tboundarycondition), intent(in) :: &
2002  stress_bc
2003  type(rotation), intent(in) :: &
2004  rotation_bc
2005  type(tsolutionstate) :: &
2006  solution
2007 !--------------------------------------------------------------------------------------------------
2008 ! 1 Data
2009  integer(kind=selected_int_kind(5)) :: ierr
2010  integer(kind=selected_int_kind(5)) :: reason
2011 
2012  incinfo = incinfoin
2013 
2014 !--------------------------------------------------------------------------------------------------
2015 ! update stiffness (and gamma operator)
2016  s = utilities_maskedcompliance(rotation_bc,stress_bc%maskLogical,c_volavg)
2017  if(num%update_gamma) call utilities_updategamma(c_minmaxavg)
2018 
2019 !--------------------------------------------------------------------------------------------------
2020 ! set module wide available data
2021  params%stress_mask = stress_bc%maskFloat
2022  params%stress_BC = stress_bc%values
2023  params%rotation_BC = rotation_bc
2024  params%timeinc = timeinc
2025  params%timeincOld = timeinc_old
2026 
2027 !--------------------------------------------------------------------------------------------------
2028 ! solve BVP
2029  call snessolve(snes,petsc_null_vec,solution_vec,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2030 
2031 !--------------------------------------------------------------------------------------------------
2032 ! check convergence
2033  call snesgetconvergedreason(snes,reason,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2034 
2035  solution%converged = reason > 0
2036  solution%iterationsNeeded = totaliter
2037  solution%termIll = terminallyill
2038  terminallyill = .false.
2039 
2041 
2042 
2043 !--------------------------------------------------------------------------------------------------
2047 !--------------------------------------------------------------------------------------------------
2048 subroutine grid_mech_spectral_basic_forward(cutBack,guess,timeinc,timeinc_old,loadCaseTime,&
2049  deformation_BC,stress_BC,rotation_BC)
2051  logical, intent(in) :: &
2052  cutback, &
2053  guess
2054  real(preal), intent(in) :: &
2055  timeinc_old, &
2056  timeinc, &
2057  loadcasetime
2058  type(tboundarycondition), intent(in) :: &
2059  stress_bc, &
2060  deformation_bc
2061  type(rotation), intent(in) :: &
2062  rotation_bc
2063  integer(kind=selected_int_kind(5)) :: ierr
2064  real(kind=selected_real_kind(10)), dimension(:,:,:,:), pointer :: f
2065 
2066  call dmdavecgetarrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2067 
2068  if (cutback) then
2071  else
2074 
2075  f_aimdot = merge(stress_bc%maskFloat*(f_aim-f_aim_lastinc)/timeinc_old, 0.0_preal, guess)
2077 
2078  !-----------------------------------------------------------------------------------------------
2079  ! calculate rate for aim
2080  if (deformation_bc%myType=='l') then ! calculate F_aimDot from given L and current F
2081  f_aimdot = &
2082  f_aimdot + deformation_bc%maskFloat * matmul(deformation_bc%values, f_aim_lastinc)
2083  elseif(deformation_bc%myType=='fdot') then ! F_aimDot is prescribed
2084  f_aimdot = &
2085  f_aimdot + deformation_bc%maskFloat * deformation_bc%values
2086  elseif (deformation_bc%myType=='f') then ! aim at end of load case is prescribed
2087  f_aimdot = &
2088  f_aimdot + deformation_bc%maskFloat * (deformation_bc%values - f_aim_lastinc)/loadcasetime
2089  endif
2090 
2091  fdot = utilities_calculaterate(guess, &
2092  f_lastinc,reshape(f,[3,3,grid(1),grid(2),grid3]),timeinc_old, &
2093  rotation_bc%rotate(f_aimdot,active=.true.))
2094  f_lastinc = reshape(f,[3,3,grid(1),grid(2),grid3])
2095 
2096  materialpoint_f0 = reshape(f, [3,3,1,product(grid(1:2))*grid3])
2097  endif
2098 
2099 !--------------------------------------------------------------------------------------------------
2100 ! update average and local deformation gradients
2101  f_aim = f_aim_lastinc + f_aimdot * timeinc
2102  f = reshape(utilities_forwardfield(timeinc,f_lastinc,fdot, & ! estimate of F at end of time+timeinc that matches rotated F_aim on average
2103  rotation_bc%rotate(f_aim,active=.true.)),[9,grid(1),grid(2),grid3])
2104  call dmdavecrestorearrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2105 
2106 end subroutine grid_mech_spectral_basic_forward
2107 
2108 
2109 !--------------------------------------------------------------------------------------------------
2111 !--------------------------------------------------------------------------------------------------
2114  integer(kind=selected_int_kind(5)) :: ierr
2115  real(kind=selected_real_kind(10)), dimension(:,:,:,:), pointer :: f
2116 
2117  call dmdavecgetarrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2118  call utilities_updatecoords(f)
2119  call dmdavecrestorearrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2120 
2122 
2123 
2124 !--------------------------------------------------------------------------------------------------
2126 !--------------------------------------------------------------------------------------------------
2129  integer(kind=selected_int_kind(5)) :: ierr
2130  integer(HID_T) :: filehandle, grouphandle
2131  real(kind=selected_real_kind(10)), dimension(:,:,:,:), pointer :: f
2132  character(len=pStringLen) :: filename
2133 
2134  call dmdavecgetarrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2135 
2136  write(6,'(a)') ' writing solver data required for restart to file'; flush(6)
2137 
2138  write(filename,'(a,a,i0,a)') trim(getsolverjobname()),'_',worldrank,'.hdf5'
2139  filehandle = hdf5_openfile(filename,'w')
2140  grouphandle = hdf5_addgroup(filehandle,'solver')
2141 
2142  call hdf5_write(grouphandle,f_aim, 'F_aim')
2143  call hdf5_write(grouphandle,f_aim_lastinc,'F_aim_lastInc')
2144  call hdf5_write(grouphandle,f_aimdot, 'F_aimDot')
2145  call hdf5_write(grouphandle,f, 'F')
2146  call hdf5_write(grouphandle,f_lastinc, 'F_lastInc')
2147 
2148  call hdf5_write(grouphandle,c_volavg, 'C_volAvg')
2149  call hdf5_write(grouphandle,c_volavglastinc,'C_volAvgLastInc')
2150  call hdf5_write(grouphandle,c_minmaxavg, 'C_minMaxAvg')
2151 
2152  call hdf5_closegroup(grouphandle)
2153  call hdf5_closefile(filehandle)
2154 
2155  if (num%update_gamma) call utilities_savereferencestiffness
2156 
2157  call dmdavecrestorearrayf90(da,solution_vec,f,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2158 
2160 
2161 
2162 !--------------------------------------------------------------------------------------------------
2164 !--------------------------------------------------------------------------------------------------
2165 subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dummy,ierr)
2167  type(tsnes) :: snes_local
2168  integer(kind=selected_int_kind(5)), intent(in) :: PETScIter
2169  real(kind=selected_real_kind(10)), intent(in) :: &
2170  devnull1, &
2171  devnull2, &
2172  devnull3
2173  integer(kind=selected_int_kind(5)) :: reason
2174  integer(kind=selected_int_kind(10)) :: dummy
2175  integer(kind=selected_int_kind(5)) :: ierr
2176  real(pReal) :: &
2177  divTol, &
2178  BCTol
2179 
2180  divtol = max(maxval(abs(p_av))*err_div_tolrel ,err_div_tolabs)
2181  bctol = max(maxval(abs(p_av))*err_stress_tolrel,err_stress_tolabs)
2182 
2183  if ((totaliter >= itmin .and. &
2184  all([ err_div/divtol, &
2185  err_bc /bctol ] < 1.0_preal)) &
2186  .or. terminallyill) then
2187  reason = 1
2188  elseif (totaliter >= itmax) then
2189  reason = -1
2190  else
2191  reason = 0
2192  endif
2193 
2194 !--------------------------------------------------------------------------------------------------
2195 ! report
2196  write(6,'(1/,a)') ' ... reporting .............................................................'
2197  write(6,'(1/,a,f12.2,a,es8.2,a,es9.2,a)') ' error divergence = ', &
2198  err_div/divtol, ' (',err_div,' / m, tol = ',divtol,')'
2199  write(6,'(a,f12.2,a,es8.2,a,es9.2,a)') ' error stress BC = ', &
2200  err_bc/bctol, ' (',err_bc, ' Pa, tol = ',bctol,')'
2201  write(6,'(/,a)') ' ==========================================================================='
2202  flush(6)
2203 
2204 end subroutine converged
2205 
2206 
2207 !--------------------------------------------------------------------------------------------------
2209 !--------------------------------------------------------------------------------------------------
2210 subroutine formresidual(in, F, &
2211  residuum, dummy, ierr)
2213  integer(kind=selected_int_kind(5)), dimension(25) :: in
2214  real(kind=selected_real_kind(10)), dimension(3,3,in(13)+1:in(13)+in(16),in(14)+1:in(14)+in(17),in(15)+1:in(15)+in(18)), &
2215  intent(in) :: f
2216  real(kind=selected_real_kind(10)), dimension(3,3,in(7)+1:in(7)+in(10),in(8)+1:in(8)+in(11),in(9)+1:in(9)+in(12)), &
2217  intent(out) :: residuum
2218  real(pReal), dimension(3,3) :: &
2219  deltaF_aim
2220  integer(kind=selected_int_kind(5)) :: &
2221  PETScIter, &
2222  nfuncs
2223  integer(kind=selected_int_kind(10)) :: dummy
2224  integer(kind=selected_int_kind(5)) :: ierr
2225 
2226  call snesgetnumberfunctionevals(snes,nfuncs,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2227  call snesgetiterationnumber(snes,petsciter,ierr); if (ierr .ne. 0) then;call petscerrorf(ierr);return;endif
2228 
2229  if (nfuncs == 0 .and. petsciter == 0) totaliter = -1 ! new increment
2230 !--------------------------------------------------------------------------------------------------
2231 ! begin of new iteration
2232  newiteration: if (totaliter <= petsciter) then
2233  totaliter = totaliter + 1
2234  write(6,'(1x,a,3(a,i0))') trim(incinfo), ' @ Iteration ', itmin, '≤',totaliter, '≤', itmax
2236  write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
2237  ' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(f_aim,active=.true.))
2238  write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
2239  ' deformation gradient aim =', transpose(f_aim)
2240  flush(6)
2241  endif newiteration
2242 
2243 !--------------------------------------------------------------------------------------------------
2244 ! evaluate constitutive response
2245  call utilities_constitutiveresponse(residuum, & ! "residuum" gets field of first PK stress (to save memory)
2247  f,params%timeinc,params%rotation_BC)
2248  call mpi_allreduce(mpi_in_place,terminallyill,1,mpi_logical,mpi_lor,petsc_comm_world,ierr)
2249 
2250 !--------------------------------------------------------------------------------------------------
2251 ! stress BC handling
2252  deltaf_aim = math_mul3333xx33(s, p_av - params%stress_BC)
2253  f_aim = f_aim - deltaf_aim
2254  err_bc = maxval(abs(params%stress_mask * (p_av - params%stress_BC))) ! mask = 0.0 when no stress bc
2255 
2256 !--------------------------------------------------------------------------------------------------
2257 ! updated deformation gradient using fix point algorithm of basic scheme
2258  tensorfield_real = 0.0_preal
2259  tensorfield_real(1:3,1:3,1:grid(1),1:grid(2),1:grid3) = residuum ! store fPK field for subsequent FFT forward transform
2260  call utilities_ffttensorforward ! FFT forward of global "tensorField_real"
2261  err_div = utilities_divergencerms() ! divRMS of tensorField_fourier for later use
2262  call utilities_fouriergammaconvolution(params%rotation_BC%rotate(deltaf_aim,active=.true.)) ! convolution of Gamma and tensorField_fourier
2263  call utilities_ffttensorbackward ! FFT backward of global tensorField_fourier
2264 
2265 !--------------------------------------------------------------------------------------------------
2266 ! constructing residual
2267  residuum = tensorfield_real(1:3,1:3,1:grid(1),1:grid(2),1:grid3) ! Gamma*P gives correction towards div(P) = 0, so needs to be zero, too
2268 
2269 end subroutine formresidual
2270 
2271 
2272 end module grid_mech_spectral_basic
grid_mech_spectral_basic::c_minmaxavg
real(preal), dimension(3, 3, 3, 3), private c_minmaxavg
current (min+max)/2 stiffness
Definition: grid_mech_spectral_basic.f90:1852
hdf5_utilities::hdf5_addgroup
integer(hid_t) function hdf5_addgroup(fileHandle, groupName)
adds a new group to the fileHandle
Definition: HDF5_utilities.f90:182
grid_mech_spectral_basic::f_aim
real(preal), dimension(3, 3), private f_aim
current prescribed deformation gradient
Definition: grid_mech_spectral_basic.f90:1845
grid_mech_spectral_basic::c_volavg
real(preal), dimension(3, 3, 3, 3), private c_volavg
current volume average stiffness
Definition: grid_mech_spectral_basic.f90:1852
grid_mech_spectral_basic::p_av
real(preal), dimension(3, 3), private p_av
average 1st Piola–Kirchhoff stress
Definition: grid_mech_spectral_basic.f90:1845
grid_mech_spectral_basic::c_volavglastinc
real(preal), dimension(3, 3, 3, 3), private c_volavglastinc
previous volume average stiffness
Definition: grid_mech_spectral_basic.f90:1852
grid_mech_spectral_basic::incinfo
character(len=pstringlen), private incinfo
time and increment information
Definition: grid_mech_spectral_basic.f90:1851
hdf5_utilities::hdf5_closegroup
subroutine hdf5_closegroup(group_id)
close a group
Definition: HDF5_utilities.f90:251
grid_mech_spectral_basic::tnumerics
Definition: grid_mech_spectral_basic.f90:1825
grid_mech_spectral_basic::solution_vec
type(tvec), private solution_vec
Definition: grid_mech_spectral_basic.f90:1835
homogenization::materialpoint_f0
real(preal), dimension(:,:,:,:), allocatable, public materialpoint_f0
def grad of IP at start of FE increment
Definition: homogenization.f90:36
debug::debug_level
integer, dimension(debug_maxntype+2), public, protected debug_level
Definition: debug.f90:48
grid_mech_spectral_basic::grid_mech_spectral_basic_updatecoords
subroutine, public grid_mech_spectral_basic_updatecoords
Age.
Definition: grid_mech_spectral_basic.f90:2113
grid_mech_spectral_basic::grid_mech_spectral_basic_restartwrite
subroutine, public grid_mech_spectral_basic_restartwrite
Write current solver and constitutive data for restart to file.
Definition: grid_mech_spectral_basic.f90:2128
grid_mech_spectral_basic::params
type(tsolutionparams), private params
Definition: grid_mech_spectral_basic.f90:1823
hdf5_utilities
Definition: HDF5_utilities.f90:11
hdf5_utilities::hdf5_openfile
integer(hid_t) function hdf5_openfile(fileName, mode, parallel)
open and initializes HDF5 output file
Definition: HDF5_utilities.f90:119
spectral_utilities::tsolutionparams
Definition: spectral_utilities.f90:1557
spectral_utilities
Utilities used by the different spectral solver variants.
Definition: spectral_utilities.f90:10
numerics::worldsize
integer, public, protected worldsize
MPI worldsize (/=1 for MPI simulations only)
Definition: numerics.f90:1470
spectral_utilities::utilities_divergencerms
real(preal) function, public utilities_divergencerms()
calculate root mean square of divergence of field_fourier
Definition: spectral_utilities.f90:2031
config
Reads in the material configuration from file.
Definition: config.f90:13
grid_mech_spectral_basic::totaliter
integer, private totaliter
total iteration in current increment
Definition: grid_mech_spectral_basic.f90:1863
discretization_grid::grid3
integer, public, protected grid3
(local) grid in 3rd direction
Definition: discretization_grid.f90:1478
grid_mech_spectral_basic::fdot
real(preal), dimension(:,:,:,:,:), allocatable, private fdot
field of assumed rate of compatible deformation gradient
Definition: grid_mech_spectral_basic.f90:1839
grid_mech_spectral_basic::da
type(tdm), private da
Definition: grid_mech_spectral_basic.f90:1833
discretization_grid
Parse geometry file to set up discretization and geometry for nonlocal model.
Definition: discretization_grid.f90:11
prec
setting precision for real and int type
Definition: prec.f90:13
math::math_mul3333xx33
pure real(preal) function, dimension(3, 3) math_mul3333xx33(A, B)
matrix double contraction 3333x33 = 33 (ijkl,kl)
Definition: math.f90:368
grid_mech_spectral_basic
Grid solver for mechanics: 1 basic.
Definition: grid_mech_spectral_basic.f90:11
grid_mech_spectral_basic::converged
subroutine converged(snes_local, PETScIter, devNull1, devNull2, devNull3, reason, dummy, ierr)
convergence check
Definition: grid_mech_spectral_basic.f90:2166
grid_mech_spectral_basic::f_lastinc
real(preal), dimension(:,:,:,:,:), allocatable, private f_lastinc
field of previous compatible deformation gradients
Definition: grid_mech_spectral_basic.f90:1839
spectral_utilities::utilities_savereferencestiffness
subroutine, public utilities_savereferencestiffness
Write out the current reference stiffness for restart.
Definition: spectral_utilities.f90:2548
spectral_utilities::utilities_ffttensorforward
subroutine, public utilities_ffttensorforward
forward FFT of data in field_real to field_fourier
Definition: spectral_utilities.f90:1882
grid_mech_spectral_basic::snes
type(tsnes), private snes
Definition: grid_mech_spectral_basic.f90:1834
grid_mech_spectral_basic::s
real(preal), dimension(3, 3, 3, 3), private s
current compliance (filled up with zeros)
Definition: grid_mech_spectral_basic.f90:1852
hdf5_utilities::hdf5_read
reads integer or float data of defined shape from file ! ToDo: order of arguments wrong
Definition: HDF5_utilities.f90:29
homogenization
homogenization manager, organizing deformation partitioning and stress homogenization
Definition: homogenization.f90:11
prec::preal
integer, parameter preal
number with 15 significant digits, up to 1e+-307 (typically 64 bit)
Definition: prec.f90:20
debug
Reading in and interpretating the debugging settings for the various modules.
Definition: debug.f90:12
grid_mech_spectral_basic::f_aim_lastinc
real(preal), dimension(3, 3), private f_aim_lastinc
previous average deformation gradient
Definition: grid_mech_spectral_basic.f90:1845
grid_mech_spectral_basic::f_aimdot
real(preal), dimension(3, 3), private f_aimdot
assumed rate of average deformation gradient
Definition: grid_mech_spectral_basic.f90:1845
spectral_utilities::utilities_fouriergammaconvolution
subroutine, public utilities_fouriergammaconvolution(fieldAim)
doing convolution gamma_hat * field_real, ensuring that average value = fieldAim
Definition: spectral_utilities.f90:1954
grid_mech_spectral_basic::formresidual
subroutine formresidual(in, F, residuum, dummy, ierr)
forms the residual vector
Definition: grid_mech_spectral_basic.f90:2212
spectral_utilities::utilities_updatecoords
subroutine, public utilities_updatecoords(F)
calculate coordinates in current configuration for given defgrad field
Definition: spectral_utilities.f90:2447
spectral_utilities::utilities_forwardfield
real(preal) function, dimension(3, 3, grid(1), grid(2), grid3), public utilities_forwardfield(timeinc, field_lastInc, rate, aim)
forwards a field with a pointwise given rate, if aim is given, ensures that the average matches the a...
Definition: spectral_utilities.f90:2368
grid_mech_spectral_basic::num
type(tnumerics) num
Definition: grid_mech_spectral_basic.f90:1829
numerics::itmax
integer, public, protected itmax
maximum number of iterations
Definition: numerics.f90:1495
spectral_utilities::utilities_constitutiveresponse
subroutine, public utilities_constitutiveresponse(P, P_av, C_volAvg, C_minmaxAvg, F, timeinc, rotation_BC)
calculate constitutive response from materialpoint_F0 to F during timeinc
Definition: spectral_utilities.f90:2266
damask_interface::interface_restartinc
integer, public, protected interface_restartinc
Increment at which calculation starts.
Definition: DAMASK_interface.f90:36
damask_interface
Interfacing between the 1-based solvers and the material subroutines provided by DAMASK.
Definition: DAMASK_interface.f90:22
config::config_numerics
type(tpartitionedstringlist), public, protected config_numerics
Definition: config.f90:30
grid_mech_spectral_basic::c_minmaxavglastinc
real(preal), dimension(3, 3, 3, 3), private c_minmaxavglastinc
previous (min+max)/2 stiffness
Definition: grid_mech_spectral_basic.f90:1852
spectral_utilities::tensorfield_real
real(c_double), dimension(:,:,:,:,:), pointer, public tensorfield_real
real representation (some stress or deformation) of field_fourier
Definition: spectral_utilities.f90:1497
debug::debug_spectral
integer, parameter, public debug_spectral
Definition: debug.f90:32
hdf5_utilities::hdf5_closefile
subroutine hdf5_closefile(fileHandle)
close the opened HDF5 output file
Definition: HDF5_utilities.f90:167
numerics::worldrank
integer, public, protected worldrank
MPI worldrank (/=0 for MPI simulations only)
Definition: numerics.f90:1470
math
Mathematical library, including random number generation and tensor representations.
Definition: math.f90:12
fesolving::terminallyill
logical terminallyill
at least one material point is terminally ill
Definition: FEsolving.f90:15
discretization_grid::grid
integer, dimension(3), public, protected grid
(global) grid
Definition: discretization_grid.f90:1476
numerics::itmin
integer, public, protected itmin
minimum number of iterations
Definition: numerics.f90:1495
debug::debug_spectralrotation
integer, parameter, public debug_spectralrotation
Definition: debug.f90:25
damask_interface::getsolverjobname
character(len=:) function, allocatable, public getsolverjobname()
solver job name (no extension) as combination of geometry and load case name
Definition: DAMASK_interface.f90:1737
spectral_utilities::utilities_maskedcompliance
real(preal) function, dimension(3, 3, 3, 3), public utilities_maskedcompliance(rot_BC, mask_stress, C)
calculates mask compliance tensor used to adjust F to fullfill stress BC
Definition: spectral_utilities.f90:2135
spectral_utilities::utilities_updategamma
subroutine, public utilities_updategamma(C)
updates reference stiffness and potentially precalculated gamma operator
Definition: spectral_utilities.f90:1841
spectral_utilities::tboundarycondition
set of parameters defining a boundary condition
Definition: spectral_utilities.f90:1537
grid_mech_spectral_basic::grid_mech_spectral_basic_init
subroutine, public grid_mech_spectral_basic_init
allocates all necessary fields and fills them with data, potentially from restart info
Definition: grid_mech_spectral_basic.f90:1879
grid_mech_spectral_basic::err_div
real(preal), private err_div
RMS of div of P.
Definition: grid_mech_spectral_basic.f90:1859
numerics
Managing of parameters related to numerics.
Definition: numerics.f90:10
hdf5_utilities::hdf5_opengroup
integer(hid_t) function hdf5_opengroup(fileHandle, groupName)
open an existing group of a file
Definition: HDF5_utilities.f90:215
spectral_utilities::tsolutionstate
return type of solution from spectral solver variants
Definition: spectral_utilities.f90:1528
fesolving
global variables for flow control
Definition: FEsolving.f90:10
grid_mech_spectral_basic::err_bc
real(preal), private err_bc
deviation from stress BC
Definition: grid_mech_spectral_basic.f90:1859
spectral_utilities::utilities_ffttensorbackward
subroutine, public utilities_ffttensorbackward
backward FFT of data in field_fourier to field_real
Definition: spectral_utilities.f90:1894
spectral_utilities::utilities_calculaterate
pure real(preal) function, dimension(3, 3, grid(1), grid(2), grid3), public utilities_calculaterate(heterogeneous, field0, field, dt, avRate)
calculates forward rate, either guessing or just add delta/timeinc
Definition: spectral_utilities.f90:2341
grid_mech_spectral_basic::grid_mech_spectral_basic_forward
subroutine, public grid_mech_spectral_basic_forward(cutBack, guess, timeinc, timeinc_old, loadCaseTime, deformation_BC, stress_BC, rotation_BC)
forwarding routine
Definition: grid_mech_spectral_basic.f90:2050
hdf5_utilities::hdf5_write
writes integer or real data of defined shape to file ! ToDo: order of arguments wrong
Definition: HDF5_utilities.f90:52
grid_mech_spectral_basic::grid_mech_spectral_basic_solution
type(tsolutionstate) function, public grid_mech_spectral_basic_solution(incInfoIn, timeinc, timeinc_old, stress_BC, rotation_BC)
solution for the basic scheme with internal iterations
Definition: grid_mech_spectral_basic.f90:1993
math::math_i3
real(preal), dimension(3, 3), parameter math_i3
3x3 Identity
Definition: math.f90:32