Back to index

salome-med  6.5.0
Public Member Functions
MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest Class Reference

List of all members.

Public Member Functions

def build1DMesh
def build2DMesh
def build3DMesh
def build3DSurfMesh
def build0DMesh
def buildM1DMesh
def buildExtrudedMesh
def buildCMesh
def buildFieldScalarOn2DNT
def buildFieldNodeScalarOn2DNT
def buildFieldScalarOn3DNT
def buildFieldScalarOn3DSurfWT
def buildFieldScalarOn3DSurfCOTI
def buildFieldScalarOn2DLT
def buildFieldGaussPt2DWT
def buildFieldGaussPtNE2DWT
def buildFieldVectorOnExtrudedWT
def buildFieldVectorOnCMeshWT
def buildFieldTemplateCellOn2D
def buildFieldTemplateNodeOn2D
def buildFieldTemplateGaussPtOn2D
def buildFieldTemplateGaussNEOn2D
def buildMultiFields1
def buildArrayDouble1
def buildArrayDouble2
def buildArrayDouble3
def buildArrayInt1
def buildArrayInt2
def buildArrayInt3
def buildMultiFields2
def buildFileNameForIOR

Detailed Description

Definition at line 24 of file MEDCouplingCorbaSwigTest.py.


Member Function Documentation

Definition at line 112 of file MEDCouplingCorbaSwigTest.py.

00112 
00113     def build0DMesh(self):
00114         targetCoords=[-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5];
00115         targetMesh=MEDCouplingUMesh.New();
00116         targetMesh.setMeshDimension(0);
00117         targetMesh.allocateCells(8);
00118         targetMesh.setName("Wonderfull 0D mesh");
00119         targetMesh.setDescription("build0DMesh");
00120         targetConn=[]
00121         targetMesh.insertNextCell(NORM_POINT1,1,[0]);
00122         targetMesh.insertNextCell(NORM_POINT1,1,[1]);
00123         targetMesh.insertNextCell(NORM_POINT1,1,[2]);
00124         targetMesh.insertNextCell(NORM_POINT1,1,[3]);
00125         targetMesh.insertNextCell(NORM_POINT1,1,[4]);
00126         targetMesh.insertNextCell(NORM_POINT1,1,[5]);
00127         targetMesh.insertNextCell(NORM_POINT1,1,[7]);
00128         targetMesh.insertNextCell(NORM_POINT1,1,[6]);
00129         targetMesh.finishInsertingCells();
00130         myCoords=DataArrayDouble.New();
00131         myCoords.setValues(targetCoords,9,3);
00132         targetMesh.setCoords(myCoords);
00133         myCoords.setInfoOnComponent(0,"X (m)");
00134         myCoords.setInfoOnComponent(1,"YY (Pm)");
00135         myCoords.setInfoOnComponent(2,"ZZZ (m)");
00136         targetMesh.checkCoherency();
00137         return targetMesh;

Definition at line 25 of file MEDCouplingCorbaSwigTest.py.

00025 
00026     def build1DMesh(self):
00027         coords=[ 0.0, 0.3, 0.75, 1.0 ]
00028         conn=[ 0,1, 1,2, 2,3 ]
00029         mesh=MEDCouplingUMesh.New("1DMeshForCorba",1);
00030         mesh.setDescription("build1DMesh");
00031         mesh.allocateCells(3);
00032         mesh.setTime(5.6,7,8);
00033         mesh.setTimeUnit("ms");
00034         mesh.insertNextCell(NORM_SEG2,2,conn[0:2]);
00035         mesh.insertNextCell(NORM_SEG2,2,conn[2:4]);
00036         mesh.insertNextCell(NORM_SEG2,2,conn[4:6]);
00037         mesh.finishInsertingCells();
00038         myCoords=DataArrayDouble.New();
00039         myCoords.setValues(coords,4,1);
00040         mesh.setCoords(myCoords);
00041         mesh.changeSpaceDimension(3);
00042         myCoords=mesh.getCoords();
00043         myCoords.setInfoOnComponent(0,"X1D(m)");
00044         myCoords.setInfoOnComponent(1,"Y1D (dm)");
00045         myCoords.setInfoOnComponent(2,"Z1D (pm)");
00046         center=[0.,0.,0.]
00047         vector=[0.,1.,0.]
00048         mesh.rotate(center,vector,-math.pi/2.);
00049         return mesh
        

