Debian Codegraph @

packages/seacas/libraries/mapvarlib/ininod.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 SUBROUTINE ININOD(SOLNB,IVAR,TIMES,ISTP,IDBLK,NDLSTB,XB,YB,ZB,
8 & SN)
9
10 C *********************************************************************
11
12 C ININOD initializes nodal variable values based on TIME, ELEMENT
13 C BLOCK, VARIABLE NAME, COORDINATE, etc. By default, nodal variable
14 C values are set to zero. It is intended that the user rewrite this
15 C subroutine to provide values that are appropriate to the problem
16 C being solved. This is the preferred method to handle nodal variable
17 C assignment for recipient mesh nodes that lie outside the boundary
18 C of the donor mesh.
19
20 C Called by INTRPN, SINTPN
21
22 C *********************************************************************
23
24 C SOLNB REAL Array of nodal variable values
25 C (1:nodesb,1:nvarnp,1:ntimes)
26 C IVAR INT Position of variable in SOLNB array
27 C TIMES REAL Array of times (1:ntimes)
28 C ISTP INT Position in TIMES array, time step being processed
29 C IDBLK INT The element block I. D.
30 C NDLSTB INT Array of nodes that belong to this element block
31 C (1:numndb)
32 C XB REAL Array of X-coordinates (1:nodesb)
33 C YB REAL Array of Y-coordinates (1:nodesb)
34 C ZB REAL Array of Z-coordinates (1:nodesb)
35 C SN REAL Dummy array to store values from MESH-B
36
37 C *********************************************************************
38
39 include 'exodusII.inc'
40
41 include 'aexds1.blk'
42 include 'bmesh.blk'
43 include 'ebbyeb.blk'
44 include 'ex2tp.blk'
45 include 'inival.blk'
46
47 DIMENSION SOLNB(NODESB,NVARNP), TIMES(*), NDLSTB(*)
48 DIMENSION XB(*), YB(*), ZB(*)
49 DIMENSION SN(*)
50
51 C *********************************************************************
52
53 C Code to help you find some potentially useful stuff
54 C The actual time (real number)
55 C TIME = TIMES(ISTP)
56
57 C The pointer into VARNAM to get the variable name being processed
58 C INAM = IVAR + NVARGP + NVAREL
59
60 C The name of the variable (character) being processed
61 C NAME = NAMVAR(INAM)
62
63 C INOD = NDLSTB(I)
64
65 C Set value of node-NDLSTB(I); variable-IVAR to 0. by default.
66 C User to replace this with whatever code he wishes.
67
68 C ... Note: The exgnv step assumes that variable 'ivar' on the mesh
69 C database is the same variable as 'ivar' on the results
70 C database. This may or may not be the case....
71
72 call exgvp(ntp3ex, 'N', nvar, ierr)
73 if (nvar .ge. ivar) then
74 CALL EXGNV(NTP3EX,ISTP,IVAR,NODESB,SN,IERR)
75 DO 10 I = 1, NUMNDB
76 INODE = NDLSTB(I)
77 SOLNB(INODE,IVAR) = SN(INODE)
78 10 CONTINUE
79 else
80 DO 20 I = 1, NUMNDB
81 INODE = NDLSTB(I)
82 SOLNB(INODE,IVAR) = VALINI
83 20 CONTINUE
84 end if
85 RETURN
86 END