Skip to content

Commit

Permalink
Document basis for input data (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
unalmis authored Jul 12, 2024
2 parents fc06523 + 1c6e191 commit ac10970
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
9 changes: 8 additions & 1 deletion desc/compute/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ def compute(parameterization, names, params, transforms, profiles, data=None, **
Profile objects for pressure, iota, current, etc. Defaults to attributes
of self
data : dict of ndarray
Data computed so far, generally output from other compute functions
Data computed so far, generally output from other compute functions.
Any vector v = v¹ R̂ + v² ϕ̂ + v³ Ẑ should be given in components
v = [v¹, v², v³] where R̂, ϕ̂, Ẑ are the normalized basis vectors
of the cylindrical coordinates R, ϕ, Z.
Returns
-------
Expand Down Expand Up @@ -121,6 +124,10 @@ def _compute(
):
"""Same as above but without checking inputs for faster recursion.
Any vector v = v¹ R̂ + v² ϕ̂ + v³ Ẑ should be given in components
v = [v¹, v², v³] where R̂, ϕ̂, Ẑ are the normalized basis vectors
of the cylindrical coordinates R, ϕ, Z.
We need to directly call this function in objectives, since the checks in above
function are not compatible with JIT. This function computes given names while
using recursion to compute dependencies. If you want to call this function, you
Expand Down
5 changes: 4 additions & 1 deletion desc/equilibrium/equilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,10 @@ def compute(
Profile objects for pressure, iota, current, etc. Defaults to attributes
of self
data : dict of ndarray
Data computed so far, generally output from other compute functions
Data computed so far, generally output from other compute functions.
Any vector v = v¹ R̂ + v² ϕ̂ + v³ Ẑ should be given in components
v = [v¹, v², v³] where R̂, ϕ̂, Ẑ are the normalized basis vectors
of the cylindrical coordinates R, ϕ, Z.
override_grid : bool
If True, override the user supplied grid if necessary and use a full
resolution grid to compute quantities and then downsample to user requested
Expand Down
5 changes: 4 additions & 1 deletion desc/geometry/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ def compute(
transforms : dict of Transform
Transforms for R, Z, lambda, etc. Default is to build from grid
data : dict of ndarray
Data computed so far, generally output from other compute functions
Data computed so far, generally output from other compute functions.
Any vector v = v¹ R̂ + v² ϕ̂ + v³ Ẑ should be given in components
v = [v¹, v², v³] where R̂, ϕ̂, Ẑ are the normalized basis vectors
of the cylindrical coordinates R, ϕ, Z.
override_grid : bool
If True, override the user supplied grid if necessary and use a full
resolution grid to compute quantities and then downsample to user requested
Expand Down
5 changes: 4 additions & 1 deletion desc/geometry/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,10 @@ def compute(
transforms : dict of Transform
Transforms for R, Z, lambda, etc. Default is to build from grid
data : dict of ndarray
Data computed so far, generally output from other compute functions
Data computed so far, generally output from other compute functions.
Any vector v = v¹ R̂ + v² ϕ̂ + v³ Ẑ should be given in components
v = [v¹, v², v³] where R̂, ϕ̂, Ẑ are the normalized basis vectors
of the cylindrical coordinates R, ϕ, Z.
override_grid : bool
If True, override the user supplied grid if necessary and use a full
resolution grid to compute quantities and then downsample to user requested
Expand Down

0 comments on commit ac10970

Please sign in to comment.