Back to index

salome-med  6.5.0
Public Member Functions | Static Public Attributes
MEDCouplingDataForTest.MEDCouplingDataForTest Class Reference

List of all members.

Public Member Functions

def build2DTargetMesh_1
def build2DSourceMesh_1
def build3DTargetMesh_1
def build3DSourceMesh_1
def build3DSurfTargetMesh_1
def build3DExtrudedUMesh_1
def buildCU1DMesh_U
def build2DTargetMeshMergeNode_1
def build3DTargetMeshMergeNode_1
def build2DTargetMeshMerged_1
def build2DTargetMesh_2
def build1DSourceMesh_2
def build1DTargetMesh_3
def build2DCurveTargetMesh_3
def build2DTargetMesh_3
def build2DTargetMesh_4
def buildMultiFields_1
def buildMultiFields_2
def build1DMultiTypes_1
def build2DMultiTypes_1
def build3DMultiTypes_1
def buildCoordsForMultiTypes_1
def buildHexa8Mesh_1
def buildPointe_1

Static Public Attributes

tuple build2DSourceMesh_1 = classmethod(build2DSourceMesh_1)
tuple build3DTargetMesh_1 = classmethod(build3DTargetMesh_1)
tuple build3DSourceMesh_1 = classmethod(build3DSourceMesh_1)
tuple build3DSurfTargetMesh_1 = classmethod(build3DSurfTargetMesh_1)
tuple build3DExtrudedUMesh_1 = classmethod(build3DExtrudedUMesh_1)
tuple buildCU1DMesh_U = classmethod(buildCU1DMesh_U)
tuple build2DTargetMeshMergeNode_1 = classmethod(build2DTargetMeshMergeNode_1)
tuple build3DTargetMeshMergeNode_1 = classmethod(build3DTargetMeshMergeNode_1)
tuple build2DTargetMeshMerged_1 = classmethod(build2DTargetMeshMerged_1)
tuple build2DTargetMesh_2 = classmethod(build2DTargetMesh_2)
tuple build1DSourceMesh_2 = classmethod(build1DSourceMesh_2)
tuple build1DTargetMesh_3 = classmethod(build1DTargetMesh_3)
tuple build2DCurveTargetMesh_3 = classmethod(build2DCurveTargetMesh_3)
tuple build2DTargetMesh_3 = classmethod(build2DTargetMesh_3)
tuple build2DTargetMesh_4 = classmethod(build2DTargetMesh_4)
tuple buildMultiFields_1 = classmethod(buildMultiFields_1)
tuple buildMultiFields_2 = classmethod(buildMultiFields_2)
tuple build1DMultiTypes_1 = classmethod(build1DMultiTypes_1)
tuple build2DMultiTypes_1 = classmethod(build2DMultiTypes_1)
tuple build3DMultiTypes_1 = classmethod(build3DMultiTypes_1)
tuple buildCoordsForMultiTypes_1 = classmethod(buildCoordsForMultiTypes_1)
tuple buildHexa8Mesh_1 = classmethod(buildHexa8Mesh_1)
tuple buildPointe_1 = classmethod(buildPointe_1)

Detailed Description

Definition at line 23 of file MEDCouplingDataForTest.py.


Member Function Documentation

Definition at line 472 of file MEDCouplingDataForTest.py.

00472 
00473     def build1DMultiTypes_1(self):
00474         mesh=MEDCouplingUMesh.New("Multi1DMesh",1);
00475         coo=MEDCouplingDataForTest.buildCoordsForMultiTypes_1();
00476         conn=[0,2, 0,2,1]
00477         mesh.allocateCells(2);
00478         mesh.insertNextCell(NORM_SEG2,2,conn[0:2])
00479         mesh.insertNextCell(NORM_SEG3,3,conn[2:5])
00480         mesh.finishInsertingCells();
00481         mesh.setCoords(coo);
00482         return mesh;

Definition at line 282 of file MEDCouplingDataForTest.py.

00282 
00283     def build1DSourceMesh_2(cls):
00284         ret=MEDCouplingUMesh.New("1DSourceMesh",1);
00285         ret.allocateCells(4);
00286         conn=[0,1,2,3,1,2,3,4]
00287         for i in xrange(4):
00288             ret.insertNextCell(NORM_SEG2,2,conn[2*i:2*i+2]);
00289             pass
00290         ret.finishInsertingCells();
00291         myCoords=DataArrayDouble.New([0.3,0.7,0.9,1.0,1.12],5,1);
00292         ret.setCoords(myCoords);
00293         return ret

Definition at line 294 of file MEDCouplingDataForTest.py.

00294 
00295     def build1DTargetMesh_3(cls):
00296         ret=MEDCouplingUMesh.New("1DMesh_3",1);
00297         ret.allocateCells(4);
00298         conn=[0,1,2, 3,4, 6,5,7 ,9,8]
00299         ret.insertNextCell(NORM_SEG3,3,conn[0:3])
00300         ret.insertNextCell(NORM_SEG2,2,conn[3:5])
00301         ret.insertNextCell(NORM_SEG3,3,conn[5:8])
00302         ret.insertNextCell(NORM_SEG2,2,conn[8:10])
00303         ret.finishInsertingCells();
00304         coords=[0.5,1.,0.8,5.,5.21,0.5,1.1,0.7,5.,5.31]
00305         myCoords=DataArrayDouble.New();
00306         myCoords.setValues(coords,10,1);
00307         ret.setCoords(myCoords);
00308         return ret;

