1! 2! CalculiX - A 3-dimensional finite element program 3! Copyright (C) 1998-2021 Guido Dhondt 4! 5! This program is free software; you can redistribute it and/or 6! modify it under the terms of the GNU General Public License as 7! published by the Free Software Foundation(version 2); 8! 9! 10! This program is distributed in the hope that it will be useful, 11! but WITHOUT ANY WARRANTY; without even the implied warranty of 12! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13! GNU General Public License for more details. 14! 15! You should have received a copy of the GNU General Public License 16! along with this program; if not, write to the Free Software 17! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18! 19 subroutine updatecont(koncont,ncont,co,vold,cg,straight,mi) 20! 21! update geometric date of the contact master surface triangulation 22! 23 implicit none 24! 25 integer koncont(4,*),ncont,i,j,k,node,mi(*) 26! 27 real*8 co(3,*),vold(0:mi(2),*),cg(3,*),straight(16,*),col(3,3) 28! 29 do i=1,ncont 30 do j=1,3 31 node=koncont(j,i) 32 do k=1,3 33 col(k,j)=co(k,node)+vold(k,node) 34 enddo 35 enddo 36! 37! center of gravity of the triangles 38! 39 do k=1,3 40 cg(k,i)=col(k,1) 41 enddo 42 do j=2,3 43 do k=1,3 44 cg(k,i)=cg(k,i)+col(k,j) 45 enddo 46 enddo 47 do k=1,3 48 cg(k,i)=cg(k,i)/3.d0 49 enddo 50! 51! calculating the equation of the triangle plane and the planes 52! perpendicular on it and through the triangle edges 53! 54 call straighteq3d(col,straight(1,i)) 55! 56 enddo 57! 58 return 59 end 60