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 utemp(temp,msecpt,kstep,kinc,time,node,coords,vold,
20     &  mi,iponoel,inoel,ipobody,xbody,ibody,ipkon,kon,
21     &  lakon,ielprop,prop,ielmat,
22     &  shcon,nshcon,rhcon,nrhcon,ntmat_,cocon,ncocon)
23!
24!     user subroutine utemp
25!
26!
27!     INPUT:
28!
29!     msecpt             number of temperature values (for volume elements:1)
30!     kstep              step number
31!     kinc               increment number
32!     time(1)            current step time
33!     time(2)            current total time
34!     node               node number
35!     coords(1..3)       global coordinates of the node
36!     vold(0..4,1..nk)   solution field in all nodes
37!                        (not available for CFD-calculations)
38!                        0: temperature
39!                        1: displacement in global x-direction
40!                        2: displacement in global y-direction
41!                        3: displacement in global z-direction
42!                        4: not used
43!     mi(1)              max # of integration points per element (max
44!                        over all elements)
45!     mi(2)              max degree of freedomm per node (max over all
46!                        nodes) in fields like v(0:mi(2))...
47!     iponoel(i)         the network elements to which node i belongs
48!                        are stored in inoel(1,iponoel(i)),
49!                        inoel(1,inoel(2,iponoel(i)))...... until
50!                        inoel(2,inoel(2,inoel(2......)=0
51!     inoel(1..2,*)      field containing the network elements
52!     ipobody(1,i)       points to an entry in fields ibody and xbody
53!                        containing the body load applied to element i,
54!                        if any, else 0
55!     ipobody(2,i)       index referring to the line in field ipobody
56!                        containing a pointer to the next body load
57!                        applied to element i, else 0
58!     ibody(1,i)         code identifying the kind of body load i:
59!                        1=centrifugal, 2=gravity, 3=generalized gravity
60!     ibody(2,i)         amplitude number for load i
61!     ibody(3,i)         load case number for load i
62!     xbody(1,i)         size of body load i
63!     xbody(2..4,i)      for centrifugal loading: point on the axis,
64!                        for gravity loading with known gravity vector:
65!                          normalized gravity vector
66!     xbody(5..7,i)      for centrifugal loading: normalized vector on the
67!                          rotation axis
68!     ipkon(i)           points to the location in field kon preceding
69!                        the topology of element i
70!     kon(*)             contains the topology of all elements. The
71!                        topology of element i starts at kon(ipkon(i)+1)
72!                        and continues until all nodes are covered. The
73!                        number of nodes depends on the element label
74!     lakon(i)           contains the label of element i
75!     ielprop(i)         points to the location in field prop preceding
76!                        the properties of element i
77!     prop(*)            contains the properties of all network elements. The
78!                        properties of element i start at prop(ielprop(i)+1)
79!                        and continues until all properties are covered. The
80!                        appropriate amount of properties depends on the
81!                        element label. The kind of properties, their
82!                        number and their order corresponds
83!                        to the description in the user's manual,
84!                        cf. the sections "Fluid Section Types"
85!     ielmat(j,i)        contains the material number for element i
86!                        and layer j
87!     shcon(0,j,i)       temperature at temperature point j of material i
88!     shcon(1,j,i)       specific heat at constant pressure at the
89!                        temperature point j of material i
90!     shcon(2,j,i)       dynamic viscosity at the temperature point j of
91!                        material i
92!     shcon(3,1,i)       specific gas constant of material i
93!     nshcon(i)          number of temperature data points for the specific
94!                        heat of material i
95!     rhcon(0,j,i)       temperature at density temperature point j of
96!                        material i
97!     rhcon(1,j,i)       density at the density temperature point j of
98!                        material i
99!     nrhcon(i)          number of temperature data points for the density
100!                        of material i
101!     ntmat_             maximum number of temperature data points for
102!                        any material property for any material
103!     ncocon(1,i)        number of conductivity constants for material i
104!     ncocon(2,i)        number of temperature data points for the
105!                        conductivity coefficients of material i
106!     cocon(0,j,i)       temperature at conductivity temperature point
107!                        j of material i
108!     cocon(k,j,i)       conductivity coefficient k at conductivity
109!                        temperature point j of material i
110!
111!     OUTPUT:
112!
113!     temp(1..msecpt)    temperature in the node
114!
115      implicit none
116!
117      character*8 lakon(*)
118!
119      integer msecpt,kstep,kinc,node,mi(*),iponoel(*),inoel(2,*),
120     &  ipobody(2,*),ibody(3,*),ipkon(*),kon(*),ielprop(*),
121     &  ielmat(mi(3),*),nshcon(*),nrhcon(*),ncocon(2,*),ntmat_
122!
123      real*8 temp(msecpt),time(2),coords(3),vold(0:mi(2),*),xbody(7,*),
124     &  prop(*),shcon(0:3,ntmat_,*),rhcon(0:1,ntmat_,*),
125     &  cocon(0:6,ntmat_,*)
126!
127!
128!
129!     In order to use this user subroutine:
130!       1. delete the next call to utemp_ccxlib
131!       2. write your own code replacing the line "temp(1)=293.d0"
132!
133      call utemp_ccxlib(temp,msecpt,kstep,kinc,time,node,coords,vold,
134     &  mi)
135!
136!     Start here your own code. The next line is an example of how your
137!     code could look like.
138!
139c      temp(1)=293.d0
140!
141      return
142      end
143
144