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

Go to the source code of this file.

Functions/Subroutines

subroutine magneticpermeabilitys (inpc, textpart, elcon, nelcon, nmat, ntmat_, ncmat_, irstrt, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc)
 

Function/Subroutine Documentation

◆ magneticpermeabilitys()

subroutine magneticpermeabilitys ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
real*8, dimension(0:ncmat_,ntmat_,*)  elcon,
integer, dimension(2,*)  nelcon,
integer  nmat,
integer  ntmat_,
integer  ncmat_,
integer  irstrt,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc 
)
22 !
23 ! reading the input deck: *MAGNETIC PERMEABILITY
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*132 textpart(16)
29 !
30  integer nelcon(2,*),nmat,ntmat,ntmat_,istep,istat,ipoinpc(0:*),
31  & n,key,i,ityp,ncmat_,irstrt,iline,ipol,inl,ipoinp(2,*),inp(3,*),
32  & idomain
33 !
34  real*8 elcon(0:ncmat_,ntmat_,*)
35 !
36  ntmat=0
37 !
38  if((istep.gt.0).and.(irstrt.ge.0)) then
39  write(*,*) '*ERROR reading *MAGNETIC PERMEABILITY:'
40  write(*,*) ' *MAGNETIC PERMEABILITY should be placed'
41  write(*,*) ' before all step definitions'
42  call exit(201)
43  endif
44 !
45  if(nmat.eq.0) then
46  write(*,*) '*ERROR reading *MAGNETIC PERMEABILITY:'
47  write(*,*) ' *MAGNETIC PERMEABILITY should be preceded'
48  write(*,*) ' by a *MATERIAL card'
49  call exit(201)
50  endif
51 !
52  ityp=2
53 !
54  do i=2,n
55  if(textpart(i)(1:5).eq.'TYPE=') then
56  if(textpart(i)(6:8).eq.'ISO') then
57  ityp=2
58  endif
59  exit
60  else
61  write(*,*) '*WARNING reading *MAGNETIC PERMEABILITY:'
62  write(*,*) ' parameter not recognized:'
63  write(*,*) ' ',
64  & textpart(i)(1:index(textpart(i),' ')-1)
65  call inputwarning(inpc,ipoinpc,iline,
66  &"*MAGNETIC PERMEABILITY%")
67  endif
68  enddo
69 !
70  nelcon(1,nmat)=ityp
71 !
72  if(ityp.eq.2) then
73  do
74  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
75  & ipoinp,inp,ipoinpc)
76  if((istat.lt.0).or.(key.eq.1)) return
77  ntmat=ntmat+1
78  nelcon(2,nmat)=ntmat
79  if(ntmat.gt.ntmat_) then
80  write(*,*) '*ERROR reading *MAGNETIC PERMEABILITY:'
81  write(*,*) ' increase ntmat_'
82  call exit(201)
83  endif
84 !
85  read(textpart(1)(1:20),'(f20.0)',iostat=istat)
86  & elcon(1,ntmat,nmat)
87  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
88  &"*MAGNETIC PERMEABILITY%")
89 !
90  read(textpart(2)(1:10),'(i10)',iostat=istat) idomain
91  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
92  &"*MAGNETIC PERMEABILITY%")
93  elcon(2,ntmat,nmat)=idomain+0.5d0
94 !
95  if(textpart(3)(1:1).ne.' ') then
96  read(textpart(3)(1:20),'(f20.0)',iostat=istat)
97  & elcon(0,ntmat,nmat)
98  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
99  &"*MAGNETIC PERMEABILITY%")
100  else
101  elcon(0,ntmat,nmat)=0.d0
102  endif
103  enddo
104  else
105  write(*,*) '*ERROR reading *MAGNETIC PERMEABILITY:'
106  write(*,*) ' no anisotropy allowed'
107  call exit(201)
108  endif
109 !
110  if(ntmat.eq.0) nelcon(1,nmat)=0
111 !
112  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine inputerror(inpc, ipoinpc, iline, text)
Definition: inputerror.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)