121 class(ImsLinearSettingsType) :: this
122 type(BlockParserType) :: parser
125 logical(LGP) :: block_found, end_of_block
127 character(len=LINELENGTH) :: errmsg
128 character(len=LINELENGTH) :: warnmsg
129 character(len=LINELENGTH) :: keyword
130 integer(I4B) :: iscaling, iordering
132 call parser%GetBlock(
'LINEAR', block_found, ierr, supportopenclose=.true., &
133 blockrequired=.false.)
135 if (block_found)
then
136 write (iout,
'(/1x,a)')
'PROCESSING LINEAR DATA'
138 call parser%GetNextLine(end_of_block)
139 if (end_of_block)
exit
140 call parser%GetStringCaps(keyword)
142 select case (keyword)
143 case (
'INNER_DVCLOSE')
144 this%dvclose = parser%GetDouble()
145 case (
'INNER_RCLOSE')
146 this%rclose = parser%GetDouble()
148 call parser%GetStringCaps(keyword)
149 if (keyword ==
'STRICT')
then
151 else if (keyword ==
'L2NORM_RCLOSE')
then
153 else if (keyword ==
'RELATIVE_RCLOSE')
then
155 else if (keyword ==
'L2NORM_RELATIVE_RCLOSE')
then
158 case (
'INNER_MAXIMUM')
159 this%iter1 = parser%GetInteger()
160 case (
'LINEAR_ACCELERATION')
161 call parser%GetStringCaps(keyword)
162 if (keyword .eq.
'CG')
then
164 else if (keyword .eq.
'BICGSTAB')
then
168 write (errmsg,
'(3a)') &
169 'Unknown IMSLINEAR LINEAR_ACCELERATION method (', &
171 call store_error(errmsg)
173 case (
'SCALING_METHOD')
174 call parser%GetStringCaps(keyword)
176 if (keyword .eq.
'NONE')
then
178 else if (keyword .eq.
'DIAGONAL')
then
180 else if (keyword .eq.
'L2NORM')
then
183 write (errmsg,
'(3a)') &
184 'Unknown IMSLINEAR SCALING_METHOD (', trim(keyword),
').'
185 call store_error(errmsg)
188 case (
'RED_BLACK_ORDERING')
190 case (
'REORDERING_METHOD')
191 call parser%GetStringCaps(keyword)
193 if (keyword ==
'NONE')
then
195 else if (keyword ==
'RCM')
then
197 else if (keyword ==
'MD')
then
200 write (errmsg,
'(3a)') &
201 'Unknown IMSLINEAR REORDERING_METHOD (', trim(keyword),
').'
202 call store_error(errmsg)
204 this%iord = iordering
205 case (
'NUMBER_ORTHOGONALIZATIONS')
206 this%north = parser%GetInteger()
207 case (
'RELAXATION_FACTOR')
208 this%relax = parser%GetDouble()
209 case (
'PRECONDITIONER_LEVELS')
210 this%level = parser%GetInteger()
211 if (this%level < 0)
then
212 write (errmsg,
'(a,1x,a)') &
213 'IMSLINEAR PRECONDITIONER_LEVELS must be greater than', &
215 call store_error(errmsg)
217 case (
'PRECONDITIONER_DROP_TOLERANCE')
218 this%droptol = parser%GetDouble()
219 if (this%droptol < dzero)
then
220 write (errmsg,
'(a,1x,a)') &
221 'IMSLINEAR PRECONDITIONER_DROP_TOLERANCE', &
222 'must be greater than or equal to zero'
223 call store_error(errmsg)
227 case (
'INNER_HCLOSE')
228 this%dvclose = parser%GetDouble()
231 write (warnmsg,
'(a)') &
232 'SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE'
235 call deprecation_warning(
'LINEAR',
'INNER_HCLOSE',
'6.1.1', &
236 warnmsg, parser%GetUnit())
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)