CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
planeeq.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine planeeq (cotet, nodef, planfal)
 

Function/Subroutine Documentation

◆ planeeq()

subroutine planeeq ( real*8, dimension(3,*)  cotet,
integer, dimension(3)  nodef,
real*8, dimension(4)  planfal 
)
20 !
21 ! calculate the equation of a plane through the points nodef(1),
22 ! nodef(2) and nodef(3). The equation of the plane is
23 ! planfal(1)*x+planfal(2)*y+planfal(3)*z+planfal(4)=0; the
24 ! coordinates of the nodes are stored in cotet
25 !
26 ! the vector (planefal(1),planfal(2),planfal(3)) is orthogonal
27 ! to the plane and is normalized
28 !
29  implicit none
30 !
31  integer nodef(3)
32  real*8 cotet(3,*),planfal(4),x1,y1,z1,x2,y2,z2,dd
33 !
34  x1=cotet(1,nodef(1))-cotet(1,nodef(2))
35  y1=cotet(2,nodef(1))-cotet(2,nodef(2))
36  z1=cotet(3,nodef(1))-cotet(3,nodef(2))
37 !
38  x2=cotet(1,nodef(1))-cotet(1,nodef(3))
39  y2=cotet(2,nodef(1))-cotet(2,nodef(3))
40  z2=cotet(3,nodef(1))-cotet(3,nodef(3))
41 !
42  planfal(1)=y1*z2-y2*z1
43  planfal(2)=x2*z1-x1*z2
44  planfal(3)=x1*y2-x2*y1
45 !
46  dd=dsqrt(planfal(1)*planfal(1)+planfal(2)*planfal(2)+
47  & planfal(3)*planfal(3))
48 !
49  if(dd.lt.1.d-10) then
50  planfal(1)=0.d0
51  planfal(2)=0.d0
52  planfal(3)=0.d0
53  planfal(4)=0.d0
54  return
55  endif
56 !
57  planfal(1)=planfal(1)/dd
58  planfal(2)=planfal(2)/dd
59  planfal(3)=planfal(3)/dd
60 !
61  planfal(4)=-(planfal(1)*cotet(1,nodef(1))+
62  & planfal(2)*cotet(2,nodef(1))+
63  & planfal(3)*cotet(3,nodef(1)))
64 !
65  return
static double * z1
Definition: filtermain.c:48
static double * x1
Definition: filtermain.c:48
Hosted by OpenAircraft.com, (Michigan UAV, LLC)