Definition at line 309 of file MEDCouplingDataForTest.py.

00309 
00310     def build2DCurveTargetMesh_3(cls):
00311         ret=MEDCouplingUMesh.New("2DCurveMesh_3",1);
00312         ret.allocateCells(4);
00313         conn=[0,1,2, 3,4, 6,5,7 ,9,8]
00314         ret.insertNextCell(NORM_SEG3,3,conn[0:3])
00315         ret.insertNextCell(NORM_SEG2,2,conn[3:5])
00316         ret.insertNextCell(NORM_SEG3,3,conn[5:8])
00317         ret.insertNextCell(NORM_SEG2,2,conn[8:10])
00318         ret.finishInsertingCells();
00319         coords=[0.5,0.5,1.,1.,0.8,0.8,5.,5.,5.21,5.21,0.5,0.5,1.1,1.1,0.7,0.7,5.,5.,5.31,5.31]
00320         myCoords=DataArrayDouble.New();
00321         myCoords.setValues(coords,10,2);
00322         ret.setCoords(myCoords);
00323         return ret;

Definition at line 483 of file MEDCouplingDataForTest.py.

00483 
00484     def build2DMultiTypes_1(self):
00485         mesh=MEDCouplingUMesh.New("Multi2DMesh",2);
00486         coo=MEDCouplingDataForTest.buildCoordsForMultiTypes_1();
00487         conn=[3,4,5, 3,4,5,6,7,8, 0,9,10,11, 0,9,10,11,12,13,14,15]
00488         mesh.allocateCells(4);
00489         mesh.insertNextCell(NORM_TRI3,3,conn[0:3])
00490         mesh.insertNextCell(NORM_TRI6,6,conn[3:9])
00491         mesh.insertNextCell(NORM_QUAD4,4,conn[9:13])
00492         mesh.insertNextCell(NORM_QUAD8,8,conn[13:21])
00493         mesh.finishInsertingCells();
00494         mesh.setCoords(coo);
00495         return mesh;

Definition at line 41 of file MEDCouplingDataForTest.py.

00041 
00042     def build2DSourceMesh_1(cls):
00043         sourceCoords=[-0.3,-0.3, 0.7,-0.3, -0.3,0.7, 0.7,0.7]
00044         sourceConn=[0,3,1,0,2,3]
00045         sourceMesh=MEDCouplingUMesh.New("my name of mesh 2D",2);
00046         sourceMesh.allocateCells(2);
00047         sourceMesh.insertNextCell(NORM_TRI3,3,sourceConn[0:3]);
00048         sourceMesh.insertNextCell(NORM_TRI3,3,sourceConn[3:6]);
00049         sourceMesh.finishInsertingCells();
00050         myCoords=DataArrayDouble.New();
00051         myCoords.setValues(sourceCoords,4,2);
00052         sourceMesh.setCoords(myCoords);
00053         return sourceMesh;
        

Here is the caller graph for this function:

Definition at line 24 of file MEDCouplingDataForTest.py.

00024 
00025     def build2DTargetMesh_1(cls):
00026         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 ];
00027         targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4];
00028         targetMesh=MEDCouplingUMesh.New();
00029         targetMesh.setMeshDimension(2);
00030         targetMesh.allocateCells(5);
00031         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]);
00032         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]);
00033         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]);
00034         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]);
00035         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]);
00036         targetMesh.finishInsertingCells();
00037         myCoords=DataArrayDouble.New();
00038         myCoords.setValues(targetCoords,9,2);
00039         targetMesh.setCoords(myCoords);
00040         return targetMesh;
    

Here is the caller graph for this function:

Definition at line 262 of file MEDCouplingDataForTest.py.

00262 
00263     def build2DTargetMesh_2(cls):
00264         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 ]
00265         targetConn=[0,3,4, 0,4,1, 1,4,2, 4,5,2, 3,6,4, 6,7,4, 4,7,5, 7,8,5 ]
00266         targetMesh=MEDCouplingUMesh.New();
00267         targetMesh.setMeshDimension(2);
00268         targetMesh.allocateCells(8);
00269         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[0:3])
00270         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[3:6])
00271         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[6:9])
00272         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[9:12])
00273         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[12:15])
00274         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[15:18])
00275         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[18:21])
00276         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[21:24])
00277         targetMesh.finishInsertingCells();
00278         myCoords=DataArrayDouble.New();
00279         myCoords.setValues(targetCoords,9,2);
00280         targetMesh.setCoords(myCoords);
00281         return targetMesh;
    

Definition at line 324 of file MEDCouplingDataForTest.py.

