Skip to content

Commit

Permalink
update default target and error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-dudt committed Aug 26, 2024
1 parent 447f17e commit 3a0bbc4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion desc/objectives/_power_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(
fuel not in ["DT"], ValueError, f"fuel must be one of ['DT'], got {fuel}."
)
if target is None and bounds is None:
target = 0
target = 1e9
self._fuel = fuel
self._grid = grid
super().__init__(
Expand Down Expand Up @@ -113,6 +113,11 @@ def build(self, use_jit=True, verbose=1):
ValueError,
"Equilibrium must have an electron density profile.",
)
errorif(
eq.ion_temperature is None,
ValueError,
"Equilibrium must have an ion temperature profile.",
)
if self._grid is None:
self._grid = QuadratureGrid(
L=eq.L_grid,
Expand Down

0 comments on commit 3a0bbc4

Please sign in to comment.