@@ -23,18 +23,19 @@ if (_ntokens GREATER 1)
23
23
set (_max_am 0)
24
24
math (EXPR _max_deriv "${_ntokens} - 1" )
25
25
foreach (_d RANGE 0 ${_max_deriv} )
26
- list (GET WITH_MAX_AM ${_d} _candidate0_d ${_d} )
27
- if (${_candidate0_d ${_d} } GREATER _max_am)
28
- set (_max_am ${_candidate0_d ${_d} })
26
+ list (GET WITH_MAX_AM ${_d} _max_am_default_d ${_d} )
27
+ if (${_max_am_default_d ${_d} } GREATER _max_am)
28
+ set (_max_am ${_max_am_default_d ${_d} })
29
29
endif ()
30
30
endforeach ()
31
31
32
32
list (JOIN WITH_MAX_AM "," _sam)
33
33
set (LIBINT_MAX_AM_LIST ${_sam} )
34
34
set (LIBINT_MAX_AM ${_max_am} ) # only overall LIBINT, not specific integrals classes, sets both MAX_AM & MAX_AM_LIST
35
+ set (_max_LIBINT_MAX_AM ${LIBINT_MAX_AM} )
35
36
else ()
36
37
set (_given_max_am_list FALSE )
37
- set (_candidate0_d0 ${WITH_MAX_AM} )
38
+ set (_max_am_default ${WITH_MAX_AM} )
38
39
39
40
set (LIBINT_MAX_AM_LIST "" )
40
41
set (LIBINT_MAX_AM ${WITH_MAX_AM} )
@@ -81,6 +82,7 @@ if (_ntokens GREATER 1)
81
82
else ()
82
83
set (LIBINT_OPT_AM_LIST "" )
83
84
message (STATUS "WITH_OPT_AM=${WITH_OPT_AM} " )
85
+ message (STATUS "_max_LIBINT_MAX_AM=${_max_LIBINT_MAX_AM} " )
84
86
if (WITH_OPT_AM EQUAL -1)
85
87
math (EXPR LIBINT_OPT_AM "${_max_LIBINT_MAX_AM} /2 + 1" )
86
88
#math(EXPR LIBINT_OPT_AM "${_max_LIBINT_MAX_AM}/2 + ${_max_LIBINT_MAX_AM}%2")
@@ -100,7 +102,6 @@ message(STATUS "LIBINT_OPT_AM_LIST=${LIBINT_OPT_AM_LIST} LIBINT_OPT_AM=${LIBINT_
100
102
macro (process_integrals_class class)
101
103
if (ENABLE_${class} GREATER_EQUAL 0)
102
104
set (INCLUDE_${class} ${ENABLE_${class} })
103
- set (_candidate0_${class} _d${INCLUDE_${class} } ${_candidate0_d${INCLUDE_${class} }})
104
105
set (LIBINT_SUPPORTS_${class} yes )
105
106
set (LIBINT_${class} _DERIV ${INCLUDE_${class} })
106
107
message (STATUS "Enabling integrals class ${class} to derivative ${INCLUDE_${class} }" )
@@ -116,7 +117,7 @@ macro(process_integrals_class class)
116
117
if (_ntokens GREATER 1)
117
118
math (EXPR _max_deriv "${_ntokens} - 1" )
118
119
foreach (_d RANGE 0 ${_max_deriv} )
119
- list (GET WITH_${class} _MAX_AM _d _candidate_ ${class} _d${_d} )
120
+ list (GET WITH_${class} _MAX_AM _d _max_am_ ${class} _d${_d} )
120
121
endforeach ()
121
122
122
123
list (JOIN WITH_${class} _MAX_AM "," _sam)
@@ -126,21 +127,13 @@ macro(process_integrals_class class)
126
127
set (${class} _MAX_AM_LIST "" )
127
128
if (WITH_${class} _MAX_AM EQUAL -1)
128
129
129
- set (_candidate_${class} _E ${_candidate0_${class} _E})
130
- if (${INCLUDE_${class} } GREATER_EQUAL 1)
131
- if (${_candidate0_${class} _G} EQUAL -1)
132
- set (_candidate_${class} _G ${_candidate0_${class} _E})
130
+ foreach (_d RANGE 0 ${INCLUDE_${class} })
131
+ if (DEFINED _max_am_default_d${_d} )
132
+ set (_candidate_max_am_${class} _d${_d} ${_max_am_default_d${_d} })
133
133
else ()
134
- set (_candidate_ ${class} _G ${_candidate0_ ${class} _G })
134
+ set (_candidate_max_am_ ${class} _d ${_d} ${_max_am_default } )
135
135
endif ()
136
- endif ()
137
- if (${INCLUDE_${class} } GREATER_EQUAL 2)
138
- if (${_candidate0_${class} _H} EQUAL -1)
139
- set (_candidate_${class} _H ${_candidate0_${class} _E})
140
- else ()
141
- set (_candidate_${class} _H ${_candidate0_${class} _H})
142
- endif ()
143
- endif ()
136
+ endforeach ()
144
137
145
138
if (${INCLUDE_${class} } GREATER_EQUAL 0)
146
139
set (${class} _MAX_AM ${LIBINT_MAX_AM} )
@@ -211,7 +204,7 @@ foreach(_cls ERI2;ERI3;ERI4)
211
204
set (_lbl "${_lbl} _" )
212
205
213
206
foreach (_deriv RANGE 0 ${INCLUDE_${_cls} })
214
- foreach (_l RANGE 0 ${_candidate_ ${_cls} _d${_deriv} })
207
+ foreach (_l RANGE 0 ${_max_am_ ${_cls} _d${_deriv} })
215
208
list (APPEND Libint2_ERI_COMPONENTS "${_lbl} _d${_deriv} _l${_l} " )
216
209
endforeach ()
217
210
endforeach ()
0 commit comments