Exemplo n.º 1
0
from mpi4py import MPI
import sys
sys.path.insert(0, '//home/csunix/sc16ho/dev/miind/build/libs/PythonWrapper')
import libmiindpw

comm = MPI.COMM_WORLD
print "MASTER RANK: " + str(comm.Get_rank())

print MPI.Get_processor_name()

wrapped = libmiindpw.Wrapped()
wrapped.init()
wrapped.startSimulation()

x = [0.0 for a in range(76)]

while (1):
    x = wrapped.evolveSingleStep(x)
Exemplo n.º 2
0
 def __init__(self, num_nodes, simulation_length, dt, initial_values):
     self.number_of_nodes = num_nodes
     self.simulation_length = simulation_length
     self.wrapped = libmiindpw.Wrapped(num_nodes, simulation_length, dt)
     self.wrapped.setInitialValues(initial_values[0].tolist(),
                                   initial_values[1].tolist())