コード例 #1
0
    def __init__(self,
                 type=None,
                 mass=None,
                 q=None,
                 lambda_adr=None,
                 incr_state=None,
                 state=None):
        if pmi.workerIsActive():
            cxxinit(self, _espressopp._ParticleProperties)
            self.cxxclass.init(self)
            if incr_state is not None and state is not None:
                raise RuntimeError(
                    'Ambiguity, cannot set incr_state and state at the same time'
                )

            if type is not None:
                self.type = int(type)
            if mass is not None:
                self.mass = mass
            if q is not None:
                self.q = q
            if lambda_adr is not None:
                self.lambda_adr = lambda_adr
            if incr_state is not None:
                self.incr_state = incr_state
            if state is not None:
                self.state = state
コード例 #2
0
 def has(self, pid):
     if pmi.workerIsActive():
         return self.cxxclass.has(self, pid)
コード例 #3
0
 def show(self):
     if pmi.workerIsActive():
         self.cxxclass.show(self)
コード例 #4
0
 def add(self, pid):
     if pmi.workerIsActive():
         self.cxxclass.add(self, pid)
コード例 #5
0
 def __init__(self, storage):
     if pmi.workerIsActive():
         cxxinit(self, _espressopp.ParticleGroup, storage)
コード例 #6
0
ファイル: ParticleGroup.py プロジェクト: niktre/espressopp
 def size(self):
     if pmi.workerIsActive():
         return self.cxxclass.size(self)
コード例 #7
0
ファイル: ParticleGroup.py プロジェクト: niktre/espressopp
 def has(self, pid):
     if pmi.workerIsActive():
         return self.cxxclass.has(self, pid)
コード例 #8
0
 def set_v(self, vx, vy, vz, left_right='left'):
     if pmi.workerIsActive():
         self.cxxclass.set_v(self, vx, vy, vz, left_right == 'left')
コード例 #9
0
ファイル: ParticleGroup.py プロジェクト: niktre/espressopp
 def add(self, pid):
     if pmi.workerIsActive():
         self.cxxclass.add(self, pid)
コード例 #10
0
ファイル: ParticleGroup.py プロジェクト: niktre/espressopp
 def __init__(self, storage):
     if pmi.workerIsActive():
         cxxinit(self, _espressopp.ParticleGroup, storage)
コード例 #11
0
 def remove_type_id(self, type_id):
     if pmi.workerIsActive():
         self.cxxclass.remove_type_id(self, type_id)
コード例 #12
0
 def add_type_id(self, type_id):
     if pmi.workerIsActive():
         self.cxxclass.add_type_id(self, type_id)
コード例 #13
0
 def __init__(self, storage, integrator):
     if pmi.workerIsActive():
         cxxinit(self, _espressopp.ParticleGroupByType, storage, integrator)
コード例 #14
0
 def get_region(self):
     if pmi.workerIsActive():
         return self.cxxclass.get_region(self)
コード例 #15
0
 def get_v(self, left_right='left'):
     if pmi.workerIsActive():
         return self.cxxclass.get_v(self, left_right == 'left')
コード例 #16
0
 def size(self):
     if pmi.workerIsActive():
         return self.cxxclass.size(self)
コード例 #17
0
ファイル: ParticleGroup.py プロジェクト: niktre/espressopp
 def show(self):
     if pmi.workerIsActive():
         self.cxxclass.show(self)
コード例 #18
0
 def __init__(self, storage, integrator, left_bottom, right_top):
     if pmi.workerIsActive():
         cxxinit(self, _espressopp.ParticleRegion, storage, integrator)
         self.cxxclass.define_region(self, left_bottom, right_top)