00324 
00325     def build2DTargetMesh_3(cls):
00326         ret=MEDCouplingUMesh.New("2DMesh_3",2);
00327         ret.allocateCells(10);
00328         conn=[0,1,2, 0,1,3,4, 0,1,3,5,4, 0,1,2,6,7,8, 0,1,3,4,6,9,2,10, 0,2,1, 0,4,3,1, 0,4,5,3,1, 0,2,1,8,7,6, 0,4,3,1,10,2,9,6]
00329         ret.insertNextCell(NORM_TRI3,3,conn[0:3])
00330         ret.insertNextCell(NORM_QUAD4,4,conn[3:7])
00331         ret.insertNextCell(NORM_POLYGON,5,conn[7:12])
00332         ret.insertNextCell(NORM_TRI6,6,conn[12:18])
00333         ret.insertNextCell(NORM_QUAD8,8,conn[18:26])
00334         ret.insertNextCell(NORM_TRI3,3,conn[26:29])
00335         ret.insertNextCell(NORM_QUAD4,4,conn[29:33])
00336         ret.insertNextCell(NORM_POLYGON,5,conn[33:38])
00337         ret.insertNextCell(NORM_TRI6,6,conn[38:44])
00338         ret.insertNextCell(NORM_QUAD8,8,conn[44:52])
00339         ret.finishInsertingCells();
00340         coords=[0.,0.,1.,0.,0.5,1.,1.,1.,0.,1.,0.5,2.,0.5,0.,0.75,0.5,0.25,0.5,1.,0.5,0.,0.5]
00341         myCoords=DataArrayDouble.New();
00342         myCoords.setValues(coords,11,2);
00343         ret.setCoords(myCoords);
00344         ret.checkCoherency();
00345         return ret;

Here is the caller graph for this function:

Definition at line 346 of file MEDCouplingDataForTest.py.

00346 
00347     def build2DTargetMesh_4(cls):
00348         targetCoords=[-0.3,-0.3, 0.2,-0.3, 0.7,-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 ]
00349         targetConn=[0,4,5,1, 1,5,3, 5,6,2, 7,8,5,4, 8,9,6,5]
00350         targetMesh=MEDCouplingUMesh.New();
00351         targetMesh.setMeshDimension(2);
00352         targetMesh.allocateCells(5);
00353         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4])
00354         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7])
00355         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10])
00356         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14])
00357         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18])
00358         targetMesh.finishInsertingCells();
00359         myCoords=DataArrayDouble.New();
00360         myCoords.setValues(targetCoords,10,2);
00361         targetMesh.setCoords(myCoords);
00362         return targetMesh;

Definition at line 236 of file MEDCouplingDataForTest.py.

00236 
00237     def build2DTargetMeshMerged_1(self):
00238         targetCoords=[
00239             -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,
00240             0.7,-0.3, 1.7,-0.3, 0.7,0.7, 1.7,0.7
00241             ]
00242         targetConn=[
00243             0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4,
00244             9,12,10,9,11,12
00245             ]
00246         targetMesh=MEDCouplingUMesh.New();
00247         targetMesh.setName("merge");
00248         targetMesh.setMeshDimension(2);
00249         targetMesh.allocateCells(10);
00250         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4])
00251         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7])
00252         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10])
00253         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14])
00254         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18])
00255         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[18:21])
00256         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[21:24])
00257         targetMesh.finishInsertingCells();
00258         myCoords=DataArrayDouble.New();
00259         myCoords.setValues(targetCoords,13,2);
00260         targetMesh.setCoords(myCoords);
00261         return targetMesh;

Definition at line 201 of file MEDCouplingDataForTest.py.

00201 
00202     def build2DTargetMeshMergeNode_1(self):
00203         targetCoords=[-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,-0.3, 0.2,-0.3, 0.2,-0.3, 0.2,0.2, 0.2,0.2, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7, 0.2,0.7 ]
00204         targetConn=[0,9,7,5, 4,6,2, 10,11,8, 9,14,15,7, 17,16,13,6]
00205         targetMesh=MEDCouplingUMesh.New();
00206         targetMesh.setMeshDimension(2);
00207         targetMesh.allocateCells(5);
00208         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]);
00209         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]);
00210         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]);
00211         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]);
00212         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]);
00213         targetMesh.finishInsertingCells();
00214         myCoords=DataArrayDouble.New();
00215         myCoords.setValues(targetCoords,18,2);
00216         targetMesh.setCoords(myCoords);
00217         return targetMesh;

Definition at line 115 of file MEDCouplingDataForTest.py.

00115 
00116     def build3DExtrudedUMesh_1(self):
00117         coords=[
00118             0.,0.,0., 1.,1.,0., 1.,1.25,0., 1.,0.,0., 1.,1.5,0., 2.,0.,0., 2.,1.,0., 1.,2.,0., 0.,2.,0., 3.,1.,0.,
00119             3.,2.,0., 0.,1.,0., 1.,3.,0., 2.,2.,0., 2.,3.,0.,
00120             0.,0.,1., 1.,1.,1., 1.,1.25,1., 1.,0.,1., 1.,1.5,1., 2.,0.,1., 2.,1.,1., 1.,2.,1., 0.,2.,1., 3.,1.,1.,
00121             3.,2.,1., 0.,1.,1., 1.,3.,1., 2.,2.,1., 2.,3.,1.,
00122             0.,0.,2., 1.,1.,2., 1.,1.25,2., 1.,0.,2., 1.,1.5,2., 2.,0.,2., 2.,1.,2., 1.,2.,2., 0.,2.,2., 3.,1.,2.,
00123             3.,2.,2., 0.,1.,2., 1.,3.,2., 2.,2.,2., 2.,3.,2.,
00124             0.,0.,3., 1.,1.,3., 1.,1.25,3., 1.,0.,3., 1.,1.5,3., 2.,0.,3., 2.,1.,3., 1.,2.,3., 0.,2.,3., 3.,1.,3.,
00125             3.,2.,3., 0.,1.,3., 1.,3.,3., 2.,2.,3., 2.,3.,3.]
00126 
00127         conn=[
00128             # 0
00129             0,11,1,3,15,26,16,18,   1,2,4,7,13,6,-1,1,16,21,6,-1,6,21,28,13,-1,13,7,22,28,-1,7,4,19,22,-1,4,2,17,19,-1,2,1,16,17,-1,16,21,28,22,19,17,
00130             1,6,5,3,16,21,20,18,   13,10,9,6,28,25,24,21,
00131             11,8,7,4,2,1,-1,11,26,16,1,-1,1,16,17,2,-1,2,17,19,4,-1,4,19,22,7,-1,7,8,23,22,-1,8,11,26,23,-1,26,16,17,19,22,23,
00132             7,12,14,13,22,27,29,28,
00133             # 1
00134             15,26,16,18,30,41,31,33,   16,17,19,22,28,21,-1,16,31,36,21,-1,21,36,43,28,-1,28,22,37,43,-1,22,19,34,37,-1,19,17,32,34,-1,17,16,31,32,-1,31,36,43,37,34,32,
00135             16,21,20,18,31,36,35,33,   28,25,24,21,43,40,39,36,
00136             26,23,22,19,17,16,-1,26,41,31,16,-1,16,31,32,17,-1,17,32,34,19,-1,19,34,37,22,-1,22,23,38,37,-1,23,26,41,38,-1,41,31,32,34,37,38,
00137             22,27,29,28,37,42,44,43,
00138             # 2
00139             30,41,31,33,45,56,46,48,  31,32,34,37,43,36,-1,31,46,51,36,-1,36,51,58,43,-1,43,37,52,58,-1,37,34,49,52,-1,34,32,47,49,-1,32,31,46,47,-1,46,51,58,52,49,47,
00140             31,36,35,33,46,51,50,48,  43,40,39,36,58,55,54,51,
00141             41,38,37,34,32,31,-1,41,56,46,31,-1,31,46,47,32,-1,32,47,49,34,-1,34,49,52,37,-1,37,38,53,52,-1,38,41,56,53,-1,56,46,47,49,52,53,
00142             37,42,44,43,52,57,59,58]            
00143         conn2=[7,12,14,13, 11,8,7,4,2,1, 13,10,9,6, 1,6,5,3, 1,2,4,7,13,6, 0,11,1,3]
00144         #
00145         ret=MEDCouplingUMesh.New();
00146         ret.setMeshDimension(3);
00147         ret.allocateCells(18);
00148         #
00149         ret.insertNextCell(NORM_HEXA8,8,conn[0:8]);
00150         ret.insertNextCell(NORM_POLYHED,43,conn[8:51]);
00151         ret.insertNextCell(NORM_HEXA8,8,conn[51:59]);
00152         ret.insertNextCell(NORM_HEXA8,8,conn[59:67]);
00153         ret.insertNextCell(NORM_POLYHED,43,conn[67:110]);
00154         ret.insertNextCell(NORM_HEXA8,8,conn[110:118]);
00155         #
00156         ret.insertNextCell(NORM_HEXA8,8,conn[118:126]);
00157         ret.insertNextCell(NORM_POLYHED,43,conn[126:169]);
00158         ret.insertNextCell(NORM_HEXA8,8,conn[169:177]);
00159         ret.insertNextCell(NORM_HEXA8,8,conn[177:185]);
00160         ret.insertNextCell(NORM_POLYHED,43,conn[185:228]);
00161         ret.insertNextCell(NORM_HEXA8,8,conn[228:236]);
00162         #
00163         ret.insertNextCell(NORM_HEXA8,8,conn[236:244]);
00164         ret.insertNextCell(NORM_POLYHED,43,conn[244:287]);
00165         ret.insertNextCell(NORM_HEXA8,8,conn[287:295]);
00166         ret.insertNextCell(NORM_HEXA8,8,conn[295:303]);
00167         ret.insertNextCell(NORM_POLYHED,43,conn[303:346]);
00168         ret.insertNextCell(NORM_HEXA8,8,conn[346:354]);
00169         #
00170         ret.finishInsertingCells();
00171         myCoords=DataArrayDouble.New();
00172         myCoords.setValues(coords,60,3);
00173         ret.setCoords(myCoords);
00174         #
00175         mesh2D=MEDCouplingUMesh.New();
00176         mesh2D.setMeshDimension(2);
00177         mesh2D.allocateCells(6);
00178         mesh2D.insertNextCell(NORM_QUAD4,4,conn2[0:4]);
00179         mesh2D.insertNextCell(NORM_POLYGON,6,conn2[4:10]);
00180         mesh2D.insertNextCell(NORM_QUAD4,4,conn2[10:14]);
00181         mesh2D.insertNextCell(NORM_QUAD4,4,conn2[14:18]);
00182         mesh2D.insertNextCell(NORM_POLYGON,6,conn2[18:24]);
00183         mesh2D.insertNextCell(NORM_QUAD4,4,conn2[24:28]);
00184         mesh2D.setCoords(myCoords);
00185         return ret,mesh2D
    

