parameters: (t, ts, tr)
docstring: Implementation of the regularized Yoffe function
      defined in Appendix of Tinti et al. (2005), https://doi.org/10.1785/0120040177
docstring_summary: Implementation of the regularized Yoffe function
      defined in Appendix of Tinti et al. (2005), https://doi.org/10.1785/0120040177
docstring_tokens: Implementation of the regularized Yoffe function defined in Appendix of Tinti et al . ( 2005 ) https : // doi . org / 10 . 1785 / 0120040177
function: def regularizedYoffe(t, ts, tr):
      """
      Implementation of the regularized Yoffe function
      defined in Appendix of Tinti et al. (2005), https://doi.org/10.1785/0120040177
      """
      assert ts <= tr, f"ts:{ts} > tr:{tr}"
      K = 2.0 / (pi * tr * ts * ts)
      if tr > 2.0 * ts:
          if t <= 0:
              return 0
          elif t <= ts:
              return K * (C1(t, ts, tr) + C2(t, ts, tr))
          elif t <= 2.0 * ts:
              return K * (C1(t, ts, tr) - C2(t, ts, tr) + C3(t, ts, tr))
          elif t < tr:
              return K * (C1(t, ts, tr) + C3(t, ts, tr) + C4(t, ts, tr))
          elif t < tr + ts:
              return K * (C3(t, ts, tr) + C4(t, ts, tr) + C5(t, ts, tr))
          elif t < tr + 2.0 * ts:
              return K * (C4(t, ts, tr) + C6(t, ts, tr))
          else:
              return 0
      else:
          if t <= 0:
              return 0
          elif t <= ts:
              return K * (C1(t, ts, tr) + C2(t, ts, tr))
          elif t < tr:
              return K * (C1(t, ts, tr) - C2(t, ts, tr) + C3(t, ts, tr))
          elif t <= 2.0 * ts:
              return K * (C5(t, ts, tr) + C3(t, ts, tr) - C2(t, ts, tr))
          elif t < tr + ts:
              return K * (C3(t, ts, tr) + C4(t, ts, tr) + C5(t, ts, tr))
          elif t < tr + 2.0 * ts:
              return K * (C4(t, ts, tr) + C6(t, ts, tr))
          else:
              return 0
function_tokens: def regularizedYoffe ( t , ts , tr ) : assert ts <= tr , f"ts:{ts} > tr:{tr}" K = 2.0 / ( pi * tr * ts * ts ) if tr > 2.0 * ts : if t <= 0 : return 0 elif t <= ts : return K * ( C1 ( t , ts , tr ) + C2 ( t , ts , tr ) ) elif t <= 2.0 * ts : return K * ( C1 ( t , ts , tr ) - C2 ( t , ts , tr ) + C3 ( t , ts , tr ) ) elif t < tr : return K * ( C1 ( t , ts , tr ) + C3 ( t , ts , tr ) + C4 ( t , ts , tr ) ) elif t < tr + ts : return K * ( C3 ( t , ts , tr ) + C4 ( t , ts , tr ) + C5 ( t , ts , tr ) ) elif t < tr + 2.0 * ts : return K * ( C4 ( t , ts , tr ) + C6 ( t , ts , tr ) ) else : return 0 else : if t <= 0 : return 0 elif t <= ts : return K * ( C1 ( t , ts , tr ) + C2 ( t , ts , tr ) ) elif t < tr : return K * ( C1 ( t , ts , tr ) - C2 ( t , ts , tr ) + C3 ( t , ts , tr ) ) elif t <= 2.0 * ts : return K * ( C5 ( t , ts , tr ) + C3 ( t , ts , tr ) - C2 ( t , ts , tr ) ) elif t < tr + ts : return K * ( C3 ( t , ts , tr ) + C4 ( t , ts , tr ) + C5 ( t , ts , tr ) ) elif t < tr + 2.0 * ts : return K * ( C4 ( t , ts , tr ) + C6 ( t , ts , tr ) ) else : return 0