Debian Codegraph @

packages/seacas/libraries/mapvarlib/sintpn.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 *DECK,SINTPN
9 SUBROUTINE SINTPN(ICONA,SOLNA,ISRCHR,NISR,RSRCHR,NRSR,
10 & SOLNB,NDLSTB,XB,YB,ZB,
11 & IDBLK,TIMES,INSUB,DUMN)
12
13 C ******************************************************************
14
15 C SUBROUTINE TO CONTROL INTERPOLATION OF NODAL RESULTS FROM
16 C DONOR MESH TO RECIPIENT MESH FOR SHELLS
17 C INTERPOLATED SOLUTION IS WRITTEN TO EXODUS FILE
18
19 C Calls subroutine SHAPEF, ININOD
20
21 C Called by MAPVAR
22
23 C ******************************************************************
24
25 C ICONA INT Connectivity of donor mesh (1:nelnda,1:numeba)
26 C SOLNA REAL Nodal variables for donor mesh
27 C ISRCHR INT Contains the element in donor mesh within which
28 C the point (node in recipient mesh) is found
29 C RSRCHR REAL Contains the isoparametric coords of point
30 C SOLNB REAL Nodal variables for recipient mesh
31 C NDLSTB INT List of recipient mesh nodes in current element block
32 C SOLN REAL SOLNA vector local to each donor mesh element
33 C INSUB INT Number of times into subroutine for this element block
34 C 1-first time; >1-second,etc time;
35 C used to control mapping for many element blocks to one
36
37 C ******************************************************************
38
39 include 'amesh.blk'
40 include 'bmesh.blk'
41 include 'aexds1.blk'
42 include 'contrl.blk'
43 include 'ebbyeb.blk'
44 include 'ex2tp.blk'
45 include 'steps.blk'
46 include 'varnpt.blk'
47 include 'tapes.blk'
48
49 DIMENSION XB(*), YB(*), ZB(*), TIMES(*)
50 DIMENSION ICONA(NELNDA,*), SOLNA(NODESA,NVARNP)
51 DIMENSION SOLNB(NODESB,NVARNP), NDLSTB(*)
52 DIMENSION ISRCHR(NISR,*),RSRCHR(NRSR,*)
53 DIMENSION SOLN(27),DUMN(*)
54
55 C ******************************************************************
56
57 C Set up time steps
58
59 IF (ISTEP .EQ. -1)THEN
60 NTM = NTIMES
61 ELSE
62 NTM = 1
63 END IF
64
65 DO 5 IST = 1, NTM
66 IF (ISTEP .EQ. -1)THEN
67 ISTP = IST
68 ELSE
69 ISTP = ISTEP
70 END IF
71
72 C Start interpolation
73
74 DO 10 IVAR = 1, NVARNP
75
76 C For IDEF = 2 do mesh annealing (used by GOMA); write out all
77 C displacements as zero.
78
79 IF (IDEF .EQ. 2 .AND. (IVAR .EQ. IXDIS .OR. IVAR .EQ. IYDIS
80 & .OR. IVAR .EQ. IZDIS))GO TO 10
81
82 CALL EXGNV(NTP4EX,IST,IVAR,NODESB,SOLNB(1,IVAR),IERR)
83
84 C If first time into SINTPN for this element block, initialize
85 C else you are mapping many to one and retrieve partially mapped
86 C results from temporary storage in EXODUS
87
88 IF (INSUB .EQ. 1)THEN
89 CALL ININOD(SOLNB,IVAR,TIMES,ISTP,IDBLK,NDLSTB,XB,YB,ZB,
90 & DUMN)
91 END IF
92
93 C Get nodal results on donor mesh
94
95 CALL EXGNV(NTP2EX,ISTP,IVAR,NODESA,SOLNA(1,IVAR),IERR)
96
97 C Loop on nodes in recipient mesh
98
99 DO 30 I = 1,NUMNDB
100 NEL = ISRCHR(1,I)
101 IF (NEL .NE. 0) THEN
102
103 C Set parameters for element in donor mesh
104
105 S = RSRCHR(5,I)
106 T = RSRCHR(6,I)
107 R = 0.
108 NNODES = 4
109 DO 20 J = 1,NNODES
110 INODE = ICONA(J,NEL)
111 SOLN(J) = SOLNA(INODE,IVAR)
112 20 CONTINUE
113
114 C shape function for shell is same as for quad
115
116 CALL SHAPEF(3,S,T,R,SOLN,BVALUE)
117 SOLNB(NDLSTB(I),IVAR) = BVALUE
118 END IF
119 30 CONTINUE
120
121 C Save results, it doesn't matter if they are preliminary or final
122
123 CALL EXPNV(NTP4EX,IST,IVAR,NODESB,SOLNB(1,IVAR),IERR)
124 10 CONTINUE
125 5 CONTINUE
126 RETURN
127 END