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

Go to the source code of this file.

Functions/Subroutines

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

Function/Subroutine Documentation

◆ add_sm_st_as()

subroutine add_sm_st_as ( real*8, dimension(*)  au,
real*8, dimension(*)  ad,
integer, dimension(*)  jq,
integer, dimension(*)  irow,
integer  i,
integer  j,
real*8  value,
integer  i0,
integer  i1,
integer, dimension(3)  nzs 
)
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,nzs(3),ioffset
27  real*8 ad(*),au(*),value
28 !
29  if(i.eq.j) then
30  if(i0.eq.i1) then
31  ad(i)=ad(i)+value
32  else
33  ad(i)=ad(i)+2.d0*value
34  endif
35  return
36  elseif(i.gt.j) then
37  ioffset=0
38  ii=i
39  jj=j
40  else
41  ioffset=nzs(3)
42  ii=j
43  jj=i
44  endif
45 !
46  call nident(irow(jq(jj)),ii,jq(jj+1)-jq(jj),id)
47 !
48  ipointer=jq(jj)+id-1
49 !
50  if(irow(ipointer).ne.ii) then
51  write(*,*) '*ERROR in add_sm_st_as: coefficient should be 0'
52  call exit(201)
53  else
54  ipointer=ipointer+ioffset
55  au(ipointer)=au(ipointer)+value
56  endif
57 !
58  return
subroutine nident(x, px, n, id)
Definition: nident.f:26
Hosted by OpenAircraft.com, (Michigan UAV, LLC)