Here is the caller graph for this function:

Definition at line 50 of file MEDCouplingCorbaSwigTest.py.

00050 
00051     def build2DMesh(self):
00052         targetCoords=[-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 ];
00053         targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4]
00054         targetMesh=MEDCouplingUMesh.New();
00055         targetMesh.setMeshDimension(2);
00056         targetMesh.setName("MyMesh2D");
00057         targetMesh.setDescription("build2DMesh");
00058         targetMesh.allocateCells(5);
00059         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]);
00060         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]);
00061         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]);
00062         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]);
00063         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]);
00064         targetMesh.finishInsertingCells();
00065         myCoords=DataArrayDouble.New();
00066         myCoords.setValues(targetCoords,9,2);
00067         targetMesh.setCoords(myCoords);
00068         return targetMesh;
    

Here is the caller graph for this function:

Definition at line 69 of file MEDCouplingCorbaSwigTest.py.

00069 
00070     def build3DMesh(self):
00071         targetCoords=[ 0., 0., 0., 50., 0., 0. , 200., 0., 0.  , 0., 50., 0., 50., 50., 0. , 200., 50., 0.,   0., 200., 0., 50., 200., 0. , 200., 200., 0. ,
00072                        0., 0., 50., 50., 0., 50. , 200., 0., 50.  , 0., 50., 50., 50., 50., 50. , 200., 50., 50.,   0., 200., 50., 50., 200., 50. , 200., 200., 50. ,
00073                        0., 0., 200., 50., 0., 200. , 200., 0., 200.  , 0., 50., 200., 50., 50., 200. , 200., 50., 200.,   0., 200., 200., 50., 200., 200. , 200., 200., 200. ];
00074         targetConn=[0,1,4,3,9,10,13,12, 1,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16,
00075                     9,10,13,12,18,19,22,21, 10,11,14,13,19,20,23,22, 12,13,16,15,21,22,25,24, 13,14,17,16,22,23,26,25];
00076         targetMesh=MEDCouplingUMesh.New();
00077         targetMesh.setMeshDimension(3);
00078         targetMesh.setName("MyMesh3D");
00079         targetMesh.setDescription("build3DMesh");
00080         targetMesh.allocateCells(12);
00081         for i in xrange(8):
00082             targetMesh.insertNextCell(NORM_HEXA8,8,targetConn[8*i:8*(i+1)]);
00083             pass
00084         targetMesh.finishInsertingCells();
00085         myCoords=DataArrayDouble.New();
00086         myCoords.setValues(targetCoords,27,3);
00087         targetMesh.setCoords(myCoords)
00088         myCoords.setName("check in case")
00089         return targetMesh;

Here is the caller graph for this function:

Definition at line 90 of file MEDCouplingCorbaSwigTest.py.

00090 
00091     def build3DSurfMesh(self):
00092         targetCoords=[-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5];
00093         targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4];
00094         targetMesh=MEDCouplingUMesh.New();
00095         targetMesh.setMeshDimension(2);
00096         targetMesh.setName("MyMesh3DSurf");
00097         targetMesh.setDescription("build3DSurfMesh");
00098         targetMesh.allocateCells(5);
00099         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]);
00100         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]);
00101         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]);
00102         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]);
00103         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]);
00104         targetMesh.finishInsertingCells();
00105         myCoords=DataArrayDouble.New();
00106         myCoords.setValues(targetCoords,9,3);
00107         targetMesh.setCoords(myCoords);
00108         myCoords.setInfoOnComponent(0,"X (m)");
00109         myCoords.setInfoOnComponent(1,"X (dm)");
00110         myCoords.setInfoOnComponent(2,"X (m)");
00111         return targetMesh;

