CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
writesubmatrix.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine writesubmatrix (submatrix, noderetain, ndirretain, nretain, jobnamec)
 

Function/Subroutine Documentation

◆ writesubmatrix()

subroutine writesubmatrix ( real*8, dimension(nretain,nretain)  submatrix,
integer, dimension(*)  noderetain,
integer, dimension(*)  ndirretain,
integer  nretain,
character*132, dimension(*)  jobnamec 
)
21 !
22 ! writing the matrix of a substructure to a .mtx-file
23 !
24  implicit none
25 !
26  character*132 jobnamec(*),fn
27 !
28  integer i,j,nretain,ilen,noderetain(*),ndirretain(*)
29 !
30  real*8 submatrix(nretain,nretain)
31 !
32  ilen=index(jobnamec(5),' ')
33  if(ilen.gt.129) then
34  write(*,*) '*ERROR in writesubmatrix:'
35  write(*,*) ' name of file for storing the submatrix'
36  write(*,*) ' is too long (> 128 char); name = '
37  write(*,*) jobnamec(5)(1:132)
38  call exit(201)
39  else
40  fn(1:ilen-1)=jobnamec(5)(1:ilen-1)
41  fn(ilen:ilen+3)='.mtx'
42  do i=ilen+4,132
43  fn(i:i)=' '
44  enddo
45  endif
46 !
47  open(12,file=fn,status='unknown')
48  write(12,100)
49  100 format('**')
50  write(12,101)
51  101 format('** GENERATION OF SUBSTRUCTURE')
52  write(12,102) nretain
53  102 format('*USER ELEMENT,NODES= ',i10,',LINEAR')
54  write(12,103)
55  103 format('** ELEMENT NODES')
56  write(12,104) (noderetain(i),i=1,nretain)
57  104 format('**',i10,',',i10,',',i10,',',i10,',',i10,',',i10,',',
58  &i10,',',i10,',',i10,',',i10,',')
59  write(12,105) ndirretain(1)
60  105 format(i10)
61  write(12,106) (i,ndirretain(i),i=2,nretain)
62  106 format(i10,',',i10)
63  write(12,107)
64  107 format('*MATRIX,TYPE=STIFFNESS')
65 !
66  do j=1,nretain
67  write(12,108) (submatrix(i,j),i=1,j)
68  enddo
69  108 format(e20.13,',',e20.13,',',e20.13,',',e20.13,',')
70  close(12)
71 !
72  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)