1 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 # Author : Anthony Geay (CEA/DEN)
21 import MEDCouplingCorbaSwigTest
22 import MEDCouplingCorbaServantTest_idl
24 from MEDCouplingCorba import *
26 class MEDCouplingMeshFieldFactoryComponentPy(MEDCouplingCorbaServantTest_idl._0_SALOME_TEST__POA.MEDCouplingMeshFieldFactory):
27 def __init__(self,orb):
29 self._test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
32 def destroyFactory(self):
33 oid = self._default_POA().servant_to_id(self);
34 MEDCouplingCorbaServantTest_idl._0_SALOME_TEST__POA.MEDCouplingMeshFieldFactory._default_POA().deactivate_object(self,oid);
35 MEDCouplingCorbaServantTest_idl._0_SALOME_TEST__POA.MEDCouplingMeshFieldFactory._remove_ref(self);
37 def shutdownOrb(self):
42 mesh=self._test.build1DMesh()
43 ret=MEDCouplingUMeshServant._this(mesh)
44 assert isinstance(ret,SALOME_MED._objref_MEDCouplingUMeshCorbaInterface)
48 mesh=self._test.build2DMesh()
49 return MEDCouplingUMeshServant._this(mesh)
52 mesh=self._test.build3DMesh()
53 return MEDCouplingUMeshServant._this(mesh)
55 def get3DSurfMesh(self):
56 mesh=self._test.build3DSurfMesh()
57 return MEDCouplingUMeshServant._this(mesh)
60 mesh=self._test.build0DMesh()
61 return MEDCouplingUMeshServant._this(mesh)
64 mesh=self._test.buildM1DMesh()
65 return MEDCouplingUMeshServant._this(mesh)
67 def getExtrudedMesh(self):
68 mesh=self._test.buildExtrudedMesh()
69 return MEDCouplingExtrudedMeshServant._this(mesh)
72 mesh=self._test.buildCMesh()
73 return MEDCouplingCMeshServant._this(mesh)
76 mesh=self._test.buildIMesh()
77 return MEDCouplingIMeshServant._this(mesh)
80 mesh=self._test.buildCLMesh()
81 return MEDCouplingCurveLinearMeshServant._this(mesh)
83 def get1SGTUMesh(self):
84 mesh=self._test.build1SGTUMesh()
85 return MEDCoupling1SGTUMeshServant._this(mesh)
87 def get1DGTUMesh(self):
88 mesh=self._test.build1DGTUMesh()
89 return MEDCoupling1DGTUMeshServant._this(mesh)
91 def getFieldScalarOn2DNT(self):
92 field=self._test.buildFieldScalarOn2DNT()
93 return MEDCouplingFieldDoubleServant._this(field)
95 def getFieldNodeScalarOn2DNT(self):
96 field=self._test.buildFieldNodeScalarOn2DNT()
97 return MEDCouplingFieldDoubleServant._this(field)
99 def getFieldScalarOn3DNT(self):
100 field=self._test.buildFieldScalarOn3DNT()
101 return MEDCouplingFieldDoubleServant._this(field)
103 def getFieldScalarOn3DSurfWT(self):
104 field=self._test.buildFieldScalarOn3DSurfWT()
105 return MEDCouplingFieldDoubleServant._this(field)
107 def getFieldScalarOn3DSurfCOTI(self):
108 field=self._test.buildFieldScalarOn3DSurfCOTI()
109 return MEDCouplingFieldDoubleServant._this(field)
111 def getFieldScalarOn2DLT(self):
112 field=self._test.buildFieldScalarOn2DLT()
113 return MEDCouplingFieldDoubleServant._this(field)
115 def getFieldGaussPt2DWT(self):
116 field=self._test.buildFieldGaussPt2DWT()
117 return MEDCouplingFieldDoubleServant._this(field)
119 def getFieldGaussPtNE2DWT(self):
120 field=self._test.buildFieldGaussPtNE2DWT()
121 return MEDCouplingFieldDoubleServant._this(field)
123 def getFieldVectorOnExtrudedWT(self):
124 field=self._test.buildFieldVectorOnExtrudedWT()
125 return MEDCouplingFieldDoubleServant._this(field)
127 def getFieldVectorOnCMeshWT(self):
128 field=self._test.buildFieldVectorOnCMeshWT()
129 return MEDCouplingFieldDoubleServant._this(field)
131 def getFieldTemplateCellOn2D(self):
132 field=self._test.buildFieldTemplateCellOn2D()
133 return MEDCouplingFieldTemplateServant._this(field)
135 def getFieldTemplateNodeOn2D(self):
136 field=self._test.buildFieldTemplateNodeOn2D()
137 return MEDCouplingFieldTemplateServant._this(field)
139 def getFieldTemplateGaussPtOn2D(self):
140 field=self._test.buildFieldTemplateGaussPtOn2D()
141 return MEDCouplingFieldTemplateServant._this(field)
143 def getFieldTemplateGaussNEOn2D(self):
144 field=self._test.buildFieldTemplateGaussNEOn2D()
145 return MEDCouplingFieldTemplateServant._this(field)
147 def getMultiFields1(self):
148 fields=self._test.buildMultiFields1()
149 return MEDCouplingMultiFieldsServant._this(fields)
151 def getArrayDouble1(self):
152 fields=self._test.buildArrayDouble1()
153 return DataArrayDoubleServant._this(fields)
155 def getArrayDouble2(self):
156 fields=self._test.buildArrayDouble2()
157 return DataArrayDoubleServant._this(fields)
159 def getArrayDouble3(self):
160 fields=self._test.buildArrayDouble3()
161 return DataArrayDoubleServant._this(fields)
163 def getArrayInt1(self):
164 fields=self._test.buildArrayInt1()
165 return DataArrayIntServant._this(fields)
167 def getArrayInt2(self):
168 fields=self._test.buildArrayInt2()
169 return DataArrayIntServant._this(fields)
171 def getArrayInt3(self):
172 fields=self._test.buildArrayInt3()
173 return DataArrayIntServant._this(fields)
175 def getMultiFields2(self):
176 fot=self._test.buildMultiFields2()
177 return MEDCouplingFieldOverTimeServant._this(fot)