Trevor Irons 8 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
 
320
 
321
         Complex ksum = kvals.sum();     // Kernel sum
321
         Complex ksum = kvals.sum();     // Kernel sum
322
         // Evaluate whether or not furthur splitting is needed
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
             // Not a leaf dive further in
324
             // Not a leaf dive further in
325
             for (int ichild=0; ichild<8; ++ichild) {
325
             for (int ichild=0; ichild<8; ++ichild) {
326
                 Vector3r cp = pos; // Eigen complains about combining these
326
                 Vector3r cp = pos; // Eigen complains about combining these
400
 
400
 
401
         Complex ksum = kvals.sum();     // Kernel sum
401
         Complex ksum = kvals.sum();     // Kernel sum
402
         // Evaluate whether or not furthur splitting is needed
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
             oct->SubdivideLeaf(curse);
404
             oct->SubdivideLeaf(curse);
405
             for (int ichild=0; ichild<8; ++ichild) {
405
             for (int ichild=0; ichild<8; ++ichild) {
406
                 curse->ToChild(ichild);
406
                 curse->ToChild(ichild);

+ 2
- 2
src/KernelV0.cpp View File

400
 
400
 
401
         VectorXcr ksum = kvals.colwise().sum();     // Kernel sum
401
         VectorXcr ksum = kvals.colwise().sum();     // Kernel sum
402
         // Evaluate whether or not furthur splitting is needed
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
             // Not a leaf dive further in
404
             // Not a leaf dive further in
405
             for (int ichild=0; ichild<8; ++ichild) {
405
             for (int ichild=0; ichild<8; ++ichild) {
406
                 Vector3r cp = pos; // Eigen complains about combining these
406
                 Vector3r cp = pos; // Eigen complains about combining these
480
 
480
 
481
         VectorXcr ksum = kvals.colwise().sum();     // Kernel sum
481
         VectorXcr ksum = kvals.colwise().sum();     // Kernel sum
482
         // Evaluate whether or not furthur splitting is needed
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
             oct->SubdivideLeaf(curse);
484
             oct->SubdivideLeaf(curse);
485
             for (int ichild=0; ichild<8; ++ichild) {
485
             for (int ichild=0; ichild<8; ++ichild) {
486
                 curse->ToChild(ichild);
486
                 curse->ToChild(ichild);

Loading…
Cancel
Save