1
C ================================================================
2
Subroutine updQa(n, XYP, IPE, IEE, qE)
3
C ================================================================
4
C Initial quality modification for tangled elements and their
6
C ================================================================
8
Integer IPE(3, *), IEE(3, *)
15
C ================================================================
37
If(check22(iP1, iP2, jP1, jP2)) Then
44
v1 = calVol(XYP(1, iP1), XYP(1, iP2), XYP(1, iP3))
45
v2 = calVol(XYP(1, iP1), XYP(1, iP2), XYP(1, jP3))
47
If(v1 * v2.GE.0D0) Then
60
C ================================================================
61
Subroutine updQb(nEs, lE, iEs, XYP, IPEs, qEs)
62
C ================================================================
63
C Dynamic quality modification for tangled elements inside
66
C Remark: non-efficient, time-consuming, but robust algorithm.
67
C ================================================================
68
real XYP(2, *), qEs(*)
69
Integer iEs(*), IPEs(3, *)
71
C group (Local variables)
76
C ================================================================
89
If(iEs(k).LT.0) goto 20
98
If(check22(iP1, iP2, jP1, jP2)) Then
105
v1 = calVol(XYP(1, iP1), XYP(1, iP2), XYP(1, iP3))
106
v2 = calVol(XYP(1, iP1), XYP(1, iP2), XYP(1, jP3))
108
If(v1 * v2.GE.0D0) Then
109
qEs(nEs) = -abs(qEs(nEs))
110
qEs(k) = -abs(qEs(k))
124
C ================================================================
125
Logical Function chkTangled(lE, iEs, IPEs)
126
C ================================================================
127
C Local mesh modifications for tangled mesh may result is a
128
C topologically wrong mesh (chkTangled = TRUE).
129
C ================================================================
130
Integer iEs(*), IPEs(3, *)
132
C group (Local variables)
136
C ================================================================
144
c ... more than two triangles with a common edge
159
If(m.EQ.n .OR. jEt.LE.0) goto 10
166
If(check22(iP1, iP2, jP1, jP2)) nEdge = nEdge + 1
169
If(nEdge.GT.2) goto 1000
170
tEdge = tEdge + nEdge
174
If(tEdge.EQ.0) goto 1000
178
c ... there is no topological defects