37 use Logfile_interface,
ONLY : Logfile_stamp
44 character(len
=*),
intent(in) :: name
45 real,
intent(in) :: value
46 logical,
intent(in) :: current_val
49 character(
len=MAX_STRING_LENGTH) :: buf
50 character(
len=300) :: logStr
51 character(
len=80) :: initValueStr, valueStr
56 if (
associated(node))
then
57 if (
.NOT. node
%isConstant)
then
61 write (buf,
'(F8.3)') value
62 call Driver_abort(
"nameValue_set: Trying to set '"// trim(name)
//"' to invalid value "// trim(buf))
67 node
%initValue
= value
69 else if (current_val
.AND. (node
%value
.EQ.value))
then
71 else if (
.NOT. current_val)
then
72 if(node
%initValue
.NE.value)
then
73 write(initValueStr,
'(es20.13)') node
%initValue
74 write(valueStr,
'(es20.13)') value
75 write(logStr,
"(a,a,a,a)")
&
76 'current=',
trim(
adjustl(initValueStr)),
&
77 ', new(checkpoint)=',
trim(
adjustl(valueStr))
78 call Logfile_stamp(logStr,
&
79 '[nameValueLL_set] Different previous value for '//trim(name))
80 node
%initValue
= value
83 write(
*,
*)
"set : Can not change parameter with constant attribute:", name
84 call Driver_abort(
'ERROR: unable to change constant parameter')
105 use Logfile_interface,
ONLY : Logfile_stamp
107#include "constants.h"
112 character(len
=*),
intent(in) :: name
113 integer,
intent(in) :: value
114 logical,
intent(in) :: current_val
117 character(
len=MAX_STRING_LENGTH) :: buf
118 character(
len=300) :: logStr
119 character(
len=80) :: initValueStr, valueStr
123 if (
associated(node))
then
124 if (
.NOT. node
%isConstant)
then
126 if (
.not. valid)
then
128 write (buf,
'(I12)') value
129 call Driver_abort(
"Trying to set '"// trim(name)
// "' to invalid value " // trim(buf))
131 if (current_val)
then
134 node
%initValue
= value
136 else if (current_val
.AND. (node
%value
.EQ.value))
then
138 else if (
.NOT. current_val)
then
139 if(node
%initValue
.NE.value)
then
140 write(initValueStr,
'(i12)') node
%initValue
141 write(valueStr,
'(i12)') value
142 write(logStr,
"(a,a,a,a)")
&
143 'current=',
trim(
adjustl(initValueStr)),
&
144 ', new(checkpoint)=',
trim(
adjustl(valueStr))
145 call Logfile_stamp(logStr,
&
146 '[nameValueLL_set] Different previous value for '//trim(name))
147 node
%initValue
= value
150 write(
*,
*)
"set : Can not change name with constant attribute:", name
151 call Driver_abort(
'ERROR: unable to change constant name')
172 use Logfile_interface,
ONLY : Logfile_stamp
174#include "constants.h"
179 character(len
=*),
intent(in) :: name, value
180 logical,
intent(in) :: current_val
183 character(
len=300) :: logStr
187 if (
associated(node))
then
188 if (
.NOT. node
%isConstant)
then
190 if (
.not. valid)
then
192 call Driver_abort(
"nameValue_set: Trying to set '"// trim(name)
// "' to invalid value '"// trim(value)
//"'")
194 if (current_val)
then
197 node
%initValue
= value
199 else if (current_val
.AND. (node
%value
.EQ.value))
then
201 else if (
.NOT. current_val)
then
202 if(node
%initValue
.NE.value)
then
203 write(logStr,
"(a,a,a,a)")
&
204 'current=',
trim(
adjustl(node
%initValue)),
&
205 ', new(checkpoint)=',
trim(
adjustl(value))
206 call Logfile_stamp(logStr,
&
207 '[nameValueLL_set] Different previous value for '//trim(name))
208 node
%initValue
= value
211 write(
*,
*)
"set : Can not change name with constant attribute:", name
212 call Driver_abort(
'ERROR: unable to change constant name')
235 use Logfile_interface,
ONLY : Logfile_stamp
237#include "constants.h"
241 character(len
=*),
intent(in) :: name
242 logical,
intent(in) :: value
243 logical,
intent(in) :: current_val
245 character(
len=300) :: logStr
246 character(
len=80) :: initValueStr, valueStr
250 if (
associated(node))
then
251 if (
.NOT. node
%isConstant)
then
252 if (current_val)
then
255 node
%initValue
= value
257 else if (current_val
.AND. (node
%value
.EQV.value))
then
259 else if (
.NOT. current_val)
then
260 if(node
%initValue
.NEQV.value)
then
261 write(initValueStr,
'(l12)') node
%initValue
262 write(valueStr,
'(l12)') value
263 write(logStr,
"(a,a,a,a)")
&
264 'current=',
trim(
adjustl(initValueStr)),
&
265 ', new(checkpoint)=',
trim(
adjustl(valueStr))
266 call Logfile_stamp(logStr,
&
267 '[nameValueLL_set] Different previous value for '//trim(name))
268 node
%initValue
= value
271 write(
*,
*)
"set: Can not change name with constant attribute:", name
272 call Driver_abort(
'ERROR: unable to change constant name')
subroutine nameValueLL_logRulesReal(name, numValues, minValues, maxValues)
subroutine nameValueLL_logRulesInt(name, numValues, minValues, maxValues)
subroutine nameValueLL_logRulesStr(name, numValues, validValues)
subroutine nameValueLL_setInt(context, name, value, current_val)
subroutine nameValueLL_setReal(context, name, value, current_val)
subroutine nameValueLL_setStr(context, name, value, current_val)
subroutine nameValueLL_setLog(context, name, value, current_val)
subroutine nameValueLL_addReal(context, name, value, state)
integer, parameter TYPE_VAR
subroutine nameValueLL_addLog(context, name, value, state)
subroutine nameValueLL_addStr(context, name, value, state)
subroutine nameValueLL_addInt(context, name, value, state)