Return cgs mass or radius at coordinate index ic of model i.
ic is 1-based KEPLER coordinate index, clamped to 1..ncoord.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | i |
Model index; coordinate index. |
||
| integer(kind=int32), | intent(in) | :: | ic |
Model index; coordinate index. |
pure function coord_at(i, ic) result(c) !! Return cgs mass or radius at coordinate index `ic` of model `i`. !! !! `ic` is 1-based KEPLER coordinate index, clamped to `1..ncoord`. ! Arguments integer(int32), intent(in) :: i, ic !! Model index; coordinate index. real(real64) :: c integer(int32) :: j j = max(1_int32, min(ic, data(i)%ncoord)) if (st%yaxis == "radius") then c = data(i)%rncoord(j) else c = data(i)%xmcoord(j) end if end function coord_at