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 randomfields(inpc,textpart,istep,istat,n,iline,
20     &        ipol,inl,ipoinp,inp,ipoinpc,nener,physcon,ier)
21!
22!     reading the input deck: *RANDOM FIELD
23!
24!     characterized by standarddeviation and correlation length
25!
26      implicit none
27!
28      character*1 inpc(*)
29      character*132 textpart(16)
30!
31      integer istep,istat,n,key,i,iline,ipol,inl,ipoinp(2,*),
32     &  inp(3,*),ipoinpc(0:*),nener,k,ipos,neigenvectors,ier
33!
34      real*8 physcon(*),dummy
35!
36      if(istep.lt.1) then
37         write(*,*) '*ERROR reading *RANDOM FIELD: *RANDOM FIELD can'
38         write(*,*) '       only be used within a *SENSITIVITY step'
39         ier=1
40         return
41      endif
42!
43      call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
44     &     ipoinp,inp,ipoinpc)
45!
46!     reading the standard deviation and the correlation length
47!
48!     Number of eigenvectors used for the creation of the random field
49!
50      read(textpart(1)(1:20),'(i10)',iostat=istat) neigenvectors
51      physcon(11)=1.d0*neigenvectors
52!
53!     Standard deviation
54!
55      read(textpart(2)(1:20),'(f20.0)',iostat=istat) physcon(12)
56!
57!     Correlation length
58!
59      read(textpart(3)(1:20),'(f20.0)',iostat=istat) physcon(13)
60!
61      call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
62     &     ipoinp,inp,ipoinpc)
63!
64      return
65      end
66
67
68