Back to index

salome-med  6.5.0
Functions | Variables
TestMedCorba2 Namespace Reference

Functions

def ecart
def compare
def transpose

Variables

list BASE = os.environ["MED_ROOT_DIR"]
tuple fileName = os.path.join( BASE, 'pointe.med' )
tuple md = MED()
tuple mdDriver = MED_MED_RDONLY_DRIVER(fileName, md)
tuple mLocal = md.getMesh(md.getMeshName(0))
tuple orb = CORBA.ORB_init([''], CORBA.ORB_ID)
tuple lcc = LifeCycleCORBA(orb)
tuple C = lcc.FindOrLoadComponent("FactoryServerPy", "Compo1Py")
tuple mDistant = C.Calcul1()
tuple m = mDistant.getSpaceDimension()
tuple n = mDistant.getNumberOfNodes()
tuple x1 = mDistant.getCoordinates(MED_FULL_INTERLACE)
tuple x2 = mDistant.getCoordinates(MED_NO_INTERLACE)
tuple x3 = mDistant.getCoordinates(MED_FULL_INTERLACE)
tuple x4 = transpose(x1, n, m)

Function Documentation

def TestMedCorba2.compare (   x,
  y 
)

Definition at line 71 of file TestMedCorba2.py.

00071 
00072 def compare(x, y):
00073     if (len(x) != len(y)):
00074         return 0
00075     for i in xrange(len(x)):
00076         if x[i] != y[i]:
00077             return 0
00078     return 1

def TestMedCorba2.ecart (   x,
  y 
)

Definition at line 62 of file TestMedCorba2.py.

00062 
00063 def ecart(x, y):
00064     s = 0.
00065     if (len(x) != len(y)):
00066         return 1.
00067     
00068     for i in xrange(len(x)):
00069         s = s + abs(x[i] - y[i]);
00070     return s

def TestMedCorba2.transpose (   x,
  n,
  m 
)

Definition at line 79 of file TestMedCorba2.py.

00079 
00080 def transpose(x, n, m):
00081     y = range(len(x));
00082     for i in xrange(n):
00083         for j in xrange(m):
00084             y[i + j*n] = x[i*m + j];
00085     return y


Variable Documentation

tuple TestMedCorba2.BASE = os.environ["MED_ROOT_DIR"]

Definition at line 25 of file TestMedCorba2.py.

tuple TestMedCorba2.C = lcc.FindOrLoadComponent("FactoryServerPy", "Compo1Py")

Definition at line 55 of file TestMedCorba2.py.

tuple TestMedCorba2.fileName = os.path.join( BASE, 'pointe.med' )

Definition at line 28 of file TestMedCorba2.py.

tuple TestMedCorba2.lcc = LifeCycleCORBA(orb)

Definition at line 53 of file TestMedCorba2.py.

tuple TestMedCorba2.m = mDistant.getSpaceDimension()

Definition at line 86 of file TestMedCorba2.py.

tuple TestMedCorba2.md = MED()

Definition at line 35 of file TestMedCorba2.py.

tuple TestMedCorba2.mdDriver = MED_MED_RDONLY_DRIVER(fileName, md)

Definition at line 37 of file TestMedCorba2.py.

tuple TestMedCorba2.mDistant = C.Calcul1()

Definition at line 58 of file TestMedCorba2.py.

tuple TestMedCorba2.mLocal = md.getMesh(md.getMeshName(0))

Definition at line 43 of file TestMedCorba2.py.

tuple TestMedCorba2.n = mDistant.getNumberOfNodes()

Definition at line 88 of file TestMedCorba2.py.

tuple TestMedCorba2.orb = CORBA.ORB_init([''], CORBA.ORB_ID)

Definition at line 52 of file TestMedCorba2.py.

tuple TestMedCorba2.x1 = mDistant.getCoordinates(MED_FULL_INTERLACE)

Definition at line 91 of file TestMedCorba2.py.

tuple TestMedCorba2.x2 = mDistant.getCoordinates(MED_NO_INTERLACE)

Definition at line 92 of file TestMedCorba2.py.

tuple TestMedCorba2.x3 = mDistant.getCoordinates(MED_FULL_INTERLACE)

Definition at line 93 of file TestMedCorba2.py.

Definition at line 101 of file TestMedCorba2.py.