Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-1568

Speed up Heun integrators

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      The Heun integrators make 2 identical calls to dfun.
      Replacing HeuDeterministic.scheme with the code below decreases the execution time by approx. 25%.
      In the default simulation the reduction is about 14%.

      dxn = dfun(X, coupling, local_coupling)
      inter = X + self.dt * (dxn + stimulus)

      dX = (dxn + dfun(inter, coupling, local_coupling)) * self.dt / 2.0

      return X + dX + self.dt * stimulus

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              mihai.andrei Mihai Andrei
              Reporter:
              mihai.andrei Mihai Andrei
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours
                  6h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours Time Not Required
                  5h