Definition at line 496 of file MEDCouplingDataForTest.py.

00496 
00497     def build3DMultiTypes_1(self):
00498         mesh=MEDCouplingUMesh.New("Multi3DMesh",3);
00499         coo=MEDCouplingDataForTest.buildCoordsForMultiTypes_1();
00500         conn=[0,16,17,18,
00501               0,16,17,18,19,20,21,22,23,24,
00502               0,11,10,9,25,
00503               0,11,10,9,25,15,14,13,12,26,27,28,29,
00504               0,30,31,32,33,34,
00505               0,30,31,32,33,34,35,36,37,38,39,40,41,42,43,
00506               0,9,10,11,44,45,46,47,
00507               0,9,10,11,44,45,46,47,12,13,14,15,48,49,50,51,52,53,54,55 ];
00508         mesh.allocateCells(8);
00509         mesh.insertNextCell(NORM_TETRA4,4,conn[0:4])
00510         mesh.insertNextCell(NORM_TETRA10,10,conn[4:14])
00511         mesh.insertNextCell(NORM_PYRA5,5,conn[14:19])
00512         mesh.insertNextCell(NORM_PYRA13,13,conn[19:32])
00513         mesh.insertNextCell(NORM_PENTA6,6,conn[32:38])
00514         mesh.insertNextCell(NORM_PENTA15,15,conn[38:53])
00515         mesh.insertNextCell(NORM_HEXA8,8,conn[53:61])
00516         mesh.insertNextCell(NORM_HEXA20,20,conn[61:81])
00517         mesh.finishInsertingCells();
00518         mesh.setCoords(coo);
00519         return mesh;

Definition at line 72 of file MEDCouplingDataForTest.py.

00072 
00073     def build3DSourceMesh_1(self):
00074         sourceCoords=[ 0.0, 0.0, 200.0, 0.0, 0.0, 0.0, 0.0, 200.0, 200.0, 0.0, 200.0, 0.0, 200.0, 0.0, 200.0,
00075                        200.0, 0.0, 0.0, 200.0, 200.0, 200.0, 200.0, 200.0, 0.0, 100.0, 100.0, 100.0]
00076         sourceConn=[8,1,7,3, 6,0,8,2, 7,4,5,8, 6,8,4,7, 6,8,0,4, 6,8,7,3, 8,1,3,0, 4,1,5,8, 1,7,5,8, 0,3,8,2, 8,1,0,4, 3,6,8,2]
00077         sourceMesh=MEDCouplingUMesh.New();
00078         sourceMesh.setMeshDimension(3);
00079         sourceMesh.allocateCells(12);
00080         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[0:4])
00081         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[4:8])
00082         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[8:12])
00083         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[12:16])
00084         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[16:20])
00085         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[20:24])
00086         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[24:28])
00087         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[28:32])
00088         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[32:36])
00089         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[36:40])
00090         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[40:44])
00091         sourceMesh.insertNextCell(NORM_TETRA4,4,sourceConn[44:48])
00092         sourceMesh.finishInsertingCells();
00093         myCoords=DataArrayDouble.New();
00094         myCoords.setValues(sourceCoords,9,3);
00095         sourceMesh.setCoords(myCoords);
00096         return sourceMesh;
00097         

Definition at line 98 of file MEDCouplingDataForTest.py.

00098 
00099     def build3DSurfTargetMesh_1(self):
00100         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]
00101         targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4]
00102         targetMesh=MEDCouplingUMesh.New();
00103         targetMesh.setMeshDimension(2);
00104         targetMesh.allocateCells(5);
00105         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4])
00106         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7])
00107         targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10])
00108         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14])
00109         targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18])
00110         targetMesh.finishInsertingCells();
00111         myCoords=DataArrayDouble.New();
00112         myCoords.setValues(targetCoords,9,3);
00113         targetMesh.setCoords(myCoords);
00114         return targetMesh;

Definition at line 54 of file MEDCouplingDataForTest.py.

00054 
00055     def build3DTargetMesh_1(cls):
00056         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. ,
00057                        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. ,
00058                        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. ];
00059         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,
00060                     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];
00061         targetMesh=MEDCouplingUMesh.New();
00062         targetMesh.setMeshDimension(3);
00063         targetMesh.allocateCells(12);
00064         for i in xrange(8):
00065             targetMesh.insertNextCell(NORM_HEXA8,8,targetConn[8*i:8*i+8]);
00066             pass
00067         targetMesh.finishInsertingCells();
00068         myCoords=DataArrayDouble.New();
00069         myCoords.setValues(targetCoords,27,3);
00070         targetMesh.setCoords(myCoords);
00071         return targetMesh

Definition at line 218 of file MEDCouplingDataForTest.py.

00218 
00219     def build3DTargetMeshMergeNode_1(self):
00220         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. ,
00221                        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. ,
00222                        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., 50.,0.,0., 50.,0.,0., 50.,0.,0.,  200., 50., 200.]
00223         targetConn=[0,29,4,3,9,10,13,12, 28,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16,
00224                     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,30,26,25]
00225         targetMesh=MEDCouplingUMesh.New();
00226         targetMesh.setMeshDimension(3);
00227         targetMesh.allocateCells(12);
00228         for i in xrange(8):
00229             targetMesh.insertNextCell(NORM_HEXA8,8,targetConn[8*i:8*(i+1)]);
00230             pass
00231         targetMesh.finishInsertingCells();
00232         myCoords=DataArrayDouble.New();
00233         myCoords.setValues(targetCoords,31,3);
00234         targetMesh.setCoords(myCoords);
00235         return targetMesh;

Definition at line 520 of file MEDCouplingDataForTest.py.

00520 
00521     def buildCoordsForMultiTypes_1(self):
00522         coords=DataArrayDouble.New();
00523         data=[0.0,0.0,0.0, 0.5,0.5,0.5, 1.0,1.0,1.0, 1.0,1.0,0.0, 2.0,2.5,0.0, 6.0,1.5,0.0, 1.0,2.0,0.0, 4.5,2.5,0.0, 4.0,0.5,0.0, 0.0,4.0,0.0, 4.0,4.0,0.0, 4.0,0.0,0.0, 0.0,2.0,0.0, 2.0,4.0,0.0, 4.0,2.0,0.0, 2.0,0.0,0.0, 0.0,6.0,0.0, 3.0,3.0,0.0, 1.3,3.0,3.0, 0.0,3.0,0.0, 1.5,4.5,0.0, 1.5,1.5,0.0, 0.65,1.5,1.5, 0.65,4.5,1.5, 2.15,3.0,1.5, 2.0,2.0,2.0, 3.0,1.0,1.0, 3.0,3.0,1.0, 1.0,3.0,1.0, 1.0,1.0,1.0, 0.0,3.0,0.0, 2.0,0.0,0.0, 0.0,0.0,6.0, 0.0,3.0,6.0, 3.0,0.0,6.0, 0.0,1.5,0.0, 1.5,1.5,0.0, 1.5,0.0,0.0, 0.0,1.5,6.0, 1.5,1.5,6.0, 1.5,0.0,6.0, 0.0,0.0,3.0, 0.0,3.0,3.0, 3.0,0.0,3.0, 0.0,0.0,4.0, 0.0,4.0,4.0, 4.0,4.0,4.0, 4.0,0.0,4.0, 0.0,2.0,4.0, 2.0,4.0,4.0, 4.0,2.0,4.0, 2.0,0.0,4.0, 0.0,0.0,2.0, 0.0,4.0,2.0, 4.0,4.0,2.0, 4.0,0.0,2.0]
00524         coords.setValues(data,56,3);
00525         coords.setInfoOnComponent(0,"X (cm)");
00526         coords.setInfoOnComponent(1,"Y (cm)");
00527         coords.setInfoOnComponent(2,"Z (cm)");
00528         return coords

Definition at line 186 of file MEDCouplingDataForTest.py.

00186 
00187     def buildCU1DMesh_U(self):
00188         coords=[ 0.0, 0.3, 0.75, 1.0 ]
00189         conn=[ 0,1, 1,2, 2,3 ]
00190         mesh=MEDCouplingUMesh.New();
00191         mesh.setMeshDimension(1);
00192         mesh.allocateCells(3);
00193         mesh.insertNextCell(NORM_SEG2,2,conn[0:2]);
00194         mesh.insertNextCell(NORM_SEG2,2,conn[2:4]);
00195         mesh.insertNextCell(NORM_SEG2,2,conn[4:6]);
00196         mesh.finishInsertingCells();
00197         myCoords=DataArrayDouble.New();
00198         myCoords.setValues(coords,4,1);
00199         mesh.setCoords(myCoords);
00200         return mesh;

Definition at line 529 of file MEDCouplingDataForTest.py.

00529 
00530     def buildHexa8Mesh_1(self):
00531         mesh=MEDCouplingUMesh.New("Hexa8Only",3);
00532         coo=DataArrayDouble.New();
00533         coords=[0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.0, 1.0, 0.5, 0.0, 0.0, 1.0, 0.0, 0.5, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.5, 1.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.0, 1.0, 0.5, 0.5, 1.0, 0.5, 1.0, 1.0, 0.5, 0.0, 0.0, 1.0, 0.5, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.5, 1.0, 0.5, 0.5, 1.0, 1.0, 0.5, 1.0, 0.0, 1.0, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 1.0]
00534         coo.setValues(coords,27,3);
00535         conn=[3,12,13,4,0,9,10,1,
00536               4,13,14,5,1,10,11,2,
00537               6,15,16,7,3,12,13,4,
00538               7,16,17,8,4,13,14,5,
00539               12,21,22,13,9,18,19,10,
00540               13,22,23,14,10,19,20,11,
00541               15,24,25,16,12,21,22,13,
00542               16,25,26,17,13,22,23,14];
00543         mesh.allocateCells(8);
00544         for i in xrange(8):
00545             mesh.insertNextCell(NORM_HEXA8,8,conn[8*i:8*(i+1)])
00546             pass
00547         mesh.finishInsertingCells();
00548         mesh.setCoords(coo);
00549         return mesh;

