From 1de8704b409cfc15fe668c622cfbe1907f61a81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franck=20P=C3=A9rignon?= <franck.perignon@imag.fr> Date: Wed, 13 Mar 2013 14:22:16 +0000 Subject: [PATCH] Empty template for ghost synchro in topo --- HySoP/hysop/operator/synchronizeGhosts.py | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 HySoP/hysop/operator/synchronizeGhosts.py diff --git a/HySoP/hysop/operator/synchronizeGhosts.py b/HySoP/hysop/operator/synchronizeGhosts.py new file mode 100644 index 000000000..0ad201c3a --- /dev/null +++ b/HySoP/hysop/operator/synchronizeGhosts.py @@ -0,0 +1,56 @@ +""" +@package parmepy.operator.synchronizeGhosts + +Update ghost points for some fields defined on a specific topology. +""" + +from parmepy.operator import Operator + + +class SynchronizeGhosts(Operator): + """ + Ghost points synchronization. + """ + + @debug + def __init__(self, fieldslist, topology, transferMethod): + """ + Defines a way to send/recv values at ghosts points for a list + of fields, discretized on a given topology. + + @param fieldslist : a list of fields + @param topology : the topology common to all fields. + @param transferMethod : which type of exchange is used. + """ + + @debug + def setUp(self): + """ + Transport operator discretization method. + Create an discrete Transport operator from given specifications. + + """ + Operator.setUp(self) + + # 1 - get discrete fields arrays + # 2 - get list of ghosts area + # 3 - get neighbours + # 4 - find what is to be send/recv, the size of the arrays and + # allocate buffers if required + # 5 - set send/recv order + self.discreteOperator.setUp() + + @debug + def apply(self, *args): + + # Do the send/recv as defined in setup. + return self.discreteOperator.apply(*args) + + def __str__(self): + """ToString method""" + + +if __name__ == "__main__": + print __doc__ + print "- Provided class : SynchronizeGhosts" + print SynchronizeGhosts.__doc__ -- GitLab