-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🎨 Small cleanup * 🚧 Initial structure
- Loading branch information
Showing
2 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# SPDX-FileCopyrightText: 2021-present M. Coleman, J. Cook, F. Franza | ||
# SPDX-FileCopyrightText: 2021-present I.A. Maione, S. McIntosh | ||
# SPDX-FileCopyrightText: 2021-present J. Morris, D. Short | ||
# | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
"""Equilibria and Equilibria optimisation analysis tools""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from bluemira.equilibria.equilibrium import MHDState | ||
from bluemira.equilibria.optimisation.problem.base import CoilsetOptimisationProblem | ||
|
||
|
||
class EqAnalysis: | ||
"""Equilibria analysis toolbox""" | ||
|
||
def __init__(self, eq: MHDState): | ||
self._eq = eq | ||
|
||
def plot(self): | ||
"""Plot equilibria""" | ||
return self.eq.plot() | ||
|
||
|
||
class COPAnalysis(EqAnalysis): | ||
"""Coilset Optimisation Problem analysis toolbox""" | ||
|
||
def __init__(self, cop: CoilsetOptimisationProblem): | ||
super().__init__(cop.eq) | ||
self._cop = cop | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters