コード例 #1
0
ファイル: update.py プロジェクト: tltht/hoomd-blue
    def __init__(self, period=1):
        # initialize base class
        hoomd.update._updater.__init__(self);

        # initialize the reflected c++ class
        if not hoomd.context.current.device.cpp_exec_conf.isCUDAEnabled():
            self.cpp_updater = _example_plugin.ExampleUpdater(hoomd.context.current.system_definition);
        else:
            self.cpp_updater = _example_plugin.ExampleUpdaterGPU(hoomd.context.current.system_definition);

        self.setupUpdater(period);
コード例 #2
0
ファイル: update.py プロジェクト: phmalek/hoomd-blue
    def __init__(self, period=1):
        hoomd.util.print_status_line()

        # initialize base class
        hoomd.update._updater.__init__(self)

        # initialize the reflected c++ class
        if not hoomd.context.exec_conf.isCUDAEnabled():
            self.cpp_updater = _example_plugin.ExampleUpdater(
                hoomd.context.current.system_definition)
        else:
            self.cpp_updater = _example_plugin.ExampleUpdaterGPU(
                hoomd.context.current.system_definition)

        self.setupUpdater(period)