espressopp/espressopp

View on GitHub
src/tools/loadbal.py

Summary

Maintainability
F
2 wks
Test Coverage

Function reDistCells has a Cognitive Complexity of 136 (exceeds 5 allowed). Consider refactoring.
Open

def reDistCells(halfNeilListX, cellsX, eh_size, rc_skin, node_gridX, ratioMS, sizeX, idealGas, halfCellInt = 1):
    #global preFactCen
    preFactCen = 1.0
    print("HeSpaDDA message: Cells redistribution will improve whenever the Cells1D are at least twice as big as Nodes1D!")
    wholeNeiListX = []
Severity: Minor
Found in src/tools/loadbal.py - About 2 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function findNodesMS has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
Open

def findNodesMS(node_gridX, totCellsEH, totCellsCG, ratioMS, sizeX, eh_size, idealGas, procsWEH=1.):
    fRatioEH = pow(ratioMS, 1. / 3.) * (2.0 * eh_size / (1.0 * (sizeX) + 2.0 * eh_size * (pow(ratioMS, 1. / 3.) - 1.)))  # Seems to be wo Bu!
    # pow(ratioMS,1./3.)*(1.0*totCellsEH/(1.0*(totCellsCG+totCellsEH)+totCellsEH*(pow(ratioMS,1./3.)-1.)))
    # fRatioCG=(1./1.)*(1.0*totCellsCG/(1.0*(totCellsCG+totCellsEH)))
    if idealGas:
