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

Go to the source code of this file.

Functions/Subroutines

subroutine add_sm_st (au, ad, jq, irow, i, j, value, i0, i1)
 

Function/Subroutine Documentation

◆ add_sm_st()

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