00001 subroutine continuation
00002
00003 use global
00004
00005 use krylov
00006
00007 use mf
00008
00009
00010
00011 implicit none
00012
00013
00014 real(8),allocatable :: delta(:),F0(:),resVec(:)
00015
00016 integer valsize,valsizeMax,ptrSize,indSize,numberOfColors
00017
00018 real(8),allocatable :: jacVal(:)
00019 integer,allocatable :: jaccolInd(:),jacrowPtr(:),uptr(:)
00020
00021 real(8) inexactLinearTolerance,initial_norm
00022
00023 real(8) backup,myEps
00024
00025
00026 integer :: LinearIterations
00027
00028 allocate(delta(globalcurrentsetlength))
00029 allocate(F0(globalcurrentsetlength))
00030
00031 allocate(resVec(globalcurrentsetlength))
00032
00033
00034
00035 if (bootStrapping.eqv.on) return
00036
00037
00038 print*,'"""""""""""""""""""""""""""""""""""""'
00039 print*,'continuation'
00040 print*,'"""""""""""""""""""""""""""""""""""""'
00041
00042
00043 F0=0.d0
00044 delta=0.d0
00045 resVEc=0.d0
00046
00047
00048
00049 myEps=dsqrt(epsilon(0.d0))
00050
00051
00052
00053 inexactLinearTolerance=0.00001d0
00054
00055
00056 myModel%physics(1)%physicalParameters(1)=myModel%physics(1)%physicalParametersInitial(1)
00057
00058
00059 F0=discrete(0)
00060
00061
00062
00063 myModel%physics(1)%physicalParameters(1)=myModel%physics(1)%physicalParameters(1)+myEps
00064
00065
00066
00067 F0=(discrete(0)-F0)/myEps
00068
00069 myModel%physics(1)%physicalParameters(1)=myModel%physics(1)%physicalParametersInitial(1)
00070
00071
00072 call symbolic(valsizeMax)
00073 ptrSize=globalcurrentsetlength+1
00074
00075
00076
00077 if (allocated(JacVal)) deallocate(JacVal)
00078 if (allocated(JacColInd)) deallocate(JacColInd)
00079 if (allocated(uptr)) deallocate(uptr)
00080 if (allocated(JacRowPtr)) deallocate(JacRowPtr)
00081
00082
00083
00084 allocate(JacVal(valSizeMax),JacColInd(valSizeMax),JacRowPtr(ptrSize),uptr(globalcurrentsetlength))
00085
00086
00087 JacVal=0.d0
00088 JacColInd=0
00089 uptr=0
00090 JacRowPtr=0
00091
00092 tempy=y
00093
00094 call colorJacobianCRS(JacVal,JacColInd,JacRowPtr,globalcurrentsetlength,1,valSize,indSize,uptr,0,numberOfColors)
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 call basicilu0CRS(jacval(1:valsize),JacColInd(1:valsize),JacRowPtr,globalcurrentsetlength,valSize,uptr)
00107
00108
00109
00110
00111
00112 JacVal(1:valsize)=JacVal(1:valsize)+epsilon(0.d0)
00113 JacVal(1:valsize)=JacVal(1:valsize)-epsilon(0.d0)
00114
00115
00116
00117 initial_norm=1.d0
00118
00119 delta=-F0-matvec(delta)
00120
00121
00122 initial_norm=dsqrt(dot_product(delta,delta))
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 delta=0.d0
00143
00144
00145 call gmres(-F0,delta,200,20,inexactLinearTolerance,resVec,JacVal(1:valsize),jaccolInd(1:valsize),jacrowPtr,uptr,valsize,LinearIterations,2)
00146
00147
00148
00149
00150
00151 tempy=y
00152
00153
00154 y(setVec)=y(setvec)+bootdamping*delta*(myModel%physics(1)%physicalParametersFinal(1)-myModel%physics(1)%physicalParametersInitial(1))
00155
00156
00157
00158
00159
00160
00161 myModel%physics(1)%physicalParameters(1)=myModel%physics(1)%physicalParametersFinal(1)
00162
00163
00164 end subroutine continuation