00001 subroutine modelSolver
00002
00003 use global
00004
00005 use model
00006
00007
00008
00009 implicit none
00010
00011
00012 integer i
00013
00014 integer myP,myD
00015
00016 real(8) myEps
00017
00018 real(8),allocatable :: testVec(:)
00019
00020
00021
00022
00023
00024
00025 print*,pVec
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 if (demonaSolver.eq.dsNewton) then
00041
00042
00043
00044 print*,'newton is called'
00045
00046
00047 call newton
00048
00049
00050
00051
00052
00053
00054
00055 end if
00056
00057
00058
00059
00060
00061 stop
00062
00063
00064
00065 return
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 stop
00078
00079
00080
00081
00082 do myP=1,size(pVec)
00083
00084 currentPhysics=pVec(myP)
00085
00086 allocate(myModel%physics(myP)%dVec(1))
00087
00088 dVec=>myModel%physics(myP)%dVec
00089
00090 dVec(1)=1
00091
00092
00093
00094 end do
00095
00096
00097
00098 do myD=1,size(dVec)
00099
00100 currentDomain=dVec(myD)
00101
00102 end do
00103
00104
00105
00106 print*,'modelsolver set'
00107
00108
00109
00110 call set
00111
00112
00113
00114
00115
00116 allocate(testVec(currentSetlength))
00117
00118 testVec=0.d0
00119
00120
00121 do i=1,currentSetlength
00122
00123 testVec(i)=i
00124
00125
00126 end do
00127
00128
00129 myEps=dsqrt(epsilon(0.d0))
00130
00131
00132
00133
00134
00135 tempy(myModel%physics(currentPhysics)%domain(currentDomain)%setVec)=tempy(myModel%physics(currentPhysics)%domain(currentDomain)%setVec)+myeps*testVec
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145 print*,(discrete(1)-discrete(0))/myeps
00146
00147
00148
00149
00150
00151 end subroutine modelSolver