Skip to content

Commit

Permalink
address some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dpanici committed Sep 12, 2024
1 parent 15a7f48 commit ea74b24
Show file tree
Hide file tree
Showing 15 changed files with 201 additions and 215 deletions.
8 changes: 4 additions & 4 deletions desc/objectives/_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ class BootstrapRedlConsistency(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
"""
Expand Down
72 changes: 36 additions & 36 deletions desc/objectives/_coils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ class _CoilObjective(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -271,15 +271,15 @@ class CoilLength(_CoilObjective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -411,15 +411,15 @@ class CoilCurvature(_CoilObjective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -546,15 +546,15 @@ class CoilTorsion(_CoilObjective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -681,15 +681,15 @@ class CoilCurrentLength(CoilLength):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -824,15 +824,15 @@ class CoilSetMinDistance(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -1013,15 +1013,15 @@ class PlasmaCoilSetMinDistance(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -1258,15 +1258,15 @@ class QuadraticFlux(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
"""
Expand Down Expand Up @@ -1482,15 +1482,15 @@ class ToroidalFlux(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down
48 changes: 24 additions & 24 deletions desc/objectives/_equilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ class ForceBalance(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
"""
Expand Down Expand Up @@ -251,15 +251,15 @@ class ForceBalanceAnisotropic(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -424,15 +424,15 @@ class RadialForceBalance(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -597,15 +597,15 @@ class HelicalForceBalance(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -768,15 +768,15 @@ class Energy(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down Expand Up @@ -950,15 +950,15 @@ class CurrentDensity(_Objective):
Name of the objective function.
jac_chunk_size : int, optional
Will calculate the Jacobian for this objective ``jac_chunk_size``
columns at a time, instead of all at once. The memory usage of the
columns at a time, instead of all at once. The memory usage of the
Jacobian calculation is roughly ``memory usage = m0 + m1*jac_chunk_size``:
the higher the chunk size, the less memory the Jacobian calculation
the smaller the chunk size, the less memory the Jacobian calculation
will require (with some baseline memory usage). The time to compute the
Jacobian is roughly ``t=t0 +t1/jac_chunk_size``, so the larger the
``jac_chunk_size``, the faster the calculation takes, at the cost of
requiring more memory. A ``jac_chunk_size`` of 1 corresponds to the least
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to the largest possible
memory intensive, but slowest method of calculating the Jacobian.
If None, it will default to a conservative default
`jac_chunk_size` i.e. ``np.ceil(dim_x/4)``
Expand Down
Loading

0 comments on commit ea74b24

Please sign in to comment.