-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathplot2d.f
More file actions
97 lines (74 loc) · 2.58 KB
/
Copy pathplot2d.f
File metadata and controls
97 lines (74 loc) · 2.58 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
!$Id:$
subroutine plot2d(ie,ix,ip,x,xl,nie,ndm,nen,nen1,nume,n1,n2)
! * * F E A P * * A Finite Element Analysis Program
!.... Copyright (c) 1984-2024: Regents of the University of California
! All rights reserved
!-----[--.----+----.----+----.-----------------------------------------]
! Purpose: Two dimensional mesh plot routine
! Inputs:
! ie(nie,*) - Assembly data for material sets
! ix(nen1,*)- Element nodal connections
! ip(*) - Sorted element order
! x(ndm,*) - Nodal coordinates
! ndm - Dimension of x array
! nen - Number of nodes on element
! nen1 - Dimension of ix array
! nume - Number of elements/faces
! n1 - Color for plots
! n2 - Outline indicator
! Scratch:
! xl(ndm,*) - Element nodal coordinates
! Outputs:
! none - Plot output to screen/file
!-----[--.----+----.----+----.-----------------------------------------]
implicit none
include 'eldata.h'
include 'pbody.h'
include 'pdata2.h'
integer :: nie, ndm, nen, nen1, n1,n2, nume, isp
integer :: i, j, ii, n,nn
integer :: ie(nie,*),ix(nen1,*), ip(*)
real (kind=8) :: x(ndm,*),xl(ndm,*)
save
! Loop over elements to draw mesh
do nn = 1,nume
n = ip(nn)
if(n.gt.0) then
if(ix(nen1-1,n).ge.0) then
ma = ix(nen1,n)
! Plot correct material number: ma > 0 active material
if( maplt.eq.0 .or. ma.eq.maplt) then
if(n1.eq.0) then
icolr = ma + 1
elseif(n1.lt.0) then
icolr = mod(ix(nen1-1,n),7) + 1
else
icolr = n1
endif
call pppcol(icolr,0)
do i = 1,nen
ii = abs(ix(i,n))
if(ii.gt.0) then
nel = i
do j = 1,ndm
xl(j,i) = x(j,ii)
end do
else
do j = 1,ndm
xl(j,i) = 0.0d0
end do
endif
end do
! Check for a line element
if(ix(1,n).eq.ix(4,n) .and. ix(2,n).eq.ix(3,n)) nel = 2
if(n2.gt.0) then
isp = -1
else
isp = 1
endif
call plot9(ie(nie-1,ma),ix(1,n),xl,ndm,nel,isp)
endif
endif
endif
end do
end subroutine plot2d