Trevor Irons 7 years ago
parent
commit
a16596c230
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      src/Coupling.cpp
  2. 2
    2
      src/KernelV0.cpp

+ 2
- 2
src/Coupling.cpp View File

@@ -320,7 +320,7 @@ namespace Lemma {
320 320
 
321 321
         Complex ksum = kvals.sum();     // Kernel sum
322 322
         // Evaluate whether or not furthur splitting is needed
323
-        if ( std::abs(ksum-parentVal) > tol || level < minLevel && level < maxLevel ) {
323
+        if ( (std::abs(ksum-parentVal) > tol && level < maxLevel) || level < minLevel ) {
324 324
             // Not a leaf dive further in
325 325
             for (int ichild=0; ichild<8; ++ichild) {
326 326
                 Vector3r cp = pos; // Eigen complains about combining these
@@ -400,7 +400,7 @@ namespace Lemma {
400 400
 
401 401
         Complex ksum = kvals.sum();     // Kernel sum
402 402
         // Evaluate whether or not furthur splitting is needed
403
-        if ( std::abs(ksum-parentVal) > tol || level < minLevel && level < maxLevel ) {
403
+        if ( (std::abs(ksum-parentVal) > tol && level < maxLevel) || level < minLevel ) {
404 404
             oct->SubdivideLeaf(curse);
405 405
             for (int ichild=0; ichild<8; ++ichild) {
406 406
                 curse->ToChild(ichild);

+ 2
- 2
src/KernelV0.cpp View File

@@ -400,7 +400,7 @@ namespace Lemma {
400 400
 
401 401
         VectorXcr ksum = kvals.colwise().sum();     // Kernel sum
402 402
         // Evaluate whether or not furthur splitting is needed
403
-        if ( ((ksum - parentVal).array().abs() > tol).any() || level < minLevel && level < maxLevel ) {
403
+        if ( (((ksum - parentVal).array().abs() > tol).any() && level<maxLevel) || level < minLevel ) {
404 404
             // Not a leaf dive further in
405 405
             for (int ichild=0; ichild<8; ++ichild) {
406 406
                 Vector3r cp = pos; // Eigen complains about combining these
@@ -480,7 +480,7 @@ namespace Lemma {
480 480
 
481 481
         VectorXcr ksum = kvals.colwise().sum();     // Kernel sum
482 482
         // Evaluate whether or not furthur splitting is needed
483
-        if ( ((ksum - parentVal).array().abs() > tol).any() || level < minLevel && level < maxLevel ) {
483
+        if ( (((ksum - parentVal).array().abs() > tol).any() && level<maxLevel) || level < minLevel ) {
484 484
             oct->SubdivideLeaf(curse);
485 485
             for (int ichild=0; ichild<8; ++ichild) {
486 486
                 curse->ToChild(ichild);

Loading…
Cancel
Save