Definition at line 363 of file MEDCouplingDataForTest.py.

00363 
00364     def buildMultiFields_1(cls):
00365         m1=MEDCouplingDataForTest.build2DTargetMesh_1();
00366         m1.setName("m1");
00367         m2=MEDCouplingDataForTest.build2DTargetMesh_1();
00368         m2.setName("m2");
00369         vals0=[-0.7,-1.,-2.,-3.,-4.];
00370         vals1=[0.,1.,2.,3.,4.,0.1,0.2,0.3,0.4];
00371         vals1_1=[170.,171.,172.,173.,174.,170.1,170.2,170.3,170.4];
00372         vals2=[5.,6.,7.,8.,9.];
00373         vals4=[15.,16.,17.,18.,19.];
00374         d0=DataArrayDouble.New();
00375         d0.setValues(vals0,5,1);
00376         d1=DataArrayDouble.New();
00377         d1.setValues(vals1,9,1);
00378         d1_1=DataArrayDouble.New();
00379         d1_1.setValues(vals1_1,9,1);
00380         d2=DataArrayDouble.New();
00381         d2.setValues(vals2,5,1);
00382         d4=DataArrayDouble.New();
00383         d4.setValues(vals4,5,1);
00384         d0.setName("d0"); d1.setName("d1"); d1_1.setName("d1_1"); d2.setName("d2"); d4.setName("d4");
00385         d0.setInfoOnComponent(0,"c1");
00386         d1.setInfoOnComponent(0,"c6");
00387         d1_1.setInfoOnComponent(0,"c9");
00388         d2.setInfoOnComponent(0,"c5");
00389         d4.setInfoOnComponent(0,"c7");
00390         f0=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00391         f0.setMesh(m1);
00392         f0.setArray(d0);
00393         f0.setTime(0.2,5,6);
00394         f0.setName("f0");
00395         f1=MEDCouplingFieldDouble.New(ON_NODES,LINEAR_TIME);
00396         f1.setMesh(m1);
00397         f1.setArrays([d1,d1_1]);
00398         f1.setStartTime(0.7,7,8);
00399         f1.setEndTime(1.2,9,10);
00400         f1.setName("f1");
00401         f2=MEDCouplingFieldDouble.New(ON_CELLS,CONST_ON_TIME_INTERVAL);
00402         f2.setMesh(m2);
00403         f2.setArray(d2);
00404         f2.setTime(1.2,11,12);
00405         f2.setEndTime(1.5,13,14);
00406         f2.setName("f2");
00407         f3=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00408         f3.setMesh(m1);
00409         f3.setArray(d2);
00410         f3.setTime(1.7,15,16);
00411         f3.setName("f3");
00412         f4=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME);
00413         f4.setMesh(m2);
00414         f4.setArray(d4);
00415         f4.setName("f4");
00416         ret=MEDCouplingMultiFields.New([f0,f1,f2,f3,f4]);
00417         return ret;

Definition at line 418 of file MEDCouplingDataForTest.py.

00418 
00419     def buildMultiFields_2(cls):
00420         m1=MEDCouplingDataForTest.build2DTargetMesh_1();
00421         m1.setName("m1");
00422         m2=MEDCouplingDataForTest.build2DTargetMesh_1();
00423         m2.setName("m2");
00424         vals0=[-0.7,-1.,-2.,-3.,-4.];
00425         vals1=[0.,1.,2.,3.,4.];
00426         vals1_1=[170.,171.,172.,173.,174.];
00427         vals2=[5.,6.,7.,8.,9.];
00428         vals4=[15.,16.,17.,18.,19.];
00429         d0=DataArrayDouble.New();
00430         d0.setValues(vals0,5,1);
00431         d1=DataArrayDouble.New();
00432         d1.setValues(vals1,5,1);
00433         d1_1=DataArrayDouble.New();
00434         d1_1.setValues(vals1_1,5,1);
00435         d2=DataArrayDouble.New();
00436         d2.setValues(vals2,5,1);
00437         d4=DataArrayDouble.New();
00438         d4.setValues(vals4,5,1);
00439         d0.setName("d0"); d1.setName("d1"); d1_1.setName("d1_1"); d2.setName("d2"); d4.setName("d4");
00440         d0.setInfoOnComponent(0,"c1");
00441         d1.setInfoOnComponent(0,"c6");
00442         d1_1.setInfoOnComponent(0,"c9");
00443         d2.setInfoOnComponent(0,"c5");
00444         d4.setInfoOnComponent(0,"c7");
00445         f0=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00446         f0.setMesh(m1);
00447         f0.setArray(d0);
00448         f0.setTime(0.2,5,6);
00449         f0.setName("f0");
00450         f1=MEDCouplingFieldDouble.New(ON_CELLS,LINEAR_TIME);
00451         f1.setMesh(m1);
00452         f1.setArrays([d1,d1_1]);
00453         f1.setStartTime(0.7,7,8);
00454         f1.setEndTime(1.2,9,10);
00455         f1.setName("f1");
00456         f2=MEDCouplingFieldDouble.New(ON_CELLS,CONST_ON_TIME_INTERVAL);
00457         f2.setMesh(m2);
00458         f2.setArray(d2);
00459         f2.setTime(1.2,11,12);
00460         f2.setEndTime(1.5,13,14);
00461         f2.setName("f2");
00462         f3=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME);
00463         f3.setMesh(m1);
00464         f3.setArray(d2);
00465         f3.setTime(1.7,15,16);
00466         f3.setName("f3");
00467         f4=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME);
00468         f4.setMesh(m2);
00469         f4.setArray(d4);
00470         f4.setName("f4");
00471         return [f0,f1,f2,f3,f4]