Here is the caller graph for this function:

Definition at line 449 of file MEDCouplingCorbaSwigTest.py.

00449 
00450     def buildArrayDouble1(self):
00451         ret=DataArrayDouble.New();
00452         vals=[2.4,3.2,5.6,9.6,47.6,20.4,24.6,278.1,2.01,3.3,2.4,9.4];
00453         ret.setValues(vals,4,3);
00454         ret.setName("toto");
00455         ret.setInfoOnComponent(0,"sss");
00456         ret.setInfoOnComponent(1,"ppp");
00457         ret.setInfoOnComponent(2,"ttt");
00458         return ret;

Definition at line 459 of file MEDCouplingCorbaSwigTest.py.

00459 
00460     def buildArrayDouble2(self):
00461         ret=DataArrayDouble.New();
00462         ret.setName("titi");
00463         return ret;

Definition at line 464 of file MEDCouplingCorbaSwigTest.py.

00464 
00465     def buildArrayDouble3(self):
00466         ret=DataArrayDouble.New();
00467         ret.setName("titi");
00468         ret.alloc(0,3);
00469         ret.setInfoOnComponent(0,"sss");
00470         ret.setInfoOnComponent(1,"ppp");
00471         ret.setInfoOnComponent(2,"ttt");
00472         return ret;

Definition at line 473 of file MEDCouplingCorbaSwigTest.py.

00473 
00474     def buildArrayInt1(self):
00475         ret=DataArrayInt.New();
00476         vals=[2,3,5,9,47,20,24,278,2,3,2,9];
00477         ret.setValues(vals,4,3);
00478         ret.setName("toto");
00479         ret.setInfoOnComponent(0,"sss");
00480         ret.setInfoOnComponent(1,"ppp");
00481         ret.setInfoOnComponent(2,"ttt");
00482         return ret;

Definition at line 483 of file MEDCouplingCorbaSwigTest.py.

00483 
00484     def buildArrayInt2(self):
00485         ret=DataArrayInt.New();
00486         ret.setName("titi");
00487         return ret;

Definition at line 488 of file MEDCouplingCorbaSwigTest.py.

00488 
00489     def buildArrayInt3(self):
00490         ret=DataArrayInt.New();
00491         ret.setName("titi");
00492         ret.alloc(0,3);
00493         ret.setInfoOnComponent(0,"sss");
00494         ret.setInfoOnComponent(1,"ppp");
00495         ret.setInfoOnComponent(2,"ttt");
00496         return ret;

Definition at line 154 of file MEDCouplingCorbaSwigTest.py.

00154 
00155     def buildCMesh(self):
00156         targetMesh=MEDCouplingCMesh.New();
00157         targetMesh.setTime(2.3,4,5);
00158         targetMesh.setTimeUnit("us");
00159         targetMesh.setName("Example of CMesh");
00160         targetMesh.setDescription("buildCMesh");
00161         a1=DataArrayDouble.New();
00162         a1Data=[3.,4.,5.,6.,7.]
00163         a1.setValues(a1Data,5,1);
00164         a1.setInfoOnComponent(0,"SmthX");
00165         a2=DataArrayDouble.New();
00166         a2Data=[2.78,3.,4.,5.,6.,7.]
00167         a2.setValues(a2Data,6,1);
00168         a2.setInfoOnComponent(0,"SmthZ");
00169         #
00170         targetMesh.setCoordsAt(0,a1);
00171         targetMesh.setCoordsAt(2,a2);
00172         #
00173         #
00174         targetMesh.checkCoherency();
00175         #
00176         return targetMesh;

Here is the caller graph for this function:

