54 template <
typename OrdinalType,
typename ValueType>
73 template <
typename ordinal_type>
106 while (node_stack.size() > 0) {
107 node = node_stack.back();
108 child_index = index_stack.
back();
112 if (node->children.size() > 0) {
113 block_size_expected = 0;
115 block_size_expected += node->children[i]->block_size;
118 block_size_expected = node->terms.size();
128 sum_prev += term_prefix[i];
138 if (child_index < node->terms.size() && node->children.size() > 0)
139 out << node->terms[child_index] <<
" : block_size = "
140 << node->children[child_index]->block_size << std::endl;
143 if (node->children.size() == 0) {
151 out << term <<
" : index = " << index
152 <<
" index expected = " << index_expected << std::endl;
155 node_stack.pop_back();
160 else if (child_index < node->children.size()) {
161 ++index_stack.
back();
162 node = node->children[child_index];
163 node_stack.push_back(node);
169 node_stack.pop_back();
177 template <
typename ordinal_type,
typename value_type>
181 const bool symmetric,
217 typedef typename Cijk_LTB_type::CijkNode
node_type;
222 node_stack.
push_back(Cijk_LTB->getHeadNode());
226 while (node_stack.
size() > 0) {
227 node = node_stack.
back();
228 child_index = index_stack.
back();
234 Cijk_Iterator cijk_iterator(node->p_i, node->p_j, node->p_k, symmetric);
249 <<
"Check: rel_err( C(" << I <<
"," << J <<
"," << K <<
") )"
250 <<
" = " <<
"rel_err( " <<
cijk <<
", " << cijk2 <<
" ) = "
251 << err <<
" <= " << tol <<
" : ";
252 if (s) out <<
"Passed.";
257 success = success && s;
258 more = cijk_iterator.increment();
267 else if (child_index < node->children.size()) {
268 ++index_stack.
back();
269 node = node->children[child_index];
285 template <
typename ordinal_type,
typename value_type>
289 const bool symmetric,
321 typedef typename Cijk_LTB_type::CijkNode
node_type;
325 node_stack.
push_back(Cijk_LTB->getHeadNode());
329 while (node_stack.
size() > 0) {
330 node = node_stack.
back();
331 child_index = index_stack.
back();
347 if (symmetric && (k0%2 != (i+
j)%2)) ++k0;
355 if (J == K)
cijk *= 2.0;
363 <<
"Check: rel_err( C(" << I <<
"," << J <<
","
365 <<
" = " <<
"rel_err( " <<
cijk <<
", " << cijk2 <<
" ) = "
366 << err <<
" <= " << tol <<
" : ";
367 if (s) out <<
"Passed.";
372 success = success && s;
377 bool s2 = err2 < tol2;
380 <<
"Check: rel_err( C(" << I <<
"," << J <<
","
382 <<
" = " <<
"rel_err( " <<
cijk <<
", " << cijk3 <<
" ) = "
383 << err <<
" <= " << tol <<
" : ";
384 if (s2) out <<
"Passed.";
389 success = success && s2;
399 else if (child_index < node->children.size()) {
400 ++index_stack.
back();
401 node = node->children[child_index];
417 template <
typename ordinal_type,
typename value_type>
421 const bool symmetric,
464 x(basis), a(basis), b(basis), c1(basis), c2(basis);
475 Stokhos::flatLTB3TensorMultiply<10>(c2, a, b, *flat_Cijk);
491 basis_orders[i] = i+1;
505 basis_orders[i] = i+1;
521 basis_orders[i] = i+1;
551 basis_orders[i] = i+1;
560 basis_orders[i] = i+1;