Commit 3006e3f 1 parent e87b182 commit 3006e3f Copy full SHA for 3006e3f
File tree 1 file changed +33
-1
lines changed
1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -1156,8 +1156,40 @@ def _set_adaptive_timestep(self):
1156
1156
self ._dt = new_dt .to (u .s )
1157
1157
1158
1158
def set_timestep (self , dt : u .Quantity = None ):
1159
+ """
1160
+ Set the time step for the next non-equilibrium ionization time
1161
+ advance.
1162
+
1163
+ Parameters
1164
+ ----------
1165
+ dt: ~astropy.units.Quantity, optional
1166
+ The time step to be used for the next time advance.
1167
+
1168
+ Notes
1169
+ -----
1170
+ If `dt` is not `None`, then the time step will be set to `dt`.
1171
+
1172
+ If `dt` is not set and the `adapt_dt` attribute of an
1173
+ `~nei.classes.NEI` instance is `True`, then this method will
1174
+ calculate the time step corresponding to how long it will be
1175
+ until the temperature rises or drops into the next temperature
1176
+ bin. If this time step is between `dtmin` and `dtmax`, then
1177
+
1178
+ If `dt` is not set and the `adapt_dt` attribute is `False`, then
1179
+ this method will set the time step as what was inputted to the
1180
+ `~nei.classes.NEI` class upon instantiation in the `dt` argument
1181
+ or through the `~nei.classes.NEI` class's `dt_input` attribute.
1182
+
1183
+ Raises
1184
+ ------
1185
+ ~nei.classes.NEIError
1186
+ If the time step cannot be set, for example if the `dt`
1187
+ argument is invalid or the time step cannot be adapted.
1188
+
1189
+ """
1159
1190
1160
- if dt is not None : # Allow the time step to set manually.
1191
+ if dt is not None :
1192
+ # Allow the time step to set as an argument to this method.
1161
1193
try :
1162
1194
dt = dt .to (u .s )
1163
1195
except Exception as exc :
You can’t perform that action at this time.
0 commit comments