Definition at line 144 of file MEDCouplingCorbaSwigTest.py.

00144 
00145     def buildExtrudedMesh(self):
00146         m2D=self.build2DMesh();
00147         m2D.changeSpaceDimension(3);
00148         m1D=self.build1DMesh();
00149         retu=m2D.buildExtrudedMesh(m1D,0);
00150         ret=MEDCouplingExtrudedMesh.New(retu,m2D,2);
00151         ret.setName("ExtrudedTestForCorbaTest");
00152         ret.setDescription("buildExtrudedMesh");
00153         return ret;

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 269 of file MEDCouplingCorbaSwigTest.py.

00269 
00270     def buildFieldGaussPt2DWT(self):
00271         _a=0.446948490915965;
00272         _b=0.091576213509771;
00273         _p1=0.11169079483905;
00274         _p2=0.0549758718227661;
00275         refCoo1=[ 0.,0., 1.,0., 0.,1. ]
00276         gsCoo1=[ 2*_b-1, 1-4*_b, 2*_b-1, 2.07*_b-1, 1-4*_b,
00277                  2*_b-1, 1-4*_a, 2*_a-1, 2*_a-1, 1-4*_a, 2*_a-1, 2*_a-1]
00278         wg1=[ 4*_p2, 4*_p2, 4*_p2, 4*_p1, 4*_p1, 4*_p1 ]
00279         _refCoo1=refCoo1
00280         _gsCoo1=gsCoo1
00281         _wg1=wg1
00282         m=self.build2DMesh();
00283         f=MEDCouplingFieldDouble.New(ON_GAUSS_PT,ONE_TIME);
00284         f.setTime(6.7,1,4);
00285         f.setMesh(m);
00286         f.setGaussLocalizationOnType(NORM_TRI3,_refCoo1,_gsCoo1,_wg1);
00287         refCoo2=[ 0.,0., 1.,0., 1.,1., 0.,1. ]
00288         _refCoo2=refCoo2
00289         _gsCoo1=_gsCoo1[0:4]
00290         _wg1=_wg1[0:2]
00291         f.setGaussLocalizationOnType(NORM_QUAD4,_refCoo2,_gsCoo1,_wg1);
00292         array=DataArrayDouble.New();
00293         ptr=18*2*[None]
00294         for i in xrange(18*2):
00295             ptr[i]=float(i+1);
00296             pass
00297         array.setValues(ptr,18,2);
00298         array.setInfoOnComponent(0,"Power(MW)");
00299         array.setInfoOnComponent(1,"Density (kg/m^3)");
00300         f.setArray(array);
00301         f.setName("MyFirstFieldOnGaussPoint");
00302         f.setTimeUnit("ms");
00303         f.setDescription("mmmmmmmmmmmm");
00304         f.checkCoherency();
00305         return f;

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 306 of file MEDCouplingCorbaSwigTest.py.

00306 
00307     def buildFieldGaussPtNE2DWT(self):
00308         m=self.build2DMesh();
00309         f=MEDCouplingFieldDouble.New(ON_GAUSS_NE,ONE_TIME);
00310         f.setTime(6.8,11,8);
00311         f.setMesh(m);
00312         f.setTimeUnit("ms");
00313         f.setName("MyFirstFieldOnNE");
00314         f.setDescription("MyDescriptionNE");
00315         array=DataArrayDouble.New();
00316         ptr=18*2*[None]
00317         for i in xrange(18*2):
00318             ptr[i]=float(i+7)
00319         array.setValues(ptr,18,2);
00320         array.setInfoOnComponent(0,"Power(MW)");
00321         array.setInfoOnComponent(1,"Density (kg/m^3)");
00322         f.setArray(array);
00323         #
00324         f.checkCoherency();
00325         return f;

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 190 of file MEDCouplingCorbaSwigTest.py.

