forked from bguest/ansys-macros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrSmiscMax.mac
49 lines (38 loc) · 1.24 KB
/
PrSmiscMax.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
!PrSmiscMax.mac
!B.Guest - benguest@gmail.com
!DESCRIPTION: This macro prints to an output file a table
! of maximum smisc values for each element type.
!POSTCONDITONS:
! OUT_MaxSmisc.out contains maximum smisc values
!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
! Get a list of all element types
*get,elemCount,elem,,count
elemReals= $ *vget,elemReals,elem,,attr,real !Get list of elements real numbers
*get,maxReal,rcon,,num,max
realMask= $ *dim,realMask,array,maxReal
*vfill,realMask,data,0.0
!Create Mask Of Real Numbers and number of real of real numbers
realCount = 0
*do,i,1,elemCount,
*if,realMask(elemReals(i)),eq,0,then
realMask(elemReals(i)) = 1
realCount = realCount + 1
*endif
*enddo
!Fill out real number array
realNumbers = $ *dim,realNumbers,array,realCount
realIndex = 1
*do,i,1,maxReal,
*if,realMask(i),eq,1,then
realNumbers(realIndex) = i
realIndex = realIndex + 1
*endif
*enddo
! For each element type
!Find out what type of element is its
!Select all elements of that type
!Get the maximum smisc value
!Print SMISC values
!======THE--END========THE--END========THE--END=========
!ITS THE END OF THE MACRO AS WE KNOW IT, AND I FEEL FINE