Severity: Minor
Found in src/tools/loadbal.py - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File loadbal.py has 465 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#  Copyright (C) 2020(H)
#      Jozef Stefan Institute
#      Max Planck Institute for Polymer Research
#  Copyright (C) 2013,2017,2018(H)
#      Max Planck Institute for Polymer Research
Severity: Minor
Found in src/tools/loadbal.py - About 7 hrs to fix

    Function redistDeltaRandomly has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    def redistDeltaRandomly(wholeNeiListX, deltaCells, totNodesEH=0, biased=0):
        flagBiased = 0
        wholeNeiListXcopy = wholeNeiListX[:]
        index = len(wholeNeiListX) - 1
        indexOut = [0] * int(deltaCells)
    Severity: Minor
    Found in src/tools/loadbal.py - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function addHsymmetry has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def addHsymmetry(halfNeilListX, eh_size, rc_skin, node_gridX, cellsX, ratioMS, sizeX, idealGas, halfCellInt = 1):
        wholeNeilListX = []
        aux = halfNeilListX[:]
        # unfolds halfDecomp and attempts to match the whole neighbor list.
        aux.reverse()
    Severity: Minor
    Found in src/tools/loadbal.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function halfDecomp has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    def halfDecomp(adrCenter1D, rc_skin, eh_size, halfCores1D, cellsX, ratioMS, sizeX, idealGas, halfCellInt = 1):
        # this value is only in case the Ideal Gas will in reality improve any calculation or communication (i.e. Improve notoriously the sims parallelization, which is not the case yet)
        pLoadIG = 1
        cellSizes = []
        usedCores = 0
    Severity: Minor
    Found in src/tools/loadbal.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function fullDecomp has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    def fullDecomp(adrCenter1D,rc_skin,eh_size,fullCores1D,cellsX,ratioMS,sizeX,idealGas):
        pLoadIG=1   # this value is only in case the Ideal Gas will in reality improve any calculation or communication (i.e. Improve notoriously the sims parallelization, which is not the case yet)
        cellSizes=[]
        usedCores=0
        totCellsEH=round(2.*eh_size/rc_skin-0.5)
    Severity: Minor
    Found in src/tools/loadbal.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function reDistCellsHom has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def reDistCellsHom(node_gridX, sizeX, rc_skin, halfCellInt = 1):
        wholeNeiListX = []
        cellsX = halfCellInt * int(round(sizeX / rc_skin - 0.5))
        if node_gridX % 2 == 0 and cellsX % 2 == 0:
            [wholeNeiListX.append(cellsX / node_gridX) for i in range(node_gridX)]
    Severity: Minor
    Found in src/tools/loadbal.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function addHsymmetry has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def addHsymmetry(halfNeilListX, eh_size, rc_skin, node_gridX, cellsX, ratioMS, sizeX, idealGas, halfCellInt = 1):
    Severity: Major
    Found in src/tools/loadbal.py - About 1 hr to fix

      Function halfDecomp has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def halfDecomp(adrCenter1D, rc_skin, eh_size, halfCores1D, cellsX, ratioMS, sizeX, idealGas, halfCellInt = 1):
      Severity: Major
      Found in src/tools/loadbal.py - About 1 hr to fix

        Function reDistCells has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def reDistCells(halfNeilListX, cellsX, eh_size, rc_skin, node_gridX, ratioMS, sizeX, idealGas, halfCellInt = 1):
        Severity: Major
        Found in src/tools/loadbal.py - About 1 hr to fix

          Function findNodesMS has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def findNodesMS(node_gridX, totCellsEH, totCellsCG, ratioMS, sizeX, eh_size, idealGas, procsWEH=1.):
          Severity: Major
          Found in src/tools/loadbal.py - About 1 hr to fix

            Function fullDecomp has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def fullDecomp(adrCenter1D,rc_skin,eh_size,fullCores1D,cellsX,ratioMS,sizeX,idealGas):
            Severity: Major
            Found in src/tools/loadbal.py - About 1 hr to fix

              Avoid deeply nested control flow statements.
              Open

                                  for i in range(int(ratioMS), int(cellsX + 1)):
                                      tempWNL = [0] * (node_gridX)
                                      ratioMS2t = round(1. * (cellsX / (1. * pow(i, 1. / 3.))) - 0.5)
                                      print("HeSpaDDA message indexing: the Ratio MS2Cellslot 'cells weight' in the CG region is:", ratioMS2t)
                                      for j in au1:  # This loop goes over the CG-regions
              Severity: Major
              Found in src/tools/loadbal.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    for i in au2:
                                        wholeNeiListX_CG[i] = round(1.0 * (totCellsCG - 1) / totNodesCG - 0.5)
                                    # Punishing the last Node with an additional cell  NHEW (got rid of -1 in the index)
                                    wholeNeiListX_CG[indEH1 + indCG1] = wholeNeiListX_CG[indEH1 + indCG1] + 1
                Severity: Major
                Found in src/tools/loadbal.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if totNodesCG == 1:
                                          totNodesEH = totNodesEH - 1
                                          totNodesCG = 2
                                      else:
                                          totNodesEH = totNodesEH - 2
                  Severity: Major
                  Found in src/tools/loadbal.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        for i in au2:
                                            wholeNeiListX_CG[i] = round(1.0 * (totCellsCG) / totNodesCG - 0.5)
                                    else:
                    Severity: Major
                    Found in src/tools/loadbal.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if cellsX > numRegBox * pow(ratioMS, 1. / 3.) and totNodesEH < cellsX - (pow(ratioMS, 1. / 3.) * totCellsCG):
                                              wholeNeiListX_CG[i] = round(pow(ratioMS, 1. / 3.) * totCellsCG / totNodesCG - 0.5)
                                              print("HeSpaDDA message LR: cells dist No IG if cells fit in 3 subregions...")
                                          else:
                                              ratioMS2 = round(pow(1. * (cellsX / (1. * preFactCen)), 1. / 3.) - 0.5)
                      Severity: Major
                      Found in src/tools/loadbal.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            for i in range(indCG1, indEH1):
                                                wholeNeiListX_EH[i] = round(1.0 * (totCellsEH - 1) / totNodesEH - 0.5)
                                            # Punishing the last Node with an additional cell
                                            wholeNeiListX[indEH1 - 1] = wholeNeiListX_EH[indEH1 - 1] + 1
                        Severity: Major
                        Found in src/tools/loadbal.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              for i in range(indCG1, indEH1):
                                                  wholeNeiListX_EH[i] = round(1.0 * totCellsEH / totNodesEH - 0.5)
                                          else:
                          Severity: Major
                          Found in src/tools/loadbal.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if diffNodesCells <= (totCellsCG - totNodesCG):
                                                    # more weight in terms of cores in the LR region
                                                    totNodesCG = totNodesCG + diffNodesCells
                                                    totNodesEH = totNodesEH - diffNodesCells
                                                else:
                            Severity: Major
                            Found in src/tools/loadbal.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if diffNodesCells <= (totCellsEH - totNodesEH):
                                                      totNodesCG = totNodesCG - diffNodesCells
                                                      # more weight in terms of cores in the HR region
                                                      totNodesEH = totNodesEH + diffNodesCells
                                                      if totNodesEH > totCellsEH:
                              Severity: Major
                              Found in src/tools/loadbal.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    for i in range(indCG1, indEH1):
                                                        wholeNeiListX_EH[i] = round(1.0 * (totCellsEH - 1) / totNodesEH - 0.5)
                                                    # Punishing the last Node with an additional cell
                                                    wholeNeiListX_EH[indEH1 - 1] = wholeNeiListX_EH[indEH1 - 1] + 1
                                Severity: Major
                                Found in src/tools/loadbal.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      for i in range(indCG1, indEH1):
                                                          wholeNeiListX_EH[i] = round(1.0 * totCellsEH / totNodesEH - 0.5)
                                                  elif totNodesEH % 2 != 0 and totCellsEH % 2 == 0:
                                  Severity: Major
                                  Found in src/tools/loadbal.py - About 45 mins to fix

                                    Function nodeGridSizeCheck has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def nodeGridSizeCheck(node_gridX, node_gridY, node_gridZ):
                                        flx = 0
                                        fly = 0
                                        flz = 0
                                        if node_gridX < 3:
                                    Severity: Minor
                                    Found in src/tools/loadbal.py - About 25 mins to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            elif totNodesEH % 2 != 0 and totCellsEH % 2 != 0:
                                                [wholeNeiListX_EH.append(round(totCellsEH / totNodesEH - 0.5)) for i in range(totNodesEH)]
                                                if int(totCellsEH - sum(wholeNeiListX_EH)) != 0:
                                                    wholeNeiListX_EH[0:totNodesEH] = redistDeltaRandomly(wholeNeiListX_EH[0:totNodesEH], totCellsEH - sum(wholeNeiListX_EH[0:totNodesEH]), 0)
                                                else:
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 day to fix
                                    src/tools/loadbal.py on lines 369..375

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 131.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            elif totNodesCG % 2 != 0 and totCellsCG % 2 != 0:
                                                [wholeNeiListX_CG.append(round(totCellsCG / totNodesCG - 0.5)) for i in range(totNodesCG)]
                                                if int(totCellsCG - sum(wholeNeiListX_CG)) != 0:
                                                    wholeNeiListX_CG[0:totNodesCG] = redistDeltaRandomly(wholeNeiListX_CG[0:totNodesCG], totCellsCG - sum(wholeNeiListX_CG[0:totNodesCG]), 0)
                                                else:
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 day to fix
                                    src/tools/loadbal.py on lines 347..353

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 131.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                elif totCellsEH % 2 == 0 and totNodesEH % 2 != 0:
                                                    [wholeNeiListX_EH.append(round((totCellsEH) / totNodesEH - 0.5)) for i in range(totNodesEH)]
                                                    # passing Delta cells to be redistributed semi-randomly (after prioritizying the EH-region, additional cells should go to the CG-region).
                                                    wholeNeiListX_EH[0:totNodesEH] = redistDeltaRandomly(wholeNeiListX_EH[0:totNodesEH], totCellsEH - sum(wholeNeiListX_EH[0:totNodesEH]), 0)
                                                    print("HeSpaDDA message IG: HR region: noP and C are EVEN")
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 5 hrs to fix
                                    src/tools/loadbal.py on lines 382..386

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 86.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                elif totCellsCG % 2 == 0 and totNodesCG % 2 == 0:
                                                    [wholeNeiListX_CG.append(round((totCellsCG) / totNodesCG - 0.5)) for i in range(totNodesCG)]
                                                    # passing Delta cells to be redistributed semi-randomly (after prioritizying the EH-region, additional cells may come to the CG-region).
                                                    wholeNeiListX_CG[0:totNodesCG] = redistDeltaRandomly(wholeNeiListX_CG[0:totNodesCG], totCellsCG - sum(wholeNeiListX_CG[0:totNodesCG]), 0)
                                                    print("HeSpaDDA message IG: LR region: noP and C are EVEN")
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 5 hrs to fix
                                    src/tools/loadbal.py on lines 359..363

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 86.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                if sum(halfNeilListX) != cellsX:
                                                    wholeNeilListX = reDistCells(halfNeilListX, cellsX, eh_size, rc_skin, node_gridX, ratioMS, sizeX, idealGas, halfCellInt)
                                                else:
                                                    if any([v == 0 for v in halfNeilListX]):  # Recently added 138, 139 and 140
                                                        wholeNeilListX = reDistCells(halfNeilListX, cellsX, eh_size, rc_skin, node_gridX, ratioMS, sizeX, idealGas, halfCellInt)
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 2 hrs to fix
                                    src/tools/loadbal.py on lines 270..279

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 52.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            if sum(halfNeilListX) != cellsX:
                                                print("HeSpaDDA message: The distributed cells are not matching the available ones")
                                                wholeNeilListX = reDistCells(halfNeilListX, cellsX, eh_size, rc_skin, node_gridX, ratioMS, sizeX, idealGas, halfCellInt)
                                            else:
                                                # Recently added 152, 153 and 154
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 2 hrs to fix
                                    src/tools/loadbal.py on lines 255..262

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 52.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                        for i in range(indCG1, indEH1):
                                                            wholeNeiListX_EH[i] = round(1.0 * (totCellsEH - 1) / totNodesEH - 0.5)
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 2 hrs to fix
                                    src/tools/loadbal.py on lines 461..462

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 50.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                        for i in range(indCG1, indEH1):
                                                            wholeNeiListX_EH[i] = round(1.0 * (totCellsEH - 1) / totNodesEH - 0.5)
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 2 hrs to fix
                                    src/tools/loadbal.py on lines 488..489

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 50.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                        if dIndMax > dIndMin:
                                            aux.pop(dIndMax)
                                            aux.pop(dIndMin)
                                        else:
                                            aux.pop(dIndMin)
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 129..134

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 47.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                        if indMax > indMin:
                                            listInd.pop(indMax)
                                            listInd.pop(indMin)
                                        else:
                                            listInd.pop(indMin)
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 136..141

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 47.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    if totNodesEH % 2 == 0 and totCellsEH >= totNodesEH:
                                                        for i in range(indCG1, indEH1):
                                                            wholeNeiListX_EH[i] = round(1.0 * totCellsEH / totNodesEH - 0.5)
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 484..486

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 44.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    if totNodesEH % 2 == 0:
                                                        for i in range(indCG1, indEH1):
                                                            wholeNeiListX_EH[i] = round(1.0 * totCellsEH / totNodesEH - 0.5)
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 457..459

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 44.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    for k in range(node_gridX):
                                                        wholeNeiListX[k] = wholeNeiListX_EH[k] + wholeNeiListX_CG[k]  # Superposing both Arrays
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 492..493

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 39.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    for k in range(node_gridX):
                                                        wholeNeiListX[k] = wholeNeiListX_EH[k] + wholeNeiListX_CG[k]
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 466..467

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 39.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                        neiListx.append(neiListxin[len(neiListxin) - 1] + neiListx[len(neiListx) - 1])
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 282..282

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 39.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            halfNeilListX[len(halfNeilListX) - 2] = halfNeilListX[len(halfNeilListX) - 1] + halfNeilListX[len(halfNeilListX) - 2]
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 1 other location - About 1 hr to fix
                                    src/tools/loadbal.py on lines 295..295

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 39.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 6 locations. Consider refactoring.
                                    Open

                                                        wholeNeiListX[indEH1 - 1] = wholeNeiListX_EH[indEH1 - 1] + 1
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 5 other locations - About 45 mins to fix
                                    src/tools/loadbal.py on lines 319..319
                                    src/tools/loadbal.py on lines 357..357
                                    src/tools/loadbal.py on lines 379..379
                                    src/tools/loadbal.py on lines 491..491
                                    src/tools/loadbal.py on lines 498..498

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 6 locations. Consider refactoring.
                                    Open

                                                    wholeNeiListX[node_gridX - 1] = wholeNeiListX[node_gridX - 1] + 1
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 5 other locations - About 45 mins to fix
                                    src/tools/loadbal.py on lines 319..319
                                    src/tools/loadbal.py on lines 357..357
                                    src/tools/loadbal.py on lines 379..379
                                    src/tools/loadbal.py on lines 464..464
                                    src/tools/loadbal.py on lines 491..491

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 6 locations. Consider refactoring.
                                    Open

                                                wholeNeiListX[node_gridX - 1] = wholeNeiListX[node_gridX - 1] + 1
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 5 other locations - About 45 mins to fix
                                    src/tools/loadbal.py on lines 357..357
                                    src/tools/loadbal.py on lines 379..379
                                    src/tools/loadbal.py on lines 464..464
                                    src/tools/loadbal.py on lines 491..491
                                    src/tools/loadbal.py on lines 498..498

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 6 locations. Consider refactoring.
                                    Open

                                                    wholeNeiListX_CG[totNodesCG - 1] = wholeNeiListX_CG[totNodesCG - 1] + 1
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 5 other locations - About 45 mins to fix
                                    src/tools/loadbal.py on lines 319..319
                                    src/tools/loadbal.py on lines 357..357
                                    src/tools/loadbal.py on lines 464..464
                                    src/tools/loadbal.py on lines 491..491
                                    src/tools/loadbal.py on lines 498..498

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 6 locations. Consider refactoring.
                                    Open

                                                        wholeNeiListX_EH[indEH1 - 1] = wholeNeiListX_EH[indEH1 - 1] + 1
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 5 other locations - About 45 mins to fix
                                    src/tools/loadbal.py on lines 319..319
                                    src/tools/loadbal.py on lines 357..357
                                    src/tools/loadbal.py on lines 379..379
                                    src/tools/loadbal.py on lines 464..464
                                    src/tools/loadbal.py on lines 498..498

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    [cellSizes.append(halfCellInt * round((eh_size) / rc_skin / (halfCores1D - usedCores) - 0.5)) for i in range(usedCores, halfCores1D)]  # 2do: SuperCell stuff
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 45 mins to fix
                                    src/tools/loadbal.py on lines 186..186

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    deltaCells = halfCellInt * round((eh_size) / rc_skin - 0.5) - halfCellInt * round((eh_size) / rc_skin / (halfCores1D - usedCores) - 0.5) * (halfCores1D - usedCores)  # 2do: SuperCell stuff
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 45 mins to fix
                                    src/tools/loadbal.py on lines 185..185

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    [cellSizes.append(round((2.*eh_size)/rc_skin/(fullCores1D-usedCores)-0.5)) for i in range(usedCores,fullCores1D)] #2do: SuperCell stuff
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 45 mins to fix
                                    src/tools/loadbal.py on lines 223..223

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 6 locations. Consider refactoring.
                                    Open

                                                    wholeNeiListX_EH[totNodesEH - 1] = wholeNeiListX_EH[totNodesEH - 1] + 1
                                    Severity: Major
                                    Found in src/tools/loadbal.py and 5 other locations - About 45 mins to fix
                                    src/tools/loadbal.py on lines 319..319
                                    src/tools/loadbal.py on lines 379..379
                                    src/tools/loadbal.py on lines 464..464
                                    src/tools/loadbal.py on lines 491..491
                                    src/tools/loadbal.py on lines 498..498

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                    deltaCells=round((2.*eh_size)/rc_skin-0.5)-round((2.*eh_size)/rc_skin/(fullCores1D-usedCores)-0.5)*(fullCores1D-usedCores)  #2do: SuperCell stuff
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 45 mins to fix
                                    src/tools/loadbal.py on lines 222..222

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 35.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            if totNodesEH % 2 == 0 and totCellsEH % 2 == 0:
                                                [wholeNeiListX_EH.append(totCellsEH / totNodesEH) for i in range(totNodesEH)]
                                                print("HeSpaDDA message IG: HR region: P and C are EVEN, given by:")
                                                print(wholeNeiListX_EH)
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 40 mins to fix
                                    src/tools/loadbal.py on lines 365..368

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 34.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            if totNodesCG % 2 == 0 and totCellsCG % 2 == 0:
                                                [wholeNeiListX_CG.append(totCellsCG / totNodesCG) for i in range(totNodesCG)]
                                                print("HeSpaDDA message IG: LR region: P and C are EVEN, given by:")
                                                print(wholeNeiListX_CG)
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 40 mins to fix
                                    src/tools/loadbal.py on lines 342..345

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 34.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                        totCellsEH = halfCellInt * round(2. * eh_size / rc_skin - 0.5)
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 35 mins to fix
                                    src/tools/loadbal.py on lines 174..174

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 33.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 3 locations. Consider refactoring.
                                    Open

                                                [wholeNeiListX.append((cellsX - 1) / node_gridX) for i in range(node_gridX)]
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 2 other locations - About 35 mins to fix
                                    src/tools/loadbal.py on lines 356..356
                                    src/tools/loadbal.py on lines 378..378

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 33.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                        totCellsEH = halfCellInt * round(2. * eh_size / rc_skin - 0.5)
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 1 other location - About 35 mins to fix
                                    src/tools/loadbal.py on lines 333..333

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 33.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 3 locations. Consider refactoring.
                                    Open

                                                    [wholeNeiListX_CG.append((totCellsCG - 1) / totNodesCG) for i in range(totNodesCG)]
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 2 other locations - About 35 mins to fix
                                    src/tools/loadbal.py on lines 317..317
                                    src/tools/loadbal.py on lines 356..356

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 33.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 3 locations. Consider refactoring.
                                    Open

                                                    [wholeNeiListX_EH.append((totCellsEH - 1) / totNodesEH) for i in range(totNodesEH)]
                                    Severity: Minor
                                    Found in src/tools/loadbal.py and 2 other locations - About 35 mins to fix
                                    src/tools/loadbal.py on lines 317..317
                                    src/tools/loadbal.py on lines 378..378

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 33.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    There are no issues that match your filters.

                                    Category
                                    Status