00190 
00191     def buildFieldNodeScalarOn2DNT(self):
00192         mesh=self.build2DMesh();
00193         fieldOnNodes=MEDCouplingFieldDouble.New(ON_NODES,NO_TIME);
00194         fieldOnNodes.setName("toto2");
00195         fieldOnNodes.setTimeUnit("s");
00196         fieldOnNodes.setDescription("my wonderful field toto2");
00197         fieldOnNodes.setMesh(mesh);
00198         array=DataArrayDouble.New();
00199         tmp=mesh.getNumberOfNodes()*5*[7.1234]
00200         array.setValues(tmp,mesh.getNumberOfNodes(),5);
00201         fieldOnNodes.setArray(array);
00202         fieldOnNodes.checkCoherency();
00203         return fieldOnNodes;

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 249 of file MEDCouplingCorbaSwigTest.py.

00249 
00250     def buildFieldScalarOn2DLT(self):
00251         mesh=self.build2DMesh()
00252         fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,LINEAR_TIME)
00253         fieldOnCells.setName("toto27");
00254         fieldOnCells.setDescription("my wonderful 2D field toto27");
00255         fieldOnCells.setTimeUnit("ms");
00256         fieldOnCells.setMesh(mesh);
00257         array=DataArrayDouble.New();
00258         arr1=[1.2,1.02,1.002,1.0002, 3.4,3.04,3.004,3.0004, 5.6,5.06,5.006,5.0006, 7.8,7.08,7.008,7.0008, 9.1,9.01,9.001,9.0001]
00259         array.setValues(arr1,mesh.getNumberOfCells(),4);
00260         fieldOnCells.setArray(array);
00261         array=DataArrayDouble.New();
00262         arr2=[71.2,71.02,71.002,71.0002, 73.4,73.04,73.004,73.0004, 75.6,75.06,75.006,75.0006, 77.8,77.08,77.008,77.0008, 79.1,79.01,79.001,79.0001]
00263         array.setValues(arr2,mesh.getNumberOfCells(),4);
00264         fieldOnCells.setEndArray(array)
00265         fieldOnCells.setStartTime(6.7,25,26);
00266         fieldOnCells.setEndTime(17.2,125,126);
00267         fieldOnCells.checkCoherency();
00268         return fieldOnCells;

Here is the call graph for this function:

Definition at line 177 of file MEDCouplingCorbaSwigTest.py.

00177 
00178     def buildFieldScalarOn2DNT(self):
00179         mesh=self.build2DMesh();
00180         fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME);
00181         fieldOnCells.setTimeUnit("ms");
00182         fieldOnCells.setName("toto");
00183         fieldOnCells.setMesh(mesh);
00184         array=DataArrayDouble.New();
00185         tmp=mesh.getNumberOfCells()*6*[7.]
00186         array.setValues(tmp,mesh.getNumberOfCells(),6);
00187         fieldOnCells.setArray(array)
00188         fieldOnCells.checkCoherency();
00189         return fieldOnCells;

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 204 of file MEDCouplingCorbaSwigTest.py.

00204 
00205     def buildFieldScalarOn3DNT(self):
00206         mesh=self.build3DMesh();
00207         fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME);
00208         fieldOnCells.setNature(ConservativeVolumic);
00209         fieldOnCells.setName("toto");
00210         fieldOnCells.setDescription("my wonderful 3D field toto2");
00211         fieldOnCells.setMesh(mesh);
00212         array=DataArrayDouble.New();
00213         tmp=mesh.getNumberOfCells()*6*[7.]
00214         array.setValues(tmp,mesh.getNumberOfCells(),6);
00215         fieldOnCells.setArray(array);
00216         fieldOnCells.checkCoherency();
00217         return fieldOnCells;

Here is the call graph for this function:

Definition at line 233 of file MEDCouplingCorbaSwigTest.py.

