00001 subroutine activatePhysics(vec,maxVec)
00002
00003 use global
00004
00005
00006 implicit none
00007
00008 integer i
00009
00010 integer maxVec
00011
00012 integer vec(maxVec)
00013
00014 integer myP,p
00015
00016 integer startIndex,endIndex
00017
00018 integer currentXLength
00019
00020 currentXLength=0
00021
00022
00023 do myP=1,maxVec
00024
00025 p=Vec(myP)
00026
00027 startIndex=currentXLength+1
00028
00029 endIndex=startIndex+myModel%physics(p)%totalDof-1
00030
00031 currentXLength=endIndex
00032
00033 end do
00034
00035
00036 print*,currentXlength
00037
00038
00039 allocate(setY(currentXlength))
00040
00041
00042 currentXLength=0
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 do myP=1,maxVec
00055
00056 p=Vec(myP)
00057
00058 startIndex=currentXLength+1
00059
00060 endIndex=startIndex+myModel%physics(p)%totalDof-1
00061
00062 do i=startIndex,endIndex
00063
00064
00065 setY(i)%y=>myModel%physics(p)%x(i-currentXLength)
00066
00067 end do
00068
00069 currentXLength=endIndex
00070
00071 end do
00072
00073
00074
00075
00076
00077 print*,setY(1)%y,myModel%physics(p)%x(i-currentXLength)
00078
00079 stop
00080
00081
00082
00083 call printY(1,currentXLength)
00084
00085
00086
00087
00088
00089
00090 end subroutine activatePhysics