Definition at line 550 of file MEDCouplingDataForTest.py.

00550 
00551     def buildPointe_1(self):
00552         mesh=MEDCouplingUMesh.New("Pointe.med",3);
00553         mesh2=MEDCouplingUMesh.New("Pointe.med",2);
00554         coords=[0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 2.0, 0.0, 1.0, 0.0, 2.0, 1.0, -2.0, 0.0, 1.0, 0.0, -2.0, 1.0, 1.0, 1.0, 2.0, -1.0, 1.0, 2.0, -1.0, -1.0, 2.0, 1.0, -1.0, 2.0, 1.0, 1.0, 3.0, -1.0, 1.0, 3.0, -1.0, -1.0, 3.0, 1.0, -1.0, 3.0, 1.0, 1.0, 4.0, -1.0, 1.0, 4.0, -1.0, -1.0, 4.0, 1.0, -1.0, 4.0, 0.0, 0.0, 5.0]
00555         conn=[0,1,2,5,0,1,3,2,0,1,4,3,0,1,5,4,1,6,3,2,1,7,4,3,1,8,5,4,1,9,2,5,1,6,2,9,1,7,3,6,1,8,4,7,1,9,5,8, 6,7,8,9,1,14,17,16,15,18, 10,11,12,13,6,7,8,9,14,15,16,17,10,11,12,13]
00556         coo=DataArrayDouble.New();
00557         coo.setValues(coords,19,3);
00558         mesh.setCoords(coo);
00559         mesh2.setCoords(coo);
00560         mesh.allocateCells(16);
00561         for i in xrange(12):
00562             mesh.insertNextCell(NORM_TETRA4,4,conn[4*i:4*i+4])
00563             pass
00564         mesh.insertNextCell(NORM_PYRA5,5,conn[48:53])
00565         mesh.insertNextCell(NORM_PYRA5,5,conn[53:58])
00566         mesh.insertNextCell(NORM_HEXA8,8,conn[58:66])
00567         mesh.insertNextCell(NORM_HEXA8,8,conn[66:74])
00568         mesh.finishInsertingCells();
00569         #[1,34,29,23,41,32]
00570         conn2=[0,5,1,14,18,17,8,7,4,9,5,2, 12,8,9,13,6,7,8,9]
00571         mesh2.allocateCells(6);
00572         for i in xrange(4):
00573             mesh2.insertNextCell(NORM_TRI3,3,conn2[3*i:3*i+3])
00574             pass
00575         mesh2.insertNextCell(NORM_QUAD4,4,conn2[12:16])
00576         mesh2.insertNextCell(NORM_QUAD4,4,conn2[16:20])
00577         mesh2.finishInsertingCells();
00578         return [mesh,mesh2]


Member Data Documentation

Definition at line 597 of file MEDCouplingDataForTest.py.

Definition at line 590 of file MEDCouplingDataForTest.py.

Definition at line 591 of file MEDCouplingDataForTest.py.

Definition at line 592 of file MEDCouplingDataForTest.py.

Definition at line 598 of file MEDCouplingDataForTest.py.

Definition at line 580 of file MEDCouplingDataForTest.py.

Definition at line 589 of file MEDCouplingDataForTest.py.

Definition at line 593 of file MEDCouplingDataForTest.py.

Definition at line 594 of file MEDCouplingDataForTest.py.

Definition at line 588 of file MEDCouplingDataForTest.py.

Definition at line 586 of file MEDCouplingDataForTest.py.

Definition at line 584 of file MEDCouplingDataForTest.py.

Definition at line 599 of file MEDCouplingDataForTest.py.

Definition at line 582 of file MEDCouplingDataForTest.py.

Definition at line 583 of file MEDCouplingDataForTest.py.

Definition at line 581 of file MEDCouplingDataForTest.py.

Definition at line 587 of file MEDCouplingDataForTest.py.

Definition at line 600 of file MEDCouplingDataForTest.py.

Definition at line 585 of file MEDCouplingDataForTest.py.

Definition at line 601 of file MEDCouplingDataForTest.py.

Definition at line 595 of file MEDCouplingDataForTest.py.

Definition at line 596 of file MEDCouplingDataForTest.py.

Definition at line 602 of file MEDCouplingDataForTest.py.


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