00233 
00234     def buildFieldScalarOn3DSurfCOTI(self):
00235         mesh=self.build3DSurfMesh();
00236         fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,CONST_ON_TIME_INTERVAL);
00237         fieldOnCells.setName("toto26");
00238         fieldOnCells.setDescription("my wonderful 3D surf field toto26");
00239         fieldOnCells.setTimeUnit("us");
00240         fieldOnCells.setMesh(mesh);
00241         array=DataArrayDouble.New();
00242         tmp=mesh.getNumberOfCells()*3*[7.]
00243         array.setValues(tmp,mesh.getNumberOfCells(),3);
00244         fieldOnCells.setArray(array);
00245         fieldOnCells.setStartTime(6.7,1,4);
00246         fieldOnCells.setEndTime(7.2,2,8);
00247         fieldOnCells.checkCoherency();
00248         return fieldOnCells;

Here is the call graph for this function:

Definition at line 218 of file MEDCouplingCorbaSwigTest.py.

00218 
00219     def buildFieldScalarOn3DSurfWT(self):
00220         mesh=self.build3DSurfMesh();
00221         fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00222         fieldOnCells.setName("toto25");
00223         fieldOnCells.setDescription("my wonderful 3D surf field toto25");
00224         fieldOnCells.setTimeUnit("us");
00225         fieldOnCells.setMesh(mesh);
00226         array=DataArrayDouble.New();
00227         tmp=mesh.getNumberOfCells()*3*[7.]
00228         array.setValues(tmp,mesh.getNumberOfCells(),3);
00229         fieldOnCells.setArray(array);
00230         fieldOnCells.setTime(6.7,1,4);
00231         fieldOnCells.checkCoherency();
00232         return fieldOnCells;

Here is the call graph for this function:

Definition at line 370 of file MEDCouplingCorbaSwigTest.py.

00370 
00371     def buildFieldTemplateCellOn2D(self):
00372         f1=self.buildFieldScalarOn2DNT();
00373         f2=MEDCouplingFieldTemplate.New(f1);
00374         f2.setNature(NoNature);
00375         return f2
    

Here is the call graph for this function:

Definition at line 388 of file MEDCouplingCorbaSwigTest.py.

00388 
00389     def buildFieldTemplateGaussNEOn2D(self):
00390         f1=self.buildFieldGaussPtNE2DWT();
00391         f2=MEDCouplingFieldTemplate.New(f1);
00392         f2.setNature(IntegralGlobConstraint);
00393         return f2

Here is the call graph for this function:

Definition at line 382 of file MEDCouplingCorbaSwigTest.py.

00382 
00383     def buildFieldTemplateGaussPtOn2D(self):
00384         f1=self.buildFieldGaussPt2DWT();
00385         f2=MEDCouplingFieldTemplate.New(f1);
00386         f2.setNature(Integral);
00387         return f2

Here is the call graph for this function:

Definition at line 376 of file MEDCouplingCorbaSwigTest.py.

00376 
00377     def buildFieldTemplateNodeOn2D(self):
00378         f1=self.buildFieldNodeScalarOn2DNT();
00379         f2=MEDCouplingFieldTemplate.New(f1);
00380         f2.setNature(ConservativeVolumic);
00381         return f2
            

Here is the call graph for this function:

Definition at line 348 of file MEDCouplingCorbaSwigTest.py.

00348 
00349     def buildFieldVectorOnCMeshWT(self):
00350         ext=self.buildCMesh();
00351         #
00352         f=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00353         f.setTime(6.8,11,8);
00354         f.setMesh(ext);
00355         f.setName("MyFieldOnCMesh");
00356         f.setDescription("desc of MyFiOnCMesh");
00357         array=DataArrayDouble.New();
00358         nbOfCells=ext.getNumberOfCells();
00359         ptr=2*nbOfCells*[None]
00360         for i in range(nbOfCells*2):
00361             ptr[i]=float(i/2+7)+float((i%2)*1000);
00362             pass
00363         array.setValues(ptr,nbOfCells,2);
00364         array.setInfoOnComponent(0,"Power(GW)");
00365         array.setInfoOnComponent(1,"Density (kg/m^3)");
00366         f.setArray(array);
00367         #
00368         f.checkCoherency();
00369         return f

