134 class(ImsLinearSettingsType) :: this
135 type(BlockParserType) :: parser
138 logical(LGP) :: block_found, end_of_block
140 character(len=LINELENGTH) :: errmsg
141 character(len=LINELENGTH) :: keyword
142 integer(I4B) :: iscaling, iordering
144 call parser%GetBlock(
'LINEAR', block_found, ierr, supportopenclose=.true., &
145 blockrequired=.false.)
147 if (block_found)
then
148 write (iout,
'(/1x,a)')
'PROCESSING LINEAR DATA'
150 call parser%GetNextLine(end_of_block)
151 if (end_of_block)
exit
152 call parser%GetStringCaps(keyword)
154 select case (keyword)
155 case (
'INNER_DVCLOSE')
156 this%dvclose = parser%GetDouble()
157 case (
'INNER_RCLOSE')
158 this%rclose = parser%GetDouble()
160 call parser%GetStringCaps(keyword)
161 if (keyword ==
'STRICT')
then
163 else if (keyword ==
'L2NORM_RCLOSE')
then
165 else if (keyword ==
'RELATIVE_RCLOSE')
then
167 else if (keyword ==
'L2NORM_RELATIVE_RCLOSE')
then
170 case (
'INNER_MAXIMUM')
171 this%iter1 = parser%GetInteger()
172 case (
'LINEAR_ACCELERATION')
173 call parser%GetStringCaps(keyword)
174 if (keyword .eq.
'CG')
then
176 else if (keyword .eq.
'BICGSTAB')
then
180 write (errmsg,
'(3a)') &
181 'Unknown IMSLINEAR LINEAR_ACCELERATION method (', &
183 call store_error(errmsg)
185 case (
'SCALING_METHOD')
186 call parser%GetStringCaps(keyword)
188 if (keyword .eq.
'NONE')
then
190 else if (keyword .eq.
'DIAGONAL')
then
192 else if (keyword .eq.
'L2NORM')
then
195 write (errmsg,
'(3a)') &
196 'Unknown IMSLINEAR SCALING_METHOD (', trim(keyword),
').'
197 call store_error(errmsg)
200 case (
'RED_BLACK_ORDERING')
202 case (
'REORDERING_METHOD')
203 call parser%GetStringCaps(keyword)
205 if (keyword ==
'NONE')
then
207 else if (keyword ==
'RCM')
then
209 else if (keyword ==
'MD')
then
212 write (errmsg,
'(3a)') &
213 'Unknown IMSLINEAR REORDERING_METHOD (', trim(keyword),
').'
214 call store_error(errmsg)
216 this%iord = iordering
217 case (
'NUMBER_ORTHOGONALIZATIONS')
218 this%north = parser%GetInteger()
219 case (
'RELAXATION_FACTOR')
220 this%relax = parser%GetDouble()
221 case (
'PRECONDITIONER_LEVELS')
222 this%level = parser%GetInteger()
223 if (this%level < 0)
then
224 write (errmsg,
'(a,1x,a)') &
225 'IMSLINEAR PRECONDITIONER_LEVELS must be greater than', &
227 call store_error(errmsg)
229 case (
'PRECONDITIONER_DROP_TOLERANCE')
230 this%droptol = parser%GetDouble()
231 if (this%droptol < dzero)
then
232 write (errmsg,
'(a,1x,a)') &
233 'IMSLINEAR PRECONDITIONER_DROP_TOLERANCE', &
234 'must be greater than or equal to zero'
235 call store_error(errmsg)
240 write (errmsg,
'(3a)') &
241 'Unknown IMSLINEAR keyword (', trim(keyword),
').'
242 call store_error(errmsg)
245 write (iout,
'(1x,a)')
'END OF LINEAR DATA'
247 if (this%ifdparam == 0)
THEN
248 write (errmsg,
'(a)')
'NO LINEAR block detected.'
249 call store_error(errmsg)