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 extrapol2dto3d(dgdxglob,iponod2dto3d,ndesi,
20     &   nodedesi,nobject,nk,xinterpol,nnodes,ipkon,lakon,kon,
21     &   nodedesimpc,ndesimpc,ne,iponoel,inoel)
22!
23!     for 2D models extrapolate the results of the midnodes
24!     to the 2 symmetry planes
25!
26      implicit none
27!
28      character*8 lakon(*)
29!
30      integer iponod2dto3d(2,*),ndesi,nodedesi(*),nobject,
31     &  node,nk,idesvar,ipkon(*),konl(26),ifaceq(2,20),
32     &  ifacet(2,10),ifacew(2,15),kon(*),nnodes(nk),nope,ielem,
33     &  start,nodedesimpc(*),ndesimpc,ne,indexe,i,j,l,ii,
34     &  iponoel(*),inoel(2,*),nodecor1,nodecor2
35!
36      real*8 dgdxglob(2,nk,nobject),xinterpol(2,nk,nobject)
37!
38!     cornernodes next to the midnode for quadratic hex element
39!
40      data ifaceq /0,0,
41     &             0,0,
42     &             0,0,
43     &             0,0,
44     &             0,0,
45     &             0,0,
46     &             0,0,
47     &             0,0,
48     &             1,2,
49     &             2,3,
50     &             3,4,
51     &             1,4,
52     &             5,6,
53     &             6,7,
54     &             7,8,
55     &             5,8,
56     &             1,5,
57     &             2,6,
58     &             3,7,
59     &             4,8/
60!
61!     cornernodes next to the midnode for quadratic wedge elements
62!
63      data ifacew /0,0,
64     &             0,0,
65     &             0,0,
66     &             0,0,
67     &             0,0,
68     &             0,0,
69     &             1,2,
70     &             2,3,
71     &             1,3,
72     &             4,5,
73     &             5,6,
74     &             4,6,
75     &             1,4,
76     &             2,5,
77     &             3,6/
78!
79!     Loop over all designvariables
80!
81      do i=1,ndesi
82         idesvar=nodedesi(i)
83         do j=1,2
84            node=iponod2dto3d(j,idesvar)
85            if(node.eq.0) cycle
86!
87!           Loop over all objectives/constraints
88!
89            do l=1,nobject
90               dgdxglob(1,node,l)=dgdxglob(1,idesvar,l)
91               dgdxglob(2,node,l)=dgdxglob(2,idesvar,l)
92            enddo
93         enddo
94      enddo
95!
96      return
97      end
98