Here is the call graph for this function:

Definition at line 326 of file MEDCouplingCorbaSwigTest.py.

00326 
00327     def buildFieldVectorOnExtrudedWT(self):
00328         ext=self.buildExtrudedMesh();
00329         #
00330         f=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00331         f.setTime(6.8,11,8);
00332         f.setMesh(ext);
00333         f.setName("MyFieldOnExtruM");
00334         f.setDescription("desc of MyFiOnExtruM");
00335         array=DataArrayDouble.New();
00336         nbOfCells=ext.getNumberOfCells();
00337         ptr=2*nbOfCells*[None]
00338         for i in range(nbOfCells*2):
00339             ptr[i]=float(i/2+7)+float((i%2)*1000);
00340             pass
00341         array.setValues(ptr,nbOfCells,2);
00342         array.setInfoOnComponent(0,"Power(MW)");
00343         array.setInfoOnComponent(1,"Density (kg/m^3)");
00344         f.setArray(array);
00345         #
00346         f.checkCoherency();
00347         return f

Here is the call graph for this function:

Definition at line 554 of file MEDCouplingCorbaSwigTest.py.

00554 
00555     def buildFileNameForIOR(self):
00556         ret=os.getenv("TMP");
00557         ret+="/entryPointMEDCouplingCorba.ior";
        return ret;

Definition at line 138 of file MEDCouplingCorbaSwigTest.py.

00138 
00139     def buildM1DMesh(self):
00140         meshM1D=MEDCouplingUMesh.New("wonderfull -1 D mesh",-1);
00141         meshM1D.setDescription("buildM1DMesh");
00142         meshM1D.checkCoherency();
00143         return meshM1D;

Definition at line 394 of file MEDCouplingCorbaSwigTest.py.

00394 
00395     def buildMultiFields1(self):
00396         m1=self.build2DMesh();
00397         m1.setName("m1");
00398         m2=self.build2DMesh();
00399         m2.setName("m2");
00400         vals0=[-0.7,-1.,-2.,-3.,-4.];
00401         vals1=[0.,1.,2.,3.,4.,0.1,0.2,0.3,0.4];
00402         vals1_1=[170.,171.,172.,173.,174.,170.1,170.2,170.3,170.4];
00403         vals2=[5.,6.,7.,8.,9.];
00404         vals4=[15.,16.,17.,18.,19.];
00405         d0=DataArrayDouble.New();
00406         d0.setValues(vals0,5,1);
00407         d1=DataArrayDouble.New();
00408         d1.setValues(vals1,9,1);
00409         d1_1=DataArrayDouble.New();
00410         d1_1.setValues(vals1_1,9,1);
00411         d2=DataArrayDouble.New();
00412         d2.setValues(vals2,5,1);
00413         d4=DataArrayDouble.New();
00414         d4.setValues(vals4,5,1);
00415         d0.setName("d0"); d1.setName("d1"); d1_1.setName("d1_1"); d2.setName("d2"); d4.setName("d4");
00416         d0.setInfoOnComponent(0,"c1");
00417         d1.setInfoOnComponent(0,"c6");
00418         d1_1.setInfoOnComponent(0,"c9");
00419         d2.setInfoOnComponent(0,"c5");
00420         d4.setInfoOnComponent(0,"c7");
00421         f0=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00422         f0.setMesh(m1);
00423         f0.setArray(d0);
00424         f0.setTime(0.2,5,6);
00425         f0.setName("f0");
00426         f1=MEDCouplingFieldDouble.New(ON_NODES,LINEAR_TIME);
00427         f1.setMesh(m1);
00428         f1.setArrays([d1,d1_1]);
00429         f1.setStartTime(0.7,7,8);
00430         f1.setEndTime(1.2,9,10);
00431         f1.setName("f1");
00432         f2=MEDCouplingFieldDouble.New(ON_CELLS,CONST_ON_TIME_INTERVAL);
00433         f2.setMesh(m2);
00434         f2.setArray(d2);
00435         f2.setTime(1.2,11,12);
00436         f2.setEndTime(1.5,13,14);
00437         f2.setName("f2");
00438         f3=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00439         f3.setMesh(m1);
00440         f3.setArray(d2);
00441         f3.setTime(1.7,15,16);
00442         f3.setName("f3");
00443         f4=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME);
00444         f4.setMesh(m2);
00445         f4.setArray(d4);
00446         f4.setName("f4");
00447         ret=MEDCouplingMultiFields.New([f0,f1,f2,f3,f4]);
00448         return ret;
    

