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

Go to the source code of this file.

Functions/Subroutines

subroutine add_sm_ei (au, ad, aub, adb, jq, irow, i, j, value, valuem, i0, i1)
 

Function/Subroutine Documentation

◆ add_sm_ei()

subroutine add_sm_ei ( real*8, dimension(*), intent(inout)  au,
real*8, dimension(*), intent(inout)  ad,
real*8, dimension(*), intent(inout)  aub,
real*8, dimension(*), intent(inout)  adb,
integer, dimension(*), intent(in)  jq,
integer, dimension(*), intent(in)  irow,
integer, intent(in)  i,
integer, intent(in)  j,
real*8, intent(in)  value,
real*8, intent(in)  valuem,
integer, intent(in)  i0,
integer, intent(in)  i1 
)
21 !
22 ! stores the stiffness coefficient (i,j) with value "value"
23 ! in the stiffness matrix stored in spare matrix format and
24 ! the mass coefficient (i,j) with value "valuem" in the lumped
25 ! mass matrix
26 !
27  implicit none
28 !
29  integer jq(*),irow(*),i,j,ii,jj,ipointer,id,i0,i1
30 !
31  real*8 ad(*),au(*),adb(*),aub(*),value,valuem
32 !
33  intent(in) jq,irow,i,j,value,valuem,
34  & i0,i1
35 !
36  intent(inout) ad,au,adb,aub
37 !
38  if(i.eq.j) then
39  if(i0.eq.i1) then
40  ad(i)=ad(i)+value
41  adb(i)=adb(i)+valuem
42  else
43  ad(i)=ad(i)+2.d0*value
44  adb(i)=adb(i)+2.d0*valuem
45  endif
46  return
47  elseif(i.gt.j) then
48  ii=i
49  jj=j
50  else
51  ii=j
52  jj=i
53  endif
54 c write(*,*) ii,jj,value,valuem
55 !
56  call nident(irow(jq(jj)),ii,jq(jj+1)-jq(jj),id)
57 !
58  ipointer=jq(jj)+id-1
59 !
60  if(irow(ipointer).ne.ii) then
61  write(*,*) '*ERROR in add_sm_ei: coefficient should be 0'
62 c write(*,*) i,j,ii,jj,ipointer,irow(ipointer)
63 c call exit(201)
64  else
65  au(ipointer)=au(ipointer)+value
66  aub(ipointer)=aub(ipointer)+valuem
67  endif
68 !
69  return
subroutine nident(x, px, n, id)
Definition: nident.f:26
Hosted by OpenAircraft.com, (Michigan UAV, LLC)