예제 #1
0
파일: apps.py 프로젝트: ntouran/armi
    def __init__(self):
        """
        This mostly initializes the default plugin manager. Subclasses are free to adopt
        this plugin manager and register more plugins of their own, or to throw it away
        and start from scratch if they do not wish to use the default Framework plugins.

        For a description of the things that an ARMI plugin can do, see the
        :py:mod:`armi.plugins` module.
        """
        from armi import cli
        from armi import bookkeeping
        from armi.physics import fuelCycle
        from armi.physics import fuelPerformance
        from armi.physics import neutronics
        from armi.physics import safety
        from armi.physics import thermalHydraulics
        from armi import reactor

        self._pm = plugins.getNewPluginManager()
        for plugin in (
                cli.EntryPointsPlugin,
                bookkeeping.BookkeepingPlugin,
                fuelCycle.FuelHandlerPlugin,
                fuelPerformance.FuelPerformancePlugin,
                neutronics.NeutronicsPlugin,
                safety.SafetyPlugin,
                thermalHydraulics.ThermalHydraulicsPlugin,
                reactor.ReactorPlugin,
        ):
            self._pm.register(plugin)

        self._paramRenames: Optional[Tuple[Dict[str, str], int]] = None
예제 #2
0
def getDefaultPluginManager() -> pluginManager.ArmiPluginManager:
    """
    Return a plugin manager containing the default set of ARMI Framework plugins.

    This is useful when using standalone facilities of ARMI without a specific
    application.
    """
    pm = plugins.getNewPluginManager()
    for plugin in getDefaultPlugins():
        pm.register(plugin)

    return pm