Here is the call graph for this function:

Definition at line 497 of file MEDCouplingCorbaSwigTest.py.

00497 
00498     def buildMultiFields2(self):
00499         m1=self.build2DMesh();
00500         m1.setName("m1");
00501         m2=self.build2DMesh();
00502         m2.setName("m2");
00503         vals0=[-0.7,-1.,-2.,-3.,-4.];
00504         vals1=[0.,1.,2.,3.,4.,0.1,0.2,0.3,0.4];
00505         vals1_1=[170.,171.,172.,173.,174.];
00506         vals2=[5.,6.,7.,8.,9.];
00507         vals4=[15.,16.,17.,18.,19.];
00508         d0=DataArrayDouble.New();
00509         d0.setValues(vals0,5,1);
00510         d1=DataArrayDouble.New();
00511         d1.setValues(vals1,5,1);
00512         d1_1=DataArrayDouble.New();
00513         d1_1.setValues(vals1_1,5,1);
00514         d2=DataArrayDouble.New();
00515         d2.setValues(vals2,5,1);
00516         d4=DataArrayDouble.New();
00517         d4.setValues(vals4,5,1);
00518         d0.setName("d0"); d1.setName("d1"); d1_1.setName("d1_1"); d2.setName("d2"); d4.setName("d4");
00519         d0.setInfoOnComponent(0,"c1");
00520         d1.setInfoOnComponent(0,"c6");
00521         d1_1.setInfoOnComponent(0,"c9");
00522         d2.setInfoOnComponent(0,"c5");
00523         d4.setInfoOnComponent(0,"c7");
00524         f0=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00525         f0.setMesh(m1);
00526         f0.setArray(d0);
00527         f0.setTime(0.2,5,6);
00528         f0.setName("f0");
00529         f1=MEDCouplingFieldDouble.New(ON_CELLS,LINEAR_TIME);
00530         f1.setMesh(m1);
00531         f1.setArrays([d1,d1_1]);
00532         f1.setStartTime(0.7,7,8);
00533         f1.setEndTime(1.2,9,10);
00534         f1.setName("f1");
00535         f2=MEDCouplingFieldDouble.New(ON_CELLS,CONST_ON_TIME_INTERVAL);
00536         f2.setMesh(m2);
00537         f2.setArray(d2);
00538         f2.setTime(1.2,11,12);
00539         f2.setEndTime(1.5,13,14);
00540         f2.setName("f2");
00541         f3=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00542         f3.setMesh(m1);
00543         f3.setArray(d2);
00544         f3.setTime(1.7,15,16);
00545         f3.setName("f3");
00546         f4=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00547         f4.setMesh(m2);
00548         f4.setArray(d4);
00549         f4.setName("f4");
00550         f4.setTime(2.7,25,26);
00551         ret=MEDCouplingFieldOverTime.New([f0,f1,f2,f3,f4]);
00552         ret.checkCoherency();
00553         return ret;

Here is the call graph for this function:


The documentation for this class was generated from the following file: