/[escript]/trunk/finley/test/python/run_visualization_interface.py
ViewVC logotype

Contents of /trunk/finley/test/python/run_visualization_interface.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2257 - (show annotations)
Mon Feb 9 07:06:00 2009 UTC (10 years, 6 months ago) by gross
File MIME type: text/x-python
File size: 202705 byte(s)
test can now deal with contact elements
1
2 ########################################################
3 #
4 # Copyright (c) 2003-2008 by University of Queensland
5 # Earth Systems Science Computational Center (ESSCC)
6 # http://www.uq.edu.au/esscc
7 #
8 # Primary Business: Queensland, Australia
9 # Licensed under the Open Software License version 3.0
10 # http://www.opensource.org/licenses/osl-3.0.php
11 #
12 ########################################################
13
14 __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15 Earth Systems Science Computational Center (ESSCC)
16 http://www.uq.edu.au/esscc
17 Primary Business: Queensland, Australia"""
18 __license__="""Licensed under the Open Software License version 3.0
19 http://www.opensource.org/licenses/osl-3.0.php"""
20 __url__="http://www.uq.edu.au/esscc/escript-finley"
21
22 import sys, math, re
23 import unittest
24 from esys.escript import *
25 from esys.finley import ReadMesh
26
27 try:
28 FINLEY_TEST_DATA=os.environ['FINLEY_TEST_DATA']
29 except KeyError:
30 FINLEY_TEST_DATA='.'
31
32 try:
33 FINLEY_WORKDIR=os.environ['FINLEY_WORKDIR']
34 except KeyError:
35 FINLEY_WORKDIR='.'
36
37 FINLEY_TEST_MESH_PATH=FINLEY_TEST_DATA+"/data_meshes/"
38 # if os.name == "nt":
39 # FINLEY_TEST_MESH_PATH = FINLEY_TEST_MESH_PATH+"win32/"
40 FINLEY_WORKDIR_PATH=FINLEY_WORKDIR+"/"
41
42 class Test_VisualizationInterface(unittest.TestCase):
43 def check_vtk_old(self,f,reference_f):
44 # if reference_f.startswith("tet_"): os.link(os.path.join(FINLEY_WORKDIR_PATH,f),os.path.join(FINLEY_TEST_MESH_PATH,reference_f))
45 out_string=open(os.path.join(FINLEY_WORKDIR_PATH,f)).read().splitlines()
46 ref_string=open(os.path.join(FINLEY_TEST_MESH_PATH,reference_f)).read().splitlines()
47 c=0
48 for l in range(0,len(ref_string)):
49 if not ref_string[l].strip()[:2]=="<!":
50 line=out_string[c].strip()
51 if os.name == "nt":
52 line=line.replace("e+00","e+0").replace("e-00","e-0")
53 # line=line.replace("e-00","e+00").replace("-0.000000e+00","0.000000e+00")
54 line=line.replace(".000000e-00",".000000e+00").replace("-0.000000e+00","0.000000e+00")
55 self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in vtk files does not match reference (%s)"%(c,line,ref_string[l].strip()))
56 c+=1
57
58 # Compare two lists of numbers (stored as space-separated strings) using the L2 norm
59 def numericCompareL2(self, vector1, vector2):
60 if vector2 == None: return False
61 TOL = 1.0e-6
62 if len(vector1) != len(vector2): return False
63 diff = 0.0
64 for i in range(0, len(vector1)):
65 tmp = vector1[i] - vector2[i]
66 diff += tmp * tmp
67 if math.sqrt(diff) > TOL: return False
68 return True
69
70 # Compare two elements (stored as space-separated strings of integers) after mapping node labels
71 def elementCompareWithMap(self, e1, e2, value_map):
72 if e2 == None: return False
73 vector1 = e1.split()
74 vector2 = e2.split()
75 if len(vector1) != len(vector2): return False
76 for i in range(0, len(vector1)):
77 if int(vector1[i]) < 0: return False
78 if int(vector1[i]) >= len(value_map): return False
79 if value_map[int(vector1[i])] != int(vector2[i]): return False
80 return True
81
82 def compareDataSetWithMap(self, d1, d2, value_map):
83 if len(d1) != len(d2): return False
84 for i in range(0, len(d1)):
85 if value_map.has_key(i):
86 if not min( [ self.numericCompareL2(d1[i], d2[k] ) for k in value_map[i] ] ): return False
87 else:
88 return False
89 return True
90
91 # Compare two VTK files which were generated by Finley method saveVTK
92 def saveVtkCompare(self, file1, file2):
93 lineList1 = open(file1).read().splitlines()
94 lineList2 = open(file2).read().splitlines()
95
96 # lineList1: Trim spaces and delete comments and empty lines
97 for i in range(len(lineList1)-1, -1, -1):
98 lineList1[i] = lineList1[i].strip()
99 if lineList1[i][:2] == "<!": del(lineList1[i])
100 elif lineList1[i] == "": del(lineList1[i])
101
102 # lineList2: Trim spaces and delete comments and empty lines
103 for i in range(len(lineList2)-1, -1, -1):
104 lineList2[i] = lineList2[i].strip()
105 if lineList2[i][:2] == "<!": del(lineList2[i])
106 elif lineList2[i] == "": del(lineList2[i])
107
108 if len(lineList1) != len(lineList2):
109 return False, "Error: The two files have a different number of lines"
110
111 # Now corresponding XML tags are guaranteed to be on the same line numbers
112
113 # Do a simple string comparison except for data which might be permuted during optimization
114 doStringComparison = 1
115 for i in range(0, len(lineList1)):
116 if lineList1[i].startswith('</DataArray'): doStringComparison = 1
117 if doStringComparison and lineList1[i] != lineList2[i]:
118 return False, "Files differ at line %d" % int(i+1)
119 if lineList1[i].startswith('<DataArray'): doStringComparison = 0
120 if lineList1[i].startswith('<DataArray Name="offsets"'): doStringComparison = 1
121 if lineList1[i].startswith('<DataArray Name="types"'): doStringComparison = 1
122
123 # Find the list of nodes
124 nodeMap1 = {}
125 withinTheNodeList = False
126 cc=0
127 for i in range(0, len(lineList1)):
128 if withinTheNodeList and lineList1[i].startswith('</DataArray'): break # Finished reading nodes
129 if withinTheNodeList:
130 nodeMap1[cc]=[ float(x) for x in lineList1[i].split() ]
131 cc+=1
132 if lineList1[i].startswith('<DataArray'): withinTheNodeList = True
133
134 nodeMap2 = {}
135 withinTheNodeList = False
136 cc=0
137 for i in range(0, len(lineList1)):
138 if withinTheNodeList and lineList2[i].startswith('</DataArray'): break # Finished reading nodes
139 if withinTheNodeList:
140 nodeMap2[cc]=[ float(x) for x in lineList2[i].split() ]
141 cc+=1
142 if lineList2[i].startswith('<DataArray'): withinTheNodeList = True
143
144 if len(nodeMap1) != len(nodeMap2):
145 return False, "Error: The two files have different numbers of nodes"
146
147 nodeMap1to2 = {}
148 for n1 in nodeMap1.keys():
149 v=[]
150 for n2 in nodeMap2.keys():
151 if self.numericCompareL2(nodeMap1[n1], nodeMap2[n2]): v.append(n2)
152 if len(v)==0:
153 return False, "Error: no matching node for node %s %s."%(n1,nodeMap1[n1])
154 nodeMap1to2[n1]=v
155
156 # Find the list of elements
157 elementList1 = []
158 withinTheElementList = False
159 for i in range(0, len(lineList1)):
160 if withinTheElementList and lineList1[i].startswith('</DataArray'): break # Finished reading elements
161 if withinTheElementList:
162 elementList1.append([ int(x) for x in lineList1[i].split()])
163 if lineList1[i].startswith('<DataArray Name="connectivity"'): withinTheElementList = True
164
165 # Find the list of elements
166 elementList2 = []
167 withinTheElementList = False
168 for i in range(0, len(lineList2)):
169 if withinTheElementList and lineList2[i].startswith('</DataArray'): break # Finished reading elements
170 if withinTheElementList:
171 elementList2.append([ int(x) for x in lineList2[i].split()])
172 if lineList2[i].startswith('<DataArray Name="connectivity"'): withinTheElementList = True
173
174 if len(elementList1) != len(elementList2):
175 return False, "Error: The two files have different numbers of elements"
176
177 # Compute the element mapping from file1 to file2
178 elementMap1to2 = {}
179 for n1 in range(0, len(elementList1)):
180 v=None
181 for n2 in range(0, len(elementList2)):
182 if len(elementList1[n1]) == len(elementList2[n2]):
183 if min([ nnn in elementList2[n2] for nnn in elementList1[n1] ] ):
184 v=n2
185 break
186 if v == None:
187 return False, "Error: element %s is missing."%elementList1[n1]
188 else:
189 elementMap1to2[n1]=[n2]
190 # Find the data sets and compare them
191 dataList1 = []
192 dataList2 = []
193 withinCelldata = False
194 withinPointdata = False
195 withinDataSet = False
196 for i in range(0, len(lineList1)):
197 if (withinCelldata or withinPointdata) and withinDataSet and lineList1[i].startswith('</DataArray'):
198 withinDataSet = False # Finished reading one of the data sets
199 if withinCelldata and not self.compareDataSetWithMap(dataList1, dataList2, elementMap1to2):
200 return False, "Error: element data in '%s' did not match" % dataName
201 if withinPointdata and not self.compareDataSetWithMap(dataList1, dataList2, nodeMap1to2):
202 return False, "Error: point data in '%s' did not match" % dataName
203 if withinDataSet:
204 dataList1.append([ float(d) for d in lineList1[i].split()] ) # The two files are guaranteed to have the elements on
205 dataList2.append([ float(d) for d in lineList2[i].split()] ) # the same lines at this point
206 if (withinCelldata or withinPointdata) and lineList1[i].startswith('<DataArray'):
207 dataName = re.sub('" .*', '', lineList1[i])
208 dataName = re.sub('.*"', '', dataName)
209 withinDataSet = True
210 dataList1 = []
211 dataList2 = []
212 if lineList1[i].startswith('<PointData'): withinPointdata = True
213 if lineList1[i].startswith('</PointData'): withinPointdata = False
214 if lineList1[i].startswith('<CellData'): withinCelldata = True
215 if lineList1[i].startswith('</CellData'): withinCelldata = False
216
217 return True, "Your VTK files match"
218 # End of method self.saveVtkCompare
219
220 def check_vtk(self,f,reference_f):
221 success, reason = self.saveVtkCompare(os.path.join(FINLEY_WORKDIR_PATH,f), os.path.join(FINLEY_TEST_MESH_PATH,reference_f))
222 self.failUnless(success, reason)
223
224 def check_dx(self,f,reference_f):
225 out_string=open(FINLEY_WORKDIR_PATH+f).read().splitlines()
226 ref_string=open(FINLEY_TEST_MESH_PATH+reference_f).read().splitlines()
227 c=0
228 for l in range(0,len(ref_string)):
229 if not ref_string[l].strip()[0]=="#":
230 line=out_string[c].strip()
231 if os.name == "nt":
232 line=line.replace("e+00","e+0").replace("e-00","e-0")
233 line=line.replace("e-00","e+00").replace("-0.000000e+00","0.000000e+00")
234 self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in dx file does not match reference (%s)"%(c,line,ref_string[l].strip()))
235 c+=1
236
237 class Test_VTKFiles(Test_VisualizationInterface):
238 # ======================================================================================================================
239 def test_hex_2D_order2_vtk(self):
240 reference="hex_2D_o2.xml"
241 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh",optimize=False)
242 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2.xml",domain=dom)
243 self.check_vtk("hex_2D_order2.xml",reference)
244
245 def test_hex_2D_order2_AllPoints_Scalar_vtk(self):
246 reference="hex_2D_o1_node_3xs.xml"
247 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh",optimize=False)
248 x=Solution(dom).getX()
249 x_r=ReducedSolution(dom).getX()
250 x_n=ContinuousFunction(dom).getX()
251 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_AllPoints_Scalar.xml",data_r=x_r[0],data_n=x_n[0],data=x[0])
252 self.check_vtk("hex_2D_order2_AllPoints_Scalar.xml",reference)
253 def test_hex_2D_order2_02Points_Scalar_vtk(self):
254 reference="hex_2D_o2_node_2xs.xml"
255 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh",optimize=False)
256 x=Solution(dom).getX()
257 x_n=ContinuousFunction(dom).getX()
258 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_O2Points_Scalar.xml",data_n=x_n[0],data=x[0])
259 self.check_vtk("hex_2D_order2_O2Points_Scalar.xml",reference)
260 def test_hex_2D_order2_2Cells_Scalar_vtk(self):
261 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh",optimize=False)
262 x=Function(dom).getX()
263 x_b=FunctionOnBoundary(dom).getX()
264 try:
265 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_2Cells_Scalar.xml",data=x[0],data_b=x_b[0])
266 self.fail("non-matching data not detected.")
267 except StandardError:
268 pass
269 def test_hex_2D_order2_BoundaryPoint_Scalar_vtk(self):
270 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh",optimize=False)
271 x=ContinuousFunction(dom).getX()
272 x_b=FunctionOnBoundary(dom).getX()
273 try:
274 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_BoundaryPoint_Scalar.xml",data=x[0],data_b=x_b[0])
275 self.fail("non-matching data not detected.")
276 except StandardError:
277 pass
278 def test_hex_2D_order2_Cells_AllData_vtk(self):
279 reference="hex_2D_o2_cell_all.xml"
280 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh",optimize=False)
281 x=Function(dom).getX()
282 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_Cells_AllData.xml",data_s=x[0],data_v=x[0]*[1.,2.],data_t=x[0]*[[11.,12.],[21.,22.]],data_t2=x[0]*[[-11.,-12.],[-21.,-22.]])
283 self.check_vtk("hex_2D_order2_Cells_AllData.xml",reference)
284
285 def test_hex_2D_order2_CellsPoints_AllData_vtk(self):
286 reference="hex_2D_o2_cellnode_all.xml"
287 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh",optimize=False)
288 x_c=Function(dom).getX()
289 x_p=ContinuousFunction(dom).getX()
290 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_CellsPoints_AllData.xml",data_sp=x_p[0],
291 data_vp=x_p[0]*[1.,2.],
292 data_tp=x_p[0]*[[11.,12.],[21.,22.]],
293 data_sc=x_c[0],
294 data_vc=x_c[0]*[1.,2.],
295 data_tc=x_c[0]*[[11.,12.],[21.,22.]])
296 self.check_vtk("hex_2D_order2_CellsPoints_AllData.xml",reference)
297 def test_hex_2D_order2p_vtk(self):
298 reference="hex_2D_o2p.xml"
299 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
300 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2.xml",domain=dom)
301 self.check_vtk("hex_2D_order2.xml",reference)
302
303 def test_hex_2D_order2p_AllPoints_Scalar_vtk(self):
304 reference="hex_2D_o1_node_3xs.xml"
305 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
306 x=Solution(dom).getX()
307 x_r=ReducedSolution(dom).getX()
308 x_n=ContinuousFunction(dom).getX()
309 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_AllPoints_Scalar.xml",data_r=x_r[0],data_n=x_n[0],data=x[0])
310 self.check_vtk("hex_2D_order2_AllPoints_Scalar.xml",reference)
311 def test_hex_2D_order2p_02Points_Scalar_vtk(self):
312 reference="hex_2D_o2p_node_2xs.xml"
313 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
314 x=Solution(dom).getX()
315 x_n=ContinuousFunction(dom).getX()
316 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_O2Points_Scalar.xml",data_n=x_n[0],data=x[0])
317 self.check_vtk("hex_2D_order2_O2Points_Scalar.xml",reference)
318 def test_hex_2D_order2p_2Cells_Scalar_vtk(self):
319 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
320 x=Function(dom).getX()
321 x_b=FunctionOnBoundary(dom).getX()
322 try:
323 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_2Cells_Scalar.xml",data=x[0],data_b=x_b[0])
324 self.fail("non-matching data not detected.")
325 except StandardError:
326 pass
327 def test_hex_2D_order2p_BoundaryPoint_Scalar_vtk(self):
328 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
329 x=ContinuousFunction(dom).getX()
330 x_b=FunctionOnBoundary(dom).getX()
331 try:
332 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_BoundaryPoint_Scalar.xml",data=x[0],data_b=x_b[0])
333 self.fail("non-matching data not detected.")
334 except StandardError:
335 pass
336 def test_hex_2D_order2p_Cells_AllData_vtk(self):
337 reference="hex_2D_o2p_cell_all.xml"
338 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
339 x=Function(dom).getX()
340 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_Cells_AllData.xml",data_s=x[0],data_v=x[0]*[1.,2.],data_t=x[0]*[[11.,12.],[21.,22.]],data_t2=x[0]*[[-11.,-12.],[-21.,-22.]])
341 self.check_vtk("hex_2D_order2_Cells_AllData.xml",reference)
342
343 def test_hex_2D_order2p_CellsPoints_AllData_vtk(self):
344 reference="hex_2D_o2p_cellnode_all.xml"
345 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
346 x_c=Function(dom).getX()
347 x_p=ContinuousFunction(dom).getX()
348 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_CellsPoints_AllData.xml",data_sp=x_p[0],
349 data_vp=x_p[0]*[1.,2.],
350 data_tp=x_p[0]*[[11.,12.],[21.,22.]],
351 data_sc=x_c[0],
352 data_vc=x_c[0]*[1.,2.],
353 data_tc=x_c[0]*[[11.,12.],[21.,22.]])
354 self.check_vtk("hex_2D_order2_CellsPoints_AllData.xml",reference)
355 # ======================================================================================================================
356 def test_hex_contact_2D_order1_ContinuousFunction_Scalar_vtk(self):
357 reference="hex_2D_o1_node_s.xml"
358 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
359 x=ContinuousFunction(dom).getX()
360 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Scalar.xml",data=x[0])
361 self.check_vtk("hex_contact_2D_order1_ContinuousFunction_Scalar.xml",reference)
362 def test_hex_contact_2D_order1_ContinuousFunction_Vector_vtk(self):
363 reference="hex_2D_o1_node_v.xml"
364 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
365 x=ContinuousFunction(dom).getX()
366 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.])
367 self.check_vtk("hex_contact_2D_order1_ContinuousFunction_Vector.xml",reference)
368 def test_hex_contact_2D_order1_ContinuousFunction_Tensor_vtk(self):
369 reference="hex_2D_o1_node_t.xml"
370 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
371 x=ContinuousFunction(dom).getX()
372 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
373 self.check_vtk("hex_contact_2D_order1_ContinuousFunction_Tensor.xml",reference)
374 def test_hex_contact_2D_order1_Solution_Scalar_vtk(self):
375 reference="hex_2D_o1_node_s.xml"
376 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
377 x=Solution(dom).getX()
378 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Scalar.xml",data=x[0])
379 self.check_vtk("hex_contact_2D_order1_Solution_Scalar.xml",reference)
380 def test_hex_contact_2D_order1_Solution_Vector_vtk(self):
381 reference="hex_2D_o1_node_v.xml"
382 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
383 x=Solution(dom).getX()
384 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Vector.xml",data=x[0]*[1.,2.])
385 self.check_vtk("hex_contact_2D_order1_Solution_Vector.xml",reference)
386 def test_hex_contact_2D_order1_Solution_Tensor_vtk(self):
387 reference="hex_2D_o1_node_t.xml"
388 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
389 x=Solution(dom).getX()
390 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
391 self.check_vtk("hex_contact_2D_order1_Solution_Tensor.xml",reference)
392 def test_hex_contact_2D_order1_ReducedSolution_Scalar_vtk(self):
393 reference="hex_2D_o1_node_s.xml"
394 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
395 x=ReducedSolution(dom).getX()
396 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Scalar.xml",data=x[0])
397 self.check_vtk("hex_contact_2D_order1_ReducedSolution_Scalar.xml",reference)
398 def test_hex_contact_2D_order1_ReducedSolution_Vector_vtk(self):
399 reference="hex_2D_o1_node_v.xml"
400 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
401 x=ReducedSolution(dom).getX()
402 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Vector.xml",data=x[0]*[1.,2.])
403 self.check_vtk("hex_contact_2D_order1_ReducedSolution_Vector.xml",reference)
404 def test_hex_contact_2D_order1_ReducedSolution_Tensor_vtk(self):
405 reference="hex_2D_o1_node_t.xml"
406 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
407 x=ReducedSolution(dom).getX()
408 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
409 self.check_vtk("hex_contact_2D_order1_ReducedSolution_Tensor.xml",reference)
410 def test_hex_contact_2D_order1_Function_Scalar_vtk(self):
411 reference="hex_2D_o1_cell_s.xml"
412 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
413 x=Function(dom).getX()
414 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Scalar.xml",data=x[0])
415 self.check_vtk("hex_contact_2D_order1_Function_Scalar.xml",reference)
416 def test_hex_contact_2D_order1_Function_Vector_vtk(self):
417 reference="hex_2D_o1_cell_v.xml"
418 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
419 x=Function(dom).getX()
420 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Vector.xml",data=x[0]*[1.,2.])
421 self.check_vtk("hex_contact_2D_order1_Function_Vector.xml",reference)
422 def test_hex_contact_2D_order1_Function_Tensor_vtk(self):
423 reference="hex_2D_o1_cell_t.xml"
424 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
425 x=Function(dom).getX()
426 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
427 self.check_vtk("hex_contact_2D_order1_Function_Tensor.xml",reference)
428 def test_hex_contact_2D_order1_ReducedFunction_Scalar_vtk(self):
429 reference="hex_2D_o1_cell_s.xml"
430 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
431 x=ReducedFunction(dom).getX()
432 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunction_Scalar.xml",data=x[0])
433 self.check_vtk("hex_contact_2D_order1_ReducedFunction_Scalar.xml",reference)
434 def test_hex_contact_2D_order1_ReducedFunction_Vector_vtk(self):
435 reference="hex_2D_o1_cell_v.xml"
436 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
437 x=ReducedFunction(dom).getX()
438 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunction_Vector.xml",data=x[0]*[1.,2.])
439 self.check_vtk("hex_contact_2D_order1_ReducedFunction_Vector.xml",reference)
440 def test_hex_contact_2D_order1_ReducedFunction_Tensor_vtk(self):
441 reference="hex_2D_o1_cell_t.xml"
442 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
443 x=ReducedFunction(dom).getX()
444 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
445 self.check_vtk("hex_contact_2D_order1_ReducedFunction_Tensor.xml",reference)
446 def test_hex_contact_2D_order1_FunctionOnBoundary_Scalar_vtk(self):
447 reference="hex_2D_o1_boundary_s.xml"
448 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
449 x=FunctionOnBoundary(dom).getX()
450 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Scalar.xml",data=x[0])
451 self.check_vtk("hex_contact_2D_order1_FunctionOnBoundary_Scalar.xml",reference)
452 def test_hex_contact_2D_order1_FunctionOnBoundary_Vector_vtk(self):
453 reference="hex_2D_o1_boundary_v.xml"
454 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
455 x=FunctionOnBoundary(dom).getX()
456 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
457 self.check_vtk("hex_contact_2D_order1_FunctionOnBoundary_Vector.xml",reference)
458 def test_hex_contact_2D_order1_FunctionOnBoundary_Tensor_vtk(self):
459 reference="hex_2D_o1_boundary_t.xml"
460 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
461 x=FunctionOnBoundary(dom).getX()
462 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
463 self.check_vtk("hex_contact_2D_order1_FunctionOnBoundary_Tensor.xml",reference)
464 def test_hex_contact_2D_order1_ReducedFunctionOnBoundary_Scalar_vtk(self):
465 reference="hex_2D_o1_boundary_s.xml"
466 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
467 x=ReducedFunctionOnBoundary(dom).getX()
468 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
469 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnBoundary_Scalar.xml",reference)
470 def test_hex_contact_2D_order1_ReducedFunctionOnBoundary_Vector_vtk(self):
471 reference="hex_2D_o1_boundary_v.xml"
472 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
473 x=ReducedFunctionOnBoundary(dom).getX()
474 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
475 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnBoundary_Vector.xml",reference)
476 def test_hex_contact_2D_order1_ReducedFunctionOnBoundary_Tensor_vtk(self):
477 reference="hex_2D_o1_boundary_t.xml"
478 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
479 x=ReducedFunctionOnBoundary(dom).getX()
480 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
481 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnBoundary_Tensor.xml",reference)
482 def test_hex_contact_2D_order1_onFace_FunctionOnBoundary_Scalar_vtk(self):
483 reference="hex_2D_o1_f_boundary_s.xml"
484 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
485 x=FunctionOnBoundary(dom).getX()
486 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnBoundary_Scalar.xml",data=x[0])
487 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnBoundary_Scalar.xml",reference)
488 def test_hex_contact_2D_order1_onFace_FunctionOnBoundary_Vector_vtk(self):
489 reference="hex_2D_o1_f_boundary_v.xml"
490 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
491 x=FunctionOnBoundary(dom).getX()
492 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
493 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnBoundary_Vector.xml",reference)
494 def test_hex_contact_2D_order1_onFace_FunctionOnBoundary_Tensor_vtk(self):
495 reference="hex_2D_o1_f_boundary_t.xml"
496 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
497 x=FunctionOnBoundary(dom).getX()
498 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
499 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnBoundary_Tensor.xml",reference)
500 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Scalar_vtk(self):
501 reference="hex_2D_o1_f_boundary_s.xml"
502 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
503 x=ReducedFunctionOnBoundary(dom).getX()
504 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
505 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Scalar.xml",reference)
506 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Vector_vtk(self):
507 reference="hex_2D_o1_f_boundary_v.xml"
508 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
509 x=ReducedFunctionOnBoundary(dom).getX()
510 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
511 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Vector.xml",reference)
512 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Tensor_vtk(self):
513 reference="hex_2D_o1_f_boundary_t.xml"
514 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
515 x=ReducedFunctionOnBoundary(dom).getX()
516 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
517 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnBoundary_Tensor.xml",reference)
518 def test_hex_contact_2D_order1_FunctionOnContactZero_Scalar_vtk(self):
519 reference="hex_2D_o1_contact_s.xml"
520 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
521 x=FunctionOnContactZero(dom).getX()
522 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactZero_Scalar.xml",data=x[0])
523 self.check_vtk("hex_contact_2D_order1_FunctionOnContactZero_Scalar.xml",reference)
524 def test_hex_contact_2D_order1_FunctionOnContactZero_Vector_vtk(self):
525 reference="hex_2D_o1_contact_v.xml"
526 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
527 x=FunctionOnContactZero(dom).getX()
528 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
529 self.check_vtk("hex_contact_2D_order1_FunctionOnContactZero_Vector.xml",reference)
530 def test_hex_contact_2D_order1_FunctionOnContactZero_Tensor_vtk(self):
531 reference="hex_2D_o1_contact_t.xml"
532 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
533 x=FunctionOnContactZero(dom).getX()
534 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
535 self.check_vtk("hex_contact_2D_order1_FunctionOnContactZero_Tensor.xml",reference)
536 def test_hex_contact_2D_order1_ReducedFunctionOnContactZero_Scalar_vtk(self):
537 reference="hex_2D_o1_contact_s.xml"
538 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
539 x=ReducedFunctionOnContactZero(dom).getX()
540 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
541 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnContactZero_Scalar.xml",reference)
542 def test_hex_contact_2D_order1_ReducedFunctionOnContactZero_Vector_vtk(self):
543 reference="hex_2D_o1_contact_v.xml"
544 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
545 x=ReducedFunctionOnContactZero(dom).getX()
546 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
547 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnContactZero_Vector.xml",reference)
548 def test_hex_contact_2D_order1_ReducedFunctionOnContactZero_Tensor_vtk(self):
549 reference="hex_2D_o1_contact_t.xml"
550 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
551 x=ReducedFunctionOnContactZero(dom).getX()
552 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
553 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnContactZero_Tensor.xml",reference)
554 def test_hex_contact_2D_order1_onFace_FunctionOnContactZero_Scalar_vtk(self):
555 reference="hex_2D_o1_contact_s.xml"
556 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
557 x=FunctionOnContactZero(dom).getX()
558 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactZero_Scalar.xml",data=x[0])
559 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactZero_Scalar.xml",reference)
560 def test_hex_contact_2D_order1_onFace_FunctionOnContactZero_Vector_vtk(self):
561 reference="hex_2D_o1_contact_v.xml"
562 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
563 x=FunctionOnContactZero(dom).getX()
564 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
565 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactZero_Vector.xml",reference)
566 def test_hex_contact_2D_order1_onFace_FunctionOnContactZero_Tensor_vtk(self):
567 reference="hex_2D_o1_contact_t.xml"
568 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
569 x=FunctionOnContactZero(dom).getX()
570 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
571 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactZero_Tensor.xml",reference)
572 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Scalar_vtk(self):
573 reference="hex_2D_o1_contact_s.xml"
574 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
575 x=ReducedFunctionOnContactZero(dom).getX()
576 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
577 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Scalar.xml",reference)
578 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Vector_vtk(self):
579 reference="hex_2D_o1_contact_v.xml"
580 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
581 x=ReducedFunctionOnContactZero(dom).getX()
582 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
583 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Vector.xml",reference)
584 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Tensor_vtk(self):
585 reference="hex_2D_o1_contact_t.xml"
586 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
587 x=ReducedFunctionOnContactZero(dom).getX()
588 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
589 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnContactZero_Tensor.xml",reference)
590 def test_hex_contact_2D_order1_FunctionOnContactOne_Scalar_vtk(self):
591 reference="hex_2D_o1_contact_s.xml"
592 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
593 x=FunctionOnContactOne(dom).getX()
594 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactOne_Scalar.xml",data=x[0])
595 self.check_vtk("hex_contact_2D_order1_FunctionOnContactOne_Scalar.xml",reference)
596 def test_hex_contact_2D_order1_FunctionOnContactOne_Vector_vtk(self):
597 reference="hex_2D_o1_contact_v.xml"
598 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
599 x=FunctionOnContactOne(dom).getX()
600 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
601 self.check_vtk("hex_contact_2D_order1_FunctionOnContactOne_Vector.xml",reference)
602 def test_hex_contact_2D_order1_FunctionOnContactOne_Tensor_vtk(self):
603 reference="hex_2D_o1_contact_t.xml"
604 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
605 x=FunctionOnContactOne(dom).getX()
606 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
607 self.check_vtk("hex_contact_2D_order1_FunctionOnContactOne_Tensor.xml",reference)
608 def test_hex_contact_2D_order1_ReducedFunctionOnContactOne_Scalar_vtk(self):
609 reference="hex_2D_o1_contact_s.xml"
610 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
611 x=ReducedFunctionOnContactOne(dom).getX()
612 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
613 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnContactOne_Scalar.xml",reference)
614 def test_hex_contact_2D_order1_ReducedFunctionOnContactOne_Vector_vtk(self):
615 reference="hex_2D_o1_contact_v.xml"
616 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
617 x=ReducedFunctionOnContactOne(dom).getX()
618 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
619 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnContactOne_Vector.xml",reference)
620 def test_hex_contact_2D_order1_ReducedFunctionOnContactOne_Tensor_vtk(self):
621 reference="hex_2D_o1_contact_t.xml"
622 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh",optimize=False)
623 x=ReducedFunctionOnContactOne(dom).getX()
624 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
625 self.check_vtk("hex_contact_2D_order1_ReducedFunctionOnContactOne_Tensor.xml",reference)
626 def test_hex_contact_2D_order1_onFace_FunctionOnContactOne_Scalar_vtk(self):
627 reference="hex_2D_o1_contact_s.xml"
628 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
629 x=FunctionOnContactOne(dom).getX()
630 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactOne_Scalar.xml",data=x[0])
631 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactOne_Scalar.xml",reference)
632 def test_hex_contact_2D_order1_onFace_FunctionOnContactOne_Vector_vtk(self):
633 reference="hex_2D_o1_contact_v.xml"
634 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
635 x=FunctionOnContactOne(dom).getX()
636 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
637 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactOne_Vector.xml",reference)
638 def test_hex_contact_2D_order1_onFace_FunctionOnContactOne_Tensor_vtk(self):
639 reference="hex_2D_o1_contact_t.xml"
640 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
641 x=FunctionOnContactOne(dom).getX()
642 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
643 self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactOne_Tensor.xml",reference)
644 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Scalar_vtk(self):
645 reference="hex_2D_o1_contact_s.xml"
646 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
647 x=ReducedFunctionOnContactOne(dom).getX()
648 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
649 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Scalar.xml",reference)
650 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Vector_vtk(self):
651 reference="hex_2D_o1_contact_v.xml"
652 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
653 x=ReducedFunctionOnContactOne(dom).getX()
654 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
655 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Vector.xml",reference)
656 def test_hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Tensor_vtk(self):
657 reference="hex_2D_o1_contact_t.xml"
658 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh",optimize=False)
659 x=ReducedFunctionOnContactOne(dom).getX()
660 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
661 self.check_vtk("hex_contact_2D_order1_onFace_ReducedFunctionOnContactOne_Tensor.xml",reference)
662 # ======================================================================================================================
663 def test_hex_contact_2D_order2_ContinuousFunction_Scalar_vtk(self):
664 reference="hex_2D_o2_node_s.xml"
665 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
666 x=ContinuousFunction(dom).getX()
667 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Scalar.xml",data=x[0])
668 self.check_vtk("hex_contact_2D_order2_ContinuousFunction_Scalar.xml",reference)
669 def test_hex_contact_2D_order2_ContinuousFunction_Vector_vtk(self):
670 reference="hex_2D_o2_node_v.xml"
671 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
672 x=ContinuousFunction(dom).getX()
673 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.])
674 self.check_vtk("hex_contact_2D_order2_ContinuousFunction_Vector.xml",reference)
675 def test_hex_contact_2D_order2_ContinuousFunction_Tensor_vtk(self):
676 reference="hex_2D_o2_node_t.xml"
677 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
678 x=ContinuousFunction(dom).getX()
679 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
680 self.check_vtk("hex_contact_2D_order2_ContinuousFunction_Tensor.xml",reference)
681 def test_hex_contact_2D_order2_Solution_Scalar_vtk(self):
682 reference="hex_2D_o2_node_s.xml"
683 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
684 x=Solution(dom).getX()
685 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Scalar.xml",data=x[0])
686 self.check_vtk("hex_contact_2D_order2_Solution_Scalar.xml",reference)
687 def test_hex_contact_2D_order2_Solution_Vector_vtk(self):
688 reference="hex_2D_o2_node_v.xml"
689 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
690 x=Solution(dom).getX()
691 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Vector.xml",data=x[0]*[1.,2.])
692 self.check_vtk("hex_contact_2D_order2_Solution_Vector.xml",reference)
693 def test_hex_contact_2D_order2_Solution_Tensor_vtk(self):
694 reference="hex_2D_o2_node_t.xml"
695 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
696 x=Solution(dom).getX()
697 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
698 self.check_vtk("hex_contact_2D_order2_Solution_Tensor.xml",reference)
699 def test_hex_contact_2D_order2_ReducedSolution_Scalar_vtk(self):
700 reference="hex_2D_o1_node_s.xml"
701 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
702 x=ReducedSolution(dom).getX()
703 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Scalar.xml",data=x[0])
704 self.check_vtk("hex_contact_2D_order2_ReducedSolution_Scalar.xml",reference)
705 def test_hex_contact_2D_order2_ReducedSolution_Vector_vtk(self):
706 reference="hex_2D_o1_node_v.xml"
707 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
708 x=ReducedSolution(dom).getX()
709 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Vector.xml",data=x[0]*[1.,2.])
710 self.check_vtk("hex_contact_2D_order2_ReducedSolution_Vector.xml",reference)
711 def test_hex_contact_2D_order2_ReducedSolution_Tensor_vtk(self):
712 reference="hex_2D_o1_node_t.xml"
713 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
714 x=ReducedSolution(dom).getX()
715 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
716 self.check_vtk("hex_contact_2D_order2_ReducedSolution_Tensor.xml",reference)
717 def test_hex_contact_2D_order2_Function_Scalar_vtk(self):
718 reference="hex_2D_o2_cell_s.xml"
719 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
720 x=Function(dom).getX()
721 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Scalar.xml",data=x[0])
722 self.check_vtk("hex_contact_2D_order2_Function_Scalar.xml",reference)
723 def test_hex_contact_2D_order2_Function_Vector_vtk(self):
724 reference="hex_2D_o2_cell_v.xml"
725 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
726 x=Function(dom).getX()
727 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Vector.xml",data=x[0]*[1.,2.])
728 self.check_vtk("hex_contact_2D_order2_Function_Vector.xml",reference)
729 def test_hex_contact_2D_order2_Function_Tensor_vtk(self):
730 reference="hex_2D_o2_cell_t.xml"
731 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
732 x=Function(dom).getX()
733 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
734 self.check_vtk("hex_contact_2D_order2_Function_Tensor.xml",reference)
735 def test_hex_contact_2D_order2_ReducedFunction_Scalar_vtk(self):
736 reference="hex_2D_o2_cell_s.xml"
737 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
738 x=ReducedFunction(dom).getX()
739 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunction_Scalar.xml",data=x[0])
740 self.check_vtk("hex_contact_2D_order2_ReducedFunction_Scalar.xml",reference)
741 def test_hex_contact_2D_order2_ReducedFunction_Vector_vtk(self):
742 reference="hex_2D_o2_cell_v.xml"
743 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
744 x=ReducedFunction(dom).getX()
745 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunction_Vector.xml",data=x[0]*[1.,2.])
746 self.check_vtk("hex_contact_2D_order2_ReducedFunction_Vector.xml",reference)
747 def test_hex_contact_2D_order2_ReducedFunction_Tensor_vtk(self):
748 reference="hex_2D_o2_cell_t.xml"
749 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
750 x=ReducedFunction(dom).getX()
751 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
752 self.check_vtk("hex_contact_2D_order2_ReducedFunction_Tensor.xml",reference)
753 def test_hex_contact_2D_order2_FunctionOnBoundary_Scalar_vtk(self):
754 reference="hex_2D_o2_boundary_s.xml"
755 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
756 x=FunctionOnBoundary(dom).getX()
757 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Scalar.xml",data=x[0])
758 self.check_vtk("hex_contact_2D_order2_FunctionOnBoundary_Scalar.xml",reference)
759 def test_hex_contact_2D_order2_FunctionOnBoundary_Vector_vtk(self):
760 reference="hex_2D_o2_boundary_v.xml"
761 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
762 x=FunctionOnBoundary(dom).getX()
763 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
764 self.check_vtk("hex_contact_2D_order2_FunctionOnBoundary_Vector.xml",reference)
765 def test_hex_contact_2D_order2_FunctionOnBoundary_Tensor_vtk(self):
766 reference="hex_2D_o2_boundary_t.xml"
767 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
768 x=FunctionOnBoundary(dom).getX()
769 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
770 self.check_vtk("hex_contact_2D_order2_FunctionOnBoundary_Tensor.xml",reference)
771 def test_hex_contact_2D_order2_ReducedFunctionOnBoundary_Scalar_vtk(self):
772 reference="hex_2D_o2_boundary_s.xml"
773 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
774 x=ReducedFunctionOnBoundary(dom).getX()
775 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
776 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnBoundary_Scalar.xml",reference)
777 def test_hex_contact_2D_order2_ReducedFunctionOnBoundary_Vector_vtk(self):
778 reference="hex_2D_o2_boundary_v.xml"
779 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
780 x=ReducedFunctionOnBoundary(dom).getX()
781 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
782 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnBoundary_Vector.xml",reference)
783 def test_hex_contact_2D_order2_ReducedFunctionOnBoundary_Tensor_vtk(self):
784 reference="hex_2D_o2_boundary_t.xml"
785 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
786 x=ReducedFunctionOnBoundary(dom).getX()
787 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
788 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnBoundary_Tensor.xml",reference)
789 def test_hex_contact_2D_order2_onFace_FunctionOnBoundary_Scalar_vtk(self):
790 reference="hex_2D_o2_f_boundary_s.xml"
791 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
792 x=FunctionOnBoundary(dom).getX()
793 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnBoundary_Scalar.xml",data=x[0])
794 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnBoundary_Scalar.xml",reference)
795 def test_hex_contact_2D_order2_onFace_FunctionOnBoundary_Vector_vtk(self):
796 reference="hex_2D_o2_f_boundary_v.xml"
797 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
798 x=FunctionOnBoundary(dom).getX()
799 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
800 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnBoundary_Vector.xml",reference)
801 def test_hex_contact_2D_order2_onFace_FunctionOnBoundary_Tensor_vtk(self):
802 reference="hex_2D_o2_f_boundary_t.xml"
803 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
804 x=FunctionOnBoundary(dom).getX()
805 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
806 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnBoundary_Tensor.xml",reference)
807 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Scalar_vtk(self):
808 reference="hex_2D_o2_f_boundary_s.xml"
809 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
810 x=ReducedFunctionOnBoundary(dom).getX()
811 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
812 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Scalar.xml",reference)
813 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Vector_vtk(self):
814 reference="hex_2D_o2_f_boundary_v.xml"
815 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
816 x=ReducedFunctionOnBoundary(dom).getX()
817 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
818 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Vector.xml",reference)
819 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Tensor_vtk(self):
820 reference="hex_2D_o2_f_boundary_t.xml"
821 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
822 x=ReducedFunctionOnBoundary(dom).getX()
823 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
824 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnBoundary_Tensor.xml",reference)
825 def test_hex_contact_2D_order2_FunctionOnContactZero_Scalar_vtk(self):
826 reference="hex_2D_o2_contact_s.xml"
827 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
828 x=FunctionOnContactZero(dom).getX()
829 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactZero_Scalar.xml",data=x[0])
830 self.check_vtk("hex_contact_2D_order2_FunctionOnContactZero_Scalar.xml",reference)
831 def test_hex_contact_2D_order2_FunctionOnContactZero_Vector_vtk(self):
832 reference="hex_2D_o2_contact_v.xml"
833 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
834 x=FunctionOnContactZero(dom).getX()
835 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
836 self.check_vtk("hex_contact_2D_order2_FunctionOnContactZero_Vector.xml",reference)
837 def test_hex_contact_2D_order2_FunctionOnContactZero_Tensor_vtk(self):
838 reference="hex_2D_o2_contact_t.xml"
839 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
840 x=FunctionOnContactZero(dom).getX()
841 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
842 self.check_vtk("hex_contact_2D_order2_FunctionOnContactZero_Tensor.xml",reference)
843 def test_hex_contact_2D_order2_ReducedFunctionOnContactZero_Scalar_vtk(self):
844 reference="hex_2D_o2_contact_s.xml"
845 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
846 x=ReducedFunctionOnContactZero(dom).getX()
847 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
848 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnContactZero_Scalar.xml",reference)
849 def test_hex_contact_2D_order2_ReducedFunctionOnContactZero_Vector_vtk(self):
850 reference="hex_2D_o2_contact_v.xml"
851 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
852 x=ReducedFunctionOnContactZero(dom).getX()
853 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
854 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnContactZero_Vector.xml",reference)
855 def test_hex_contact_2D_order2_ReducedFunctionOnContactZero_Tensor_vtk(self):
856 reference="hex_2D_o2_contact_t.xml"
857 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
858 x=ReducedFunctionOnContactZero(dom).getX()
859 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
860 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnContactZero_Tensor.xml",reference)
861 def test_hex_contact_2D_order2_onFace_FunctionOnContactZero_Scalar_vtk(self):
862 reference="hex_2D_o2_contact_s.xml"
863 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
864 x=FunctionOnContactZero(dom).getX()
865 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactZero_Scalar.xml",data=x[0])
866 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactZero_Scalar.xml",reference)
867 def test_hex_contact_2D_order2_onFace_FunctionOnContactZero_Vector_vtk(self):
868 reference="hex_2D_o2_contact_v.xml"
869 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
870 x=FunctionOnContactZero(dom).getX()
871 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
872 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactZero_Vector.xml",reference)
873 def test_hex_contact_2D_order2_onFace_FunctionOnContactZero_Tensor_vtk(self):
874 reference="hex_2D_o2_contact_t.xml"
875 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
876 x=FunctionOnContactZero(dom).getX()
877 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
878 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactZero_Tensor.xml",reference)
879 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Scalar_vtk(self):
880 reference="hex_2D_o2_contact_s.xml"
881 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
882 x=ReducedFunctionOnContactZero(dom).getX()
883 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
884 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Scalar.xml",reference)
885 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Vector_vtk(self):
886 reference="hex_2D_o2_contact_v.xml"
887 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
888 x=ReducedFunctionOnContactZero(dom).getX()
889 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.])
890 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Vector.xml",reference)
891 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Tensor_vtk(self):
892 reference="hex_2D_o2_contact_t.xml"
893 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
894 x=ReducedFunctionOnContactZero(dom).getX()
895 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
896 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnContactZero_Tensor.xml",reference)
897 def test_hex_contact_2D_order2_FunctionOnContactOne_Scalar_vtk(self):
898 reference="hex_2D_o2_contact_s.xml"
899 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
900 x=FunctionOnContactOne(dom).getX()
901 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactOne_Scalar.xml",data=x[0])
902 self.check_vtk("hex_contact_2D_order2_FunctionOnContactOne_Scalar.xml",reference)
903 def test_hex_contact_2D_order2_FunctionOnContactOne_Vector_vtk(self):
904 reference="hex_2D_o2_contact_v.xml"
905 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
906 x=FunctionOnContactOne(dom).getX()
907 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
908 self.check_vtk("hex_contact_2D_order2_FunctionOnContactOne_Vector.xml",reference)
909 def test_hex_contact_2D_order2_FunctionOnContactOne_Tensor_vtk(self):
910 reference="hex_2D_o2_contact_t.xml"
911 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
912 x=FunctionOnContactOne(dom).getX()
913 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
914 self.check_vtk("hex_contact_2D_order2_FunctionOnContactOne_Tensor.xml",reference)
915 def test_hex_contact_2D_order2_ReducedFunctionOnContactOne_Scalar_vtk(self):
916 reference="hex_2D_o2_contact_s.xml"
917 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
918 x=ReducedFunctionOnContactOne(dom).getX()
919 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
920 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnContactOne_Scalar.xml",reference)
921 def test_hex_contact_2D_order2_ReducedFunctionOnContactOne_Vector_vtk(self):
922 reference="hex_2D_o2_contact_v.xml"
923 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
924 x=ReducedFunctionOnContactOne(dom).getX()
925 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
926 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnContactOne_Vector.xml",reference)
927 def test_hex_contact_2D_order2_ReducedFunctionOnContactOne_Tensor_vtk(self):
928 reference="hex_2D_o2_contact_t.xml"
929 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh",optimize=False)
930 x=ReducedFunctionOnContactOne(dom).getX()
931 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
932 self.check_vtk("hex_contact_2D_order2_ReducedFunctionOnContactOne_Tensor.xml",reference)
933 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Scalar_vtk(self):
934 reference="hex_2D_o2_contact_s.xml"
935 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
936 x=FunctionOnContactOne(dom).getX()
937 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactOne_Scalar.xml",data=x[0])
938 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactOne_Scalar.xml",reference)
939 def test_hex_contact_2D_order2_onFace_FunctionOnContactOne_Vector_vtk(self):
940 reference="hex_2D_o2_contact_v.xml"
941 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
942 x=FunctionOnContactOne(dom).getX()
943 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
944 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactOne_Vector.xml",reference)
945 def test_hex_contact_2D_order2_onFace_FunctionOnContactOne_Tensor_vtk(self):
946 reference="hex_2D_o2_contact_t.xml"
947 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
948 x=FunctionOnContactOne(dom).getX()
949 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
950 self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactOne_Tensor.xml",reference)
951
952 def test_hex_contact_2D_order2_onFace_ReducedReducedFunctionOnContactOne_Scalar_vtk(self):
953 reference="hex_2D_o2_contact_s.xml"
954 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
955 x=ReducedFunctionOnContactOne(dom).getX()
956 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
957 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Scalar.xml",reference)
958 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Vector_vtk(self):
959 reference="hex_2D_o2_contact_v.xml"
960 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
961 x=ReducedFunctionOnContactOne(dom).getX()
962 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.])
963 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Vector.xml",reference)
964 def test_hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Tensor_vtk(self):
965 reference="hex_2D_o2_contact_t.xml"
966 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh",optimize=False)
967 x=ReducedFunctionOnContactOne(dom).getX()
968 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
969 self.check_vtk("hex_contact_2D_order2_onFace_ReducedFunctionOnContactOne_Tensor.xml",reference)
970 # ======================================================================================================================
971 def test_hex_2D_order2p_ContinuousFunction_Scalar_vtk(self):
972 reference="hex_2D_o2p_node_s.xml"
973 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
974 x=ContinuousFunction(dom).getX()
975 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ContinuousFunction_Scalar.xml",data=x[0])
976 self.check_vtk("hex_2D_order2p_ContinuousFunction_Scalar.xml",reference)
977 def test_hex_2D_order2p_ContinuousFunction_Vector_vtk(self):
978 reference="hex_2D_o2p_node_v.xml"
979 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
980 x=ContinuousFunction(dom).getX()
981 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.])
982 self.check_vtk("hex_2D_order2p_ContinuousFunction_Vector.xml",reference)
983 def test_hex_2D_order2p_ContinuousFunction_Tensor_vtk(self):
984 reference="hex_2D_o2p_node_t.xml"
985 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
986 x=ContinuousFunction(dom).getX()
987 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
988 self.check_vtk("hex_2D_order2p_ContinuousFunction_Tensor.xml",reference)
989 def test_hex_2D_order2p_Solution_Scalar_vtk(self):
990 reference="hex_2D_o2p_node_s.xml"
991 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
992 x=Solution(dom).getX()
993 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_Solution_Scalar.xml",data=x[0])
994 self.check_vtk("hex_2D_order2p_Solution_Scalar.xml",reference)
995 def test_hex_2D_order2p_Solution_Vector_vtk(self):
996 reference="hex_2D_o2p_node_v.xml"
997 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
998 x=Solution(dom).getX()
999 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_Solution_Vector.xml",data=x[0]*[1.,2.])
1000 self.check_vtk("hex_2D_order2p_Solution_Vector.xml",reference)
1001 def test_hex_2D_order2p_Solution_Tensor_vtk(self):
1002 reference="hex_2D_o2p_node_t.xml"
1003 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1004 x=Solution(dom).getX()
1005 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_Solution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
1006 self.check_vtk("hex_2D_order2p_Solution_Tensor.xml",reference)
1007 def test_hex_2D_order2p_ReducedSolution_Scalar_vtk(self):
1008 reference="hex_2D_o2p_reduced_node_s.xml"
1009 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1010 x=ReducedSolution(dom).getX()
1011 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedSolution_Scalar.xml",data=x[0])
1012 self.check_vtk("hex_2D_order2p_ReducedSolution_Scalar.xml",reference)
1013 def test_hex_2D_order2p_ReducedSolution_Vector_vtk(self):
1014 reference="hex_2D_o2p_reduced_node_v.xml"
1015 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1016 x=ReducedSolution(dom).getX()
1017 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedSolution_Vector.xml",data=x[0]*[1.,2.])
1018 self.check_vtk("hex_2D_order2p_ReducedSolution_Vector.xml",reference)
1019 def test_hex_2D_order2p_ReducedSolution_Tensor_vtk(self):
1020 reference="hex_2D_o2p_reduced_node_t.xml"
1021 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1022 x=ReducedSolution(dom).getX()
1023 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
1024 self.check_vtk("hex_2D_order2p_ReducedSolution_Tensor.xml",reference)
1025 def test_hex_2D_order2p_Function_Scalar_vtk(self):
1026 reference="hex_2D_o2p_cell_s.xml"
1027 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1028 x=Function(dom).getX()
1029 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_Function_Scalar.xml",data=x[0])
1030 self.check_vtk("hex_2D_order2p_Function_Scalar.xml",reference)
1031 def test_hex_2D_order2p_Function_Vector_vtk(self):
1032 reference="hex_2D_o2p_cell_v.xml"
1033 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1034 x=Function(dom).getX()
1035 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_Function_Vector.xml",data=x[0]*[1.,2.])
1036 self.check_vtk("hex_2D_order2p_Function_Vector.xml",reference)
1037 def test_hex_2D_order2p_Function_Tensor_vtk(self):
1038 reference="hex_2D_o2p_cell_t.xml"
1039 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1040 x=Function(dom).getX()
1041 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_Function_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
1042 self.check_vtk("hex_2D_order2p_Function_Tensor.xml",reference)
1043 def test_hex_2D_order2p_ReducedFunction_Scalar_vtk(self):
1044 reference="hex_2D_o2p_cell_reduced_s.xml"
1045 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1046 x=ReducedFunction(dom).getX()
1047 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedFunction_Scalar.xml",data=x[0])
1048 self.check_vtk("hex_2D_order2p_ReducedFunction_Scalar.xml",reference)
1049 def test_hex_2D_order2p_ReducedFunction_Vector_vtk(self):
1050 reference="hex_2D_o2p_cell_reduced_v.xml"
1051 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1052 x=ReducedFunction(dom).getX()
1053 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedFunction_Vector.xml",data=x[0]*[1.,2.])
1054 self.check_vtk("hex_2D_order2p_ReducedFunction_Vector.xml",reference)
1055 def test_hex_2D_order2p_ReducedFunction_Tensor_vtk(self):
1056 reference="hex_2D_o2p_cell_reduced_t.xml"
1057 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1058 x=ReducedFunction(dom).getX()
1059 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
1060 self.check_vtk("hex_2D_order2p_ReducedFunction_Tensor.xml",reference)
1061 def test_hex_2D_order2p_FunctionOnBoundary_Scalar_vtk(self):
1062 reference="hex_2D_o2p_boundary_s.xml"
1063 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1064 x=FunctionOnBoundary(dom).getX()
1065 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_FunctionOnBoundary_Scalar.xml",data=x[0])
1066 self.check_vtk("hex_2D_order2p_FunctionOnBoundary_Scalar.xml",reference)
1067 def test_hex_2D_order2p_FunctionOnBoundary_Vector_vtk(self):
1068 reference="hex_2D_o2p_boundary_v.xml"
1069 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1070 x=FunctionOnBoundary(dom).getX()
1071 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
1072 self.check_vtk("hex_2D_order2p_FunctionOnBoundary_Vector.xml",reference)
1073 def test_hex_2D_order2p_FunctionOnBoundary_Tensor_vtk(self):
1074 reference="hex_2D_o2p_boundary_t.xml"
1075 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1076 x=FunctionOnBoundary(dom).getX()
1077 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
1078 self.check_vtk("hex_2D_order2p_FunctionOnBoundary_Tensor.xml",reference)
1079 def test_hex_2D_order2p_ReducedFunctionOnBoundary_Scalar_vtk(self):
1080 reference="hex_2D_o2p_boundary_reduced_s.xml"
1081 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1082 x=ReducedFunctionOnBoundary(dom).getX()
1083 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
1084 self.check_vtk("hex_2D_order2p_ReducedFunctionOnBoundary_Scalar.xml",reference)
1085 def test_hex_2D_order2p_ReducedFunctionOnBoundary_Vector_vtk(self):
1086 reference="hex_2D_o2p_boundary_reduced_v.xml"
1087 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1088 x=ReducedFunctionOnBoundary(dom).getX()
1089 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.])
1090 self.check_vtk("hex_2D_order2p_ReducedFunctionOnBoundary_Vector.xml",reference)
1091 def test_hex_2D_order2p_ReducedFunctionOnBoundary_Tensor_vtk(self):
1092 reference="hex_2D_o2p_boundary_reduced_t.xml"
1093 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2p.msh",optimize=False)
1094 x=ReducedFunctionOnBoundary(dom).getX()
1095 saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2p_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]])
1096 self.check_vtk("hex_2D_order2p_ReducedFunctionOnBoundary_Tensor.xml",reference)
1097
1098 # ======================================================================================================================
1099 def test_hex_contact_3D_order1_ContinuousFunction_Scalar_vtk(self):
1100 reference="hex_3D_o1_node_s.xml"
1101 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1102 x=ContinuousFunction(dom).getX()
1103 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Scalar.xml",data=x[0])
1104 self.check_vtk("hex_contact_3D_order1_ContinuousFunction_Scalar.xml",reference)
1105 def test_hex_contact_3D_order1_ContinuousFunction_Vector_vtk(self):
1106 reference="hex_3D_o1_node_v.xml"
1107 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1108 x=ContinuousFunction(dom).getX()
1109 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.,3.])
1110 self.check_vtk("hex_contact_3D_order1_ContinuousFunction_Vector.xml",reference)
1111 def test_hex_contact_3D_order1_ContinuousFunction_Tensor_vtk(self):
1112 reference="hex_3D_o1_node_t.xml"
1113 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1114 x=ContinuousFunction(dom).getX()
1115 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1116 self.check_vtk("hex_contact_3D_order1_ContinuousFunction_Tensor.xml",reference)
1117 def test_hex_contact_3D_order1_Solution_Scalar_vtk(self):
1118 reference="hex_3D_o1_node_s.xml"
1119 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1120 x=Solution(dom).getX()
1121 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Scalar.xml",data=x[0])
1122 self.check_vtk("hex_contact_3D_order1_Solution_Scalar.xml",reference)
1123 def test_hex_contact_3D_order1_Solution_Vector_vtk(self):
1124 reference="hex_3D_o1_node_v.xml"
1125 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1126 x=Solution(dom).getX()
1127 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Vector.xml",data=x[0]*[1.,2.,3.])
1128 self.check_vtk("hex_contact_3D_order1_Solution_Vector.xml",reference)
1129 def test_hex_contact_3D_order1_Solution_Tensor_vtk(self):
1130 reference="hex_3D_o1_node_t.xml"
1131 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1132 x=Solution(dom).getX()
1133 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1134 self.check_vtk("hex_contact_3D_order1_Solution_Tensor.xml",reference)
1135 def test_hex_contact_3D_order1_ReducedSolution_Scalar_vtk(self):
1136 reference="hex_3D_o1_node_s.xml"
1137 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1138 x=ReducedSolution(dom).getX()
1139 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Scalar.xml",data=x[0])
1140 self.check_vtk("hex_contact_3D_order1_ReducedSolution_Scalar.xml",reference)
1141 def test_hex_contact_3D_order1_ReducedSolution_Vector_vtk(self):
1142 reference="hex_3D_o1_node_v.xml"
1143 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1144 x=ReducedSolution(dom).getX()
1145 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Vector.xml",data=x[0]*[1.,2.,3.])
1146 self.check_vtk("hex_contact_3D_order1_ReducedSolution_Vector.xml",reference)
1147 def test_hex_contact_3D_order1_ReducedSolution_Tensor_vtk(self):
1148 reference="hex_3D_o1_node_t.xml"
1149 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1150 x=ReducedSolution(dom).getX()
1151 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1152 self.check_vtk("hex_contact_3D_order1_ReducedSolution_Tensor.xml",reference)
1153 def test_hex_contact_3D_order1_Function_Scalar_vtk(self):
1154 reference="hex_3D_o1_cell_s.xml"
1155 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1156 x=Function(dom).getX()
1157 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Scalar.xml",data=x[0])
1158 self.check_vtk("hex_contact_3D_order1_Function_Scalar.xml",reference)
1159 def test_hex_contact_3D_order1_Function_Vector_vtk(self):
1160 reference="hex_3D_o1_cell_v.xml"
1161 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1162 x=Function(dom).getX()
1163 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Vector.xml",data=x[0]*[1.,2.,3.])
1164 self.check_vtk("hex_contact_3D_order1_Function_Vector.xml",reference)
1165 def test_hex_contact_3D_order1_Function_Tensor_vtk(self):
1166 reference="hex_3D_o1_cell_t.xml"
1167 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1168 x=Function(dom).getX()
1169 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1170 self.check_vtk("hex_contact_3D_order1_Function_Tensor.xml",reference)
1171 def test_hex_contact_3D_order1_ReducedFunction_Scalar_vtk(self):
1172 reference="hex_3D_o1_cell_s.xml"
1173 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1174 x=ReducedFunction(dom).getX()
1175 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunction_Scalar.xml",data=x[0])
1176 self.check_vtk("hex_contact_3D_order1_ReducedFunction_Scalar.xml",reference)
1177 def test_hex_contact_3D_order1_ReducedFunction_Vector_vtk(self):
1178 reference="hex_3D_o1_cell_v.xml"
1179 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1180 x=ReducedFunction(dom).getX()
1181 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunction_Vector.xml",data=x[0]*[1.,2.,3.])
1182 self.check_vtk("hex_contact_3D_order1_ReducedFunction_Vector.xml",reference)
1183 def test_hex_contact_3D_order1_ReducedFunction_Tensor_vtk(self):
1184 reference="hex_3D_o1_cell_t.xml"
1185 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1186 x=ReducedFunction(dom).getX()
1187 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1188 self.check_vtk("hex_contact_3D_order1_ReducedFunction_Tensor.xml",reference)
1189 def test_hex_contact_3D_order1_FunctionOnBoundary_Scalar_vtk(self):
1190 reference="hex_3D_o1_boundary_s.xml"
1191 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1192 x=FunctionOnBoundary(dom).getX()
1193 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Scalar.xml",data=x[0])
1194 self.check_vtk("hex_contact_3D_order1_FunctionOnBoundary_Scalar.xml",reference)
1195 def test_hex_contact_3D_order1_FunctionOnBoundary_Vector_vtk(self):
1196 reference="hex_3D_o1_boundary_v.xml"
1197 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1198 x=FunctionOnBoundary(dom).getX()
1199 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1200 self.check_vtk("hex_contact_3D_order1_FunctionOnBoundary_Vector.xml",reference)
1201 def test_hex_contact_3D_order1_FunctionOnBoundary_Tensor_vtk(self):
1202 reference="hex_3D_o1_boundary_t.xml"
1203 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1204 x=FunctionOnBoundary(dom).getX()
1205 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1206 self.check_vtk("hex_contact_3D_order1_FunctionOnBoundary_Tensor.xml",reference)
1207 def test_hex_contact_3D_order1_ReducedFunctionOnBoundary_Scalar_vtk(self):
1208 reference="hex_3D_o1_boundary_s.xml"
1209 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1210 x=ReducedFunctionOnBoundary(dom).getX()
1211 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
1212 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnBoundary_Scalar.xml",reference)
1213 def test_hex_contact_3D_order1_ReducedFunctionOnBoundary_Vector_vtk(self):
1214 reference="hex_3D_o1_boundary_v.xml"
1215 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1216 x=ReducedFunctionOnBoundary(dom).getX()
1217 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1218 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnBoundary_Vector.xml",reference)
1219 def test_hex_contact_3D_order1_ReducedFunctionOnBoundary_Tensor_vtk(self):
1220 reference="hex_3D_o1_boundary_t.xml"
1221 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1222 x=ReducedFunctionOnBoundary(dom).getX()
1223 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1224 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnBoundary_Tensor.xml",reference)
1225 def test_hex_contact_3D_order1_onFace_FunctionOnBoundary_Scalar_vtk(self):
1226 reference="hex_3D_o1_f_boundary_s.xml"
1227 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1228 x=FunctionOnBoundary(dom).getX()
1229 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnBoundary_Scalar.xml",data=x[0])
1230 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnBoundary_Scalar.xml",reference)
1231 def test_hex_contact_3D_order1_onFace_FunctionOnBoundary_Vector_vtk(self):
1232 reference="hex_3D_o1_f_boundary_v.xml"
1233 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1234 x=FunctionOnBoundary(dom).getX()
1235 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1236 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnBoundary_Vector.xml",reference)
1237 def test_hex_contact_3D_order1_onFace_FunctionOnBoundary_Tensor_vtk(self):
1238 reference="hex_3D_o1_f_boundary_t.xml"
1239 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1240 x=FunctionOnBoundary(dom).getX()
1241 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1242 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnBoundary_Tensor.xml",reference)
1243 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Scalar_vtk(self):
1244 reference="hex_3D_o1_f_boundary_s.xml"
1245 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1246 x=ReducedFunctionOnBoundary(dom).getX()
1247 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
1248 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Scalar.xml",reference)
1249 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Vector_vtk(self):
1250 reference="hex_3D_o1_f_boundary_v.xml"
1251 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1252 x=ReducedFunctionOnBoundary(dom).getX()
1253 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1254 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Vector.xml",reference)
1255 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Tensor_vtk(self):
1256 reference="hex_3D_o1_f_boundary_t.xml"
1257 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1258 x=ReducedFunctionOnBoundary(dom).getX()
1259 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1260 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnBoundary_Tensor.xml",reference)
1261 def test_hex_contact_3D_order1_FunctionOnContactZero_Scalar_vtk(self):
1262 reference="hex_3D_o1_contact_s.xml"
1263 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1264 x=FunctionOnContactZero(dom).getX()
1265 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactZero_Scalar.xml",data=x[0])
1266 self.check_vtk("hex_contact_3D_order1_FunctionOnContactZero_Scalar.xml",reference)
1267 def test_hex_contact_3D_order1_FunctionOnContactZero_Vector_vtk(self):
1268 reference="hex_3D_o1_contact_v.xml"
1269 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1270 x=FunctionOnContactZero(dom).getX()
1271 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1272 self.check_vtk("hex_contact_3D_order1_FunctionOnContactZero_Vector.xml",reference)
1273 def test_hex_contact_3D_order1_FunctionOnContactZero_Tensor_vtk(self):
1274 reference="hex_3D_o1_contact_t.xml"
1275 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1276 x=FunctionOnContactZero(dom).getX()
1277 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1278 self.check_vtk("hex_contact_3D_order1_FunctionOnContactZero_Tensor.xml",reference)
1279 def test_hex_contact_3D_order1_ReducedFunctionOnContactZero_Scalar_vtk(self):
1280 reference="hex_3D_o1_contact_s.xml"
1281 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1282 x=ReducedFunctionOnContactZero(dom).getX()
1283 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
1284 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnContactZero_Scalar.xml",reference)
1285 def test_hex_contact_3D_order1_ReducedFunctionOnContactZero_Vector_vtk(self):
1286 reference="hex_3D_o1_contact_v.xml"
1287 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1288 x=ReducedFunctionOnContactZero(dom).getX()
1289 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1290 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnContactZero_Vector.xml",reference)
1291 def test_hex_contact_3D_order1_ReducedFunctionOnContactZero_Tensor_vtk(self):
1292 reference="hex_3D_o1_contact_t.xml"
1293 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1294 x=ReducedFunctionOnContactZero(dom).getX()
1295 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1296 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnContactZero_Tensor.xml",reference)
1297 def test_hex_contact_3D_order1_onFace_FunctionOnContactZero_Scalar_vtk(self):
1298 reference="hex_3D_o1_contact_s.xml"
1299 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1300 x=FunctionOnContactZero(dom).getX()
1301 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactZero_Scalar.xml",data=x[0])
1302 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactZero_Scalar.xml",reference)
1303 def test_hex_contact_3D_order1_onFace_FunctionOnContactZero_Vector_vtk(self):
1304 reference="hex_3D_o1_contact_v.xml"
1305 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1306 x=FunctionOnContactZero(dom).getX()
1307 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1308 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactZero_Vector.xml",reference)
1309 def test_hex_contact_3D_order1_onFace_FunctionOnContactZero_Tensor_vtk(self):
1310 reference="hex_3D_o1_contact_t.xml"
1311 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1312 x=FunctionOnContactZero(dom).getX()
1313 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1314 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactZero_Tensor.xml",reference)
1315 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Scalar_vtk(self):
1316 reference="hex_3D_o1_contact_s.xml"
1317 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1318 x=ReducedFunctionOnContactZero(dom).getX()
1319 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
1320 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Scalar.xml",reference)
1321 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Vector_vtk(self):
1322 reference="hex_3D_o1_contact_v.xml"
1323 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1324 x=ReducedFunctionOnContactZero(dom).getX()
1325 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1326 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Vector.xml",reference)
1327 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Tensor_vtk(self):
1328 reference="hex_3D_o1_contact_t.xml"
1329 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1330 x=ReducedFunctionOnContactZero(dom).getX()
1331 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1332 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnContactZero_Tensor.xml",reference)
1333 def test_hex_contact_3D_order1_FunctionOnContactOne_Scalar_vtk(self):
1334 reference="hex_3D_o1_contact_s.xml"
1335 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1336 x=FunctionOnContactOne(dom).getX()
1337 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactOne_Scalar.xml",data=x[0])
1338 self.check_vtk("hex_contact_3D_order1_FunctionOnContactOne_Scalar.xml",reference)
1339 def test_hex_contact_3D_order1_FunctionOnContactOne_Vector_vtk(self):
1340 reference="hex_3D_o1_contact_v.xml"
1341 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1342 x=FunctionOnContactOne(dom).getX()
1343 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1344 self.check_vtk("hex_contact_3D_order1_FunctionOnContactOne_Vector.xml",reference)
1345 def test_hex_contact_3D_order1_FunctionOnContactOne_Tensor_vtk(self):
1346 reference="hex_3D_o1_contact_t.xml"
1347 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1348 x=FunctionOnContactOne(dom).getX()
1349 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1350 self.check_vtk("hex_contact_3D_order1_FunctionOnContactOne_Tensor.xml",reference)
1351 def test_hex_contact_3D_order1_ReducedFunctionOnContactOne_Scalar_vtk(self):
1352 reference="hex_3D_o1_contact_s.xml"
1353 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1354 x=ReducedFunctionOnContactOne(dom).getX()
1355 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
1356 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnContactOne_Scalar.xml",reference)
1357 def test_hex_contact_3D_order1_ReducedFunctionOnContactOne_Vector_vtk(self):
1358 reference="hex_3D_o1_contact_v.xml"
1359 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1360 x=ReducedFunctionOnContactOne(dom).getX()
1361 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1362 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnContactOne_Vector.xml",reference)
1363 def test_hex_contact_3D_order1_ReducedFunctionOnContactOne_Tensor_vtk(self):
1364 reference="hex_3D_o1_contact_t.xml"
1365 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh",optimize=False)
1366 x=ReducedFunctionOnContactOne(dom).getX()
1367 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1368 self.check_vtk("hex_contact_3D_order1_ReducedFunctionOnContactOne_Tensor.xml",reference)
1369 def test_hex_contact_3D_order1_onFace_FunctionOnContactOne_Scalar_vtk(self):
1370 reference="hex_3D_o1_contact_s.xml"
1371 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1372 x=FunctionOnContactOne(dom).getX()
1373 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactOne_Scalar.xml",data=x[0])
1374 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactOne_Scalar.xml",reference)
1375 def test_hex_contact_3D_order1_onFace_FunctionOnContactOne_Vector_vtk(self):
1376 reference="hex_3D_o1_contact_v.xml"
1377 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1378 x=FunctionOnContactOne(dom).getX()
1379 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1380 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactOne_Vector.xml",reference)
1381 def test_hex_contact_3D_order1_onFace_FunctionOnContactOne_Tensor_vtk(self):
1382 reference="hex_3D_o1_contact_t.xml"
1383 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1384 x=FunctionOnContactOne(dom).getX()
1385 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1386 self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactOne_Tensor.xml",reference)
1387 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Scalar_vtk(self):
1388 reference="hex_3D_o1_contact_s.xml"
1389 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1390 x=ReducedFunctionOnContactOne(dom).getX()
1391 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
1392 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Scalar.xml",reference)
1393 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Vector_vtk(self):
1394 reference="hex_3D_o1_contact_v.xml"
1395 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1396 x=ReducedFunctionOnContactOne(dom).getX()
1397 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1398 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Vector.xml",reference)
1399 def test_hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Tensor_vtk(self):
1400 reference="hex_3D_o1_contact_t.xml"
1401 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh",optimize=False)
1402 x=ReducedFunctionOnContactOne(dom).getX()
1403 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1404 self.check_vtk("hex_contact_3D_order1_onFace_ReducedFunctionOnContactOne_Tensor.xml",reference)
1405 # ======================================================================================================================
1406 def test_hex_contact_3D_order2_ContinuousFunction_Scalar_vtk(self):
1407 reference="hex_3D_o2_node_s.xml"
1408 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1409 x=ContinuousFunction(dom).getX()
1410 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Scalar.xml",data=x[0])
1411 self.check_vtk("hex_contact_3D_order2_ContinuousFunction_Scalar.xml",reference)
1412 def test_hex_contact_3D_order2_ContinuousFunction_Vector_vtk(self):
1413 reference="hex_3D_o2_node_v.xml"
1414 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1415 x=ContinuousFunction(dom).getX()
1416 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.,3.])
1417 self.check_vtk("hex_contact_3D_order2_ContinuousFunction_Vector.xml",reference)
1418 def test_hex_contact_3D_order2_ContinuousFunction_Tensor_vtk(self):
1419 reference="hex_3D_o2_node_t.xml"
1420 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1421 x=ContinuousFunction(dom).getX()
1422 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1423 self.check_vtk("hex_contact_3D_order2_ContinuousFunction_Tensor.xml",reference)
1424 def test_hex_contact_3D_order2_Solution_Scalar_vtk(self):
1425 reference="hex_3D_o2_node_s.xml"
1426 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1427 x=Solution(dom).getX()
1428 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Scalar.xml",data=x[0])
1429 self.check_vtk("hex_contact_3D_order2_Solution_Scalar.xml",reference)
1430 def test_hex_contact_3D_order2_Solution_Vector_vtk(self):
1431 reference="hex_3D_o2_node_v.xml"
1432 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1433 x=Solution(dom).getX()
1434 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Vector.xml",data=x[0]*[1.,2.,3.])
1435 self.check_vtk("hex_contact_3D_order2_Solution_Vector.xml",reference)
1436 def test_hex_contact_3D_order2_Solution_Tensor_vtk(self):
1437 reference="hex_3D_o2_node_t.xml"
1438 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1439 x=Solution(dom).getX()
1440 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1441 self.check_vtk("hex_contact_3D_order2_Solution_Tensor.xml",reference)
1442 def test_hex_contact_3D_order2_ReducedSolution_Scalar_vtk(self):
1443 reference="hex_3D_o1_node_s.xml"
1444 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1445 x=ReducedSolution(dom).getX()
1446 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Scalar.xml",data=x[0])
1447 self.check_vtk("hex_contact_3D_order2_ReducedSolution_Scalar.xml",reference)
1448 def test_hex_contact_3D_order2_ReducedSolution_Vector_vtk(self):
1449 reference="hex_3D_o1_node_v.xml"
1450 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1451 x=ReducedSolution(dom).getX()
1452 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Vector.xml",data=x[0]*[1.,2.,3.])
1453 self.check_vtk("hex_contact_3D_order2_ReducedSolution_Vector.xml",reference)
1454 def test_hex_contact_3D_order2_ReducedSolution_Tensor_vtk(self):
1455 reference="hex_3D_o1_node_t.xml"
1456 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1457 x=ReducedSolution(dom).getX()
1458 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1459 self.check_vtk("hex_contact_3D_order2_ReducedSolution_Tensor.xml",reference)
1460 def test_hex_contact_3D_order2_Function_Scalar_vtk(self):
1461 reference="hex_3D_o2_cell_s.xml"
1462 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1463 x=Function(dom).getX()
1464 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Scalar.xml",data=x[0])
1465 self.check_vtk("hex_contact_3D_order2_Function_Scalar.xml",reference)
1466 def test_hex_contact_3D_order2_Function_Vector_vtk(self):
1467 reference="hex_3D_o2_cell_v.xml"
1468 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1469 x=Function(dom).getX()
1470 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Vector.xml",data=x[0]*[1.,2.,3.])
1471 self.check_vtk("hex_contact_3D_order2_Function_Vector.xml",reference)
1472 def test_hex_contact_3D_order2_Function_Tensor_vtk(self):
1473 reference="hex_3D_o2_cell_t.xml"
1474 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1475 x=Function(dom).getX()
1476 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1477 self.check_vtk("hex_contact_3D_order2_Function_Tensor.xml",reference)
1478 def test_hex_contact_3D_order2_ReducedFunction_Scalar_vtk(self):
1479 reference="hex_3D_o2_cell_s.xml"
1480 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1481 x=ReducedFunction(dom).getX()
1482 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunction_Scalar.xml",data=x[0])
1483 self.check_vtk("hex_contact_3D_order2_ReducedFunction_Scalar.xml",reference)
1484 def test_hex_contact_3D_order2_ReducedFunction_Vector_vtk(self):
1485 reference="hex_3D_o2_cell_v.xml"
1486 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1487 x=ReducedFunction(dom).getX()
1488 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunction_Vector.xml",data=x[0]*[1.,2.,3.])
1489 self.check_vtk("hex_contact_3D_order2_ReducedFunction_Vector.xml",reference)
1490 def test_hex_contact_3D_order2_ReducedFunction_Tensor_vtk(self):
1491 reference="hex_3D_o2_cell_t.xml"
1492 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1493 x=ReducedFunction(dom).getX()
1494 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1495 self.check_vtk("hex_contact_3D_order2_ReducedFunction_Tensor.xml",reference)
1496 def test_hex_contact_3D_order2_FunctionOnBoundary_Scalar_vtk(self):
1497 reference="hex_3D_o2_boundary_s.xml"
1498 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1499 x=FunctionOnBoundary(dom).getX()
1500 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Scalar.xml",data=x[0])
1501 self.check_vtk("hex_contact_3D_order2_FunctionOnBoundary_Scalar.xml",reference)
1502 def test_hex_contact_3D_order2_FunctionOnBoundary_Vector_vtk(self):
1503 reference="hex_3D_o2_boundary_v.xml"
1504 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1505 x=FunctionOnBoundary(dom).getX()
1506 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1507 self.check_vtk("hex_contact_3D_order2_FunctionOnBoundary_Vector.xml",reference)
1508 def test_hex_contact_3D_order2_FunctionOnBoundary_Tensor_vtk(self):
1509 reference="hex_3D_o2_boundary_t.xml"
1510 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1511 x=FunctionOnBoundary(dom).getX()
1512 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1513 self.check_vtk("hex_contact_3D_order2_FunctionOnBoundary_Tensor.xml",reference)
1514 def test_hex_contact_3D_order2_ReducedFunctionOnBoundary_Scalar_vtk(self):
1515 reference="hex_3D_o2_boundary_s.xml"
1516 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1517 x=ReducedFunctionOnBoundary(dom).getX()
1518 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
1519 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnBoundary_Scalar.xml",reference)
1520 def test_hex_contact_3D_order2_ReducedFunctionOnBoundary_Vector_vtk(self):
1521 reference="hex_3D_o2_boundary_v.xml"
1522 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1523 x=ReducedFunctionOnBoundary(dom).getX()
1524 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1525 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnBoundary_Vector.xml",reference)
1526 def test_hex_contact_3D_order2_ReducedFunctionOnBoundary_Tensor_vtk(self):
1527 reference="hex_3D_o2_boundary_t.xml"
1528 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1529 x=ReducedFunctionOnBoundary(dom).getX()
1530 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1531 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnBoundary_Tensor.xml",reference)
1532 def test_hex_contact_3D_order2_onFace_FunctionOnBoundary_Scalar_vtk(self):
1533 reference="hex_3D_o2_f_boundary_s.xml"
1534 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1535 x=FunctionOnBoundary(dom).getX()
1536 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnBoundary_Scalar.xml",data=x[0])
1537 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnBoundary_Scalar.xml",reference)
1538 def test_hex_contact_3D_order2_onFace_FunctionOnBoundary_Vector_vtk(self):
1539 reference="hex_3D_o2_f_boundary_v.xml"
1540 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1541 x=FunctionOnBoundary(dom).getX()
1542 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1543 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnBoundary_Vector.xml",reference)
1544 def test_hex_contact_3D_order2_onFace_FunctionOnBoundary_Tensor_vtk(self):
1545 reference="hex_3D_o2_f_boundary_t.xml"
1546 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1547 x=FunctionOnBoundary(dom).getX()
1548 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1549 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnBoundary_Tensor.xml",reference)
1550 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Scalar_vtk(self):
1551 reference="hex_3D_o2_f_boundary_s.xml"
1552 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1553 x=ReducedFunctionOnBoundary(dom).getX()
1554 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
1555 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Scalar.xml",reference)
1556 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Vector_vtk(self):
1557 reference="hex_3D_o2_f_boundary_v.xml"
1558 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1559 x=ReducedFunctionOnBoundary(dom).getX()
1560 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1561 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Vector.xml",reference)
1562 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Tensor_vtk(self):
1563 reference="hex_3D_o2_f_boundary_t.xml"
1564 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1565 x=ReducedFunctionOnBoundary(dom).getX()
1566 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1567 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnBoundary_Tensor.xml",reference)
1568 def test_hex_contact_3D_order2_FunctionOnContactZero_Scalar_vtk(self):
1569 reference="hex_3D_o2_contact_s.xml"
1570 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1571 x=FunctionOnContactZero(dom).getX()
1572 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactZero_Scalar.xml",data=x[0])
1573 self.check_vtk("hex_contact_3D_order2_FunctionOnContactZero_Scalar.xml",reference)
1574 def test_hex_contact_3D_order2_FunctionOnContactZero_Vector_vtk(self):
1575 reference="hex_3D_o2_contact_v.xml"
1576 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1577 x=FunctionOnContactZero(dom).getX()
1578 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1579 self.check_vtk("hex_contact_3D_order2_FunctionOnContactZero_Vector.xml",reference)
1580 def test_hex_contact_3D_order2_FunctionOnContactZero_Tensor_vtk(self):
1581 reference="hex_3D_o2_contact_t.xml"
1582 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1583 x=FunctionOnContactZero(dom).getX()
1584 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1585 self.check_vtk("hex_contact_3D_order2_FunctionOnContactZero_Tensor.xml",reference)
1586 def test_hex_contact_3D_order2_ReducedFunctionOnContactZero_Scalar_vtk(self):
1587 reference="hex_3D_o2_contact_s.xml"
1588 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1589 x=ReducedFunctionOnContactZero(dom).getX()
1590 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
1591 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnContactZero_Scalar.xml",reference)
1592 def test_hex_contact_3D_order2_ReducedFunctionOnContactZero_Vector_vtk(self):
1593 reference="hex_3D_o2_contact_v.xml"
1594 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1595 x=ReducedFunctionOnContactZero(dom).getX()
1596 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1597 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnContactZero_Vector.xml",reference)
1598 def test_hex_contact_3D_order2_ReducedFunctionOnContactZero_Tensor_vtk(self):
1599 reference="hex_3D_o2_contact_t.xml"
1600 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1601 x=ReducedFunctionOnContactZero(dom).getX()
1602 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1603 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnContactZero_Tensor.xml",reference)
1604 def test_hex_contact_3D_order2_onFace_FunctionOnContactZero_Scalar_vtk(self):
1605 reference="hex_3D_o2_contact_s.xml"
1606 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1607 x=FunctionOnContactZero(dom).getX()
1608 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactZero_Scalar.xml",data=x[0])
1609 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactZero_Scalar.xml",reference)
1610 def test_hex_contact_3D_order2_onFace_FunctionOnContactZero_Vector_vtk(self):
1611 reference="hex_3D_o2_contact_v.xml"
1612 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1613 x=FunctionOnContactZero(dom).getX()
1614 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1615 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactZero_Vector.xml",reference)
1616 def test_hex_contact_3D_order2_onFace_FunctionOnContactZero_Tensor_vtk(self):
1617 reference="hex_3D_o2_contact_t.xml"
1618 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1619 x=FunctionOnContactZero(dom).getX()
1620 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1621 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactZero_Tensor.xml",reference)
1622 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Scalar_vtk(self):
1623 reference="hex_3D_o2_contact_s.xml"
1624 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1625 x=ReducedFunctionOnContactZero(dom).getX()
1626 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Scalar.xml",data=x[0])
1627 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Scalar.xml",reference)
1628 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Vector_vtk(self):
1629 reference="hex_3D_o2_contact_v.xml"
1630 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1631 x=ReducedFunctionOnContactZero(dom).getX()
1632 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.])
1633 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Vector.xml",reference)
1634 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Tensor_vtk(self):
1635 reference="hex_3D_o2_contact_t.xml"
1636 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1637 x=ReducedFunctionOnContactZero(dom).getX()
1638 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1639 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnContactZero_Tensor.xml",reference)
1640 def test_hex_contact_3D_order2_FunctionOnContactOne_Scalar_vtk(self):
1641 reference="hex_3D_o2_contact_s.xml"
1642 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1643 x=FunctionOnContactOne(dom).getX()
1644 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactOne_Scalar.xml",data=x[0])
1645 self.check_vtk("hex_contact_3D_order2_FunctionOnContactOne_Scalar.xml",reference)
1646 def test_hex_contact_3D_order2_FunctionOnContactOne_Vector_vtk(self):
1647 reference="hex_3D_o2_contact_v.xml"
1648 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1649 x=FunctionOnContactOne(dom).getX()
1650 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1651 self.check_vtk("hex_contact_3D_order2_FunctionOnContactOne_Vector.xml",reference)
1652 def test_hex_contact_3D_order2_FunctionOnContactOne_Tensor_vtk(self):
1653 reference="hex_3D_o2_contact_t.xml"
1654 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1655 x=FunctionOnContactOne(dom).getX()
1656 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1657 self.check_vtk("hex_contact_3D_order2_FunctionOnContactOne_Tensor.xml",reference)
1658 def test_hex_contact_3D_order2_ReducedFunctionOnContactOne_Scalar_vtk(self):
1659 reference="hex_3D_o2_contact_s.xml"
1660 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1661 x=ReducedFunctionOnContactOne(dom).getX()
1662 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
1663 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnContactOne_Scalar.xml",reference)
1664 def test_hex_contact_3D_order2_ReducedFunctionOnContactOne_Vector_vtk(self):
1665 reference="hex_3D_o2_contact_v.xml"
1666 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1667 x=ReducedFunctionOnContactOne(dom).getX()
1668 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1669 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnContactOne_Vector.xml",reference)
1670 def test_hex_contact_3D_order2_ReducedFunctionOnContactOne_Tensor_vtk(self):
1671 reference="hex_3D_o2_contact_t.xml"
1672 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh",optimize=False)
1673 x=ReducedFunctionOnContactOne(dom).getX()
1674 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1675 self.check_vtk("hex_contact_3D_order2_ReducedFunctionOnContactOne_Tensor.xml",reference)
1676 def test_hex_contact_3D_order2_onFace_FunctionOnContactOne_Scalar_vtk(self):
1677 reference="hex_3D_o2_contact_s.xml"
1678 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1679 x=FunctionOnContactOne(dom).getX()
1680 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactOne_Scalar.xml",data=x[0])
1681 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactOne_Scalar.xml",reference)
1682 def test_hex_contact_3D_order2_onFace_FunctionOnContactOne_Vector_vtk(self):
1683 reference="hex_3D_o2_contact_v.xml"
1684 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1685 x=FunctionOnContactOne(dom).getX()
1686 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1687 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactOne_Vector.xml",reference)
1688 def test_hex_contact_3D_order2_onFace_FunctionOnContactOne_Tensor_vtk(self):
1689 reference="hex_3D_o2_contact_t.xml"
1690 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1691 x=FunctionOnContactOne(dom).getX()
1692 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1693 self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactOne_Tensor.xml",reference)
1694 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Scalar_vtk(self):
1695 reference="hex_3D_o2_contact_s.xml"
1696 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1697 x=ReducedFunctionOnContactOne(dom).getX()
1698 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Scalar.xml",data=x[0])
1699 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Scalar.xml",reference)
1700 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Vector_vtk(self):
1701 reference="hex_3D_o2_contact_v.xml"
1702 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1703 x=ReducedFunctionOnContactOne(dom).getX()
1704 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.])
1705 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Vector.xml",reference)
1706 def test_hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Tensor_vtk(self):
1707 reference="hex_3D_o2_contact_t.xml"
1708 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh",optimize=False)
1709 x=ReducedFunctionOnContactOne(dom).getX()
1710 saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1711 self.check_vtk("hex_contact_3D_order2_onFace_ReducedFunctionOnContactOne_Tensor.xml",reference)
1712 def test_hex_3D_order2p_ContinuousFunction_Scalar_vtk(self):
1713 reference="hex_3D_o2p_node_s.xml"
1714 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1715 x=ContinuousFunction(dom).getX()
1716 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ContinuousFunction_Scalar.xml",data=x[0])
1717 self.check_vtk("hex_3D_order2p_ContinuousFunction_Scalar.xml",reference)
1718 def test_hex_3D_order2p_ContinuousFunction_Vector_vtk(self):
1719 reference="hex_3D_o2p_node_v.xml"
1720 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1721 x=ContinuousFunction(dom).getX()
1722 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.,3.])
1723 self.check_vtk("hex_3D_order2p_ContinuousFunction_Vector.xml",reference)
1724 def test_hex_3D_order2p_ContinuousFunction_Tensor_vtk(self):
1725 reference="hex_3D_o2p_node_t.xml"
1726 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1727 x=ContinuousFunction(dom).getX()
1728 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1729 self.check_vtk("hex_3D_order2p_ContinuousFunction_Tensor.xml",reference)
1730 def test_hex_3D_order2p_Solution_Scalar_vtk(self):
1731 reference="hex_3D_o2p_node_s.xml"
1732 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1733 x=Solution(dom).getX()
1734 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_Solution_Scalar.xml",data=x[0])
1735 self.check_vtk("hex_3D_order2p_Solution_Scalar.xml",reference)
1736 def test_hex_3D_order2p_Solution_Vector_vtk(self):
1737 reference="hex_3D_o2p_node_v.xml"
1738 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1739 x=Solution(dom).getX()
1740 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_Solution_Vector.xml",data=x[0]*[1.,2.,3.])
1741 self.check_vtk("hex_3D_order2p_Solution_Vector.xml",reference)
1742 def test_hex_3D_order2p_Solution_Tensor_vtk(self):
1743 reference="hex_3D_o2p_node_t.xml"
1744 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1745 x=Solution(dom).getX()
1746 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_Solution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1747 self.check_vtk("hex_3D_order2p_Solution_Tensor.xml",reference)
1748 def test_hex_3D_order2p_ReducedSolution_Scalar_vtk(self):
1749 reference="hex_3D_o2p_reduced_node_s.xml"
1750 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1751 x=ReducedSolution(dom).getX()
1752 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedSolution_Scalar.xml",data=x[0])
1753 self.check_vtk("hex_3D_order2p_ReducedSolution_Scalar.xml",reference)
1754 def test_hex_3D_order2p_ReducedSolution_Vector_vtk(self):
1755 reference="hex_3D_o2p_reduced_node_v.xml"
1756 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1757 x=ReducedSolution(dom).getX()
1758 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedSolution_Vector.xml",data=x[0]*[1.,2.,3.])
1759 self.check_vtk("hex_3D_order2p_ReducedSolution_Vector.xml",reference)
1760 def test_hex_3D_order2p_ReducedSolution_Tensor_vtk(self):
1761 reference="hex_3D_o2p_reduced_node_t.xml"
1762 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1763 x=ReducedSolution(dom).getX()
1764 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1765 self.check_vtk("hex_3D_order2p_ReducedSolution_Tensor.xml",reference)
1766 def test_hex_3D_order2p_Function_Scalar_vtk(self):
1767 reference="hex_3D_o2p_cell_s.xml"
1768 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1769 x=Function(dom).getX()
1770 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_Function_Scalar.xml",data=x[0])
1771 self.check_vtk("hex_3D_order2p_Function_Scalar.xml",reference)
1772 def test_hex_3D_order2p_Function_Vector_vtk(self):
1773 reference="hex_3D_o2p_cell_v.xml"
1774 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1775 x=Function(dom).getX()
1776 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_Function_Vector.xml",data=x[0]*[1.,2.,3.])
1777 self.check_vtk("hex_3D_order2p_Function_Vector.xml",reference)
1778 def test_hex_3D_order2p_Function_Tensor_vtk(self):
1779 reference="hex_3D_o2p_cell_t.xml"
1780 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1781 x=Function(dom).getX()
1782 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_Function_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1783 self.check_vtk("hex_3D_order2p_Function_Tensor.xml",reference)
1784 def test_hex_3D_order2p_ReducedFunction_Scalar_vtk(self):
1785 reference="hex_3D_o2p_cell_reduced_s.xml"
1786 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1787 x=ReducedFunction(dom).getX()
1788 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedFunction_Scalar.xml",data=x[0])
1789 self.check_vtk("hex_3D_order2p_ReducedFunction_Scalar.xml",reference)
1790 def test_hex_3D_order2p_ReducedFunction_Vector_vtk(self):
1791 reference="hex_3D_o2p_cell_reduced_v.xml"
1792 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1793 x=ReducedFunction(dom).getX()
1794 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedFunction_Vector.xml",data=x[0]*[1.,2.,3.])
1795 self.check_vtk("hex_3D_order2p_ReducedFunction_Vector.xml",reference)
1796 def test_hex_3D_order2p_ReducedFunction_Tensor_vtk(self):
1797 reference="hex_3D_o2p_cell_reduced_t.xml"
1798 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1799 x=ReducedFunction(dom).getX()
1800 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1801 self.check_vtk("hex_3D_order2p_ReducedFunction_Tensor.xml",reference)
1802 def test_hex_3D_order2p_FunctionOnBoundary_Scalar_vtk(self):
1803 reference="hex_3D_o2p_boundary_s.xml"
1804 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1805 x=FunctionOnBoundary(dom).getX()
1806 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_FunctionOnBoundary_Scalar.xml",data=x[0])
1807 self.check_vtk("hex_3D_order2p_FunctionOnBoundary_Scalar.xml",reference)
1808 def test_hex_3D_order2p_FunctionOnBoundary_Vector_vtk(self):
1809 reference="hex_3D_o2p_boundary_v.xml"
1810 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1811 x=FunctionOnBoundary(dom).getX()
1812 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1813 self.check_vtk("hex_3D_order2p_FunctionOnBoundary_Vector.xml",reference)
1814 def test_hex_3D_order2p_FunctionOnBoundary_Tensor_vtk(self):
1815 reference="hex_3D_o2p_boundary_t.xml"
1816 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1817 x=FunctionOnBoundary(dom).getX()
1818 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1819 self.check_vtk("hex_3D_order2p_FunctionOnBoundary_Tensor.xml",reference)
1820 def test_hex_3D_order2p_ReducedFunctionOnBoundary_Scalar_vtk(self):
1821 reference="hex_3D_o2p_boundary_reduced_s.xml"
1822 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1823 x=ReducedFunctionOnBoundary(dom).getX()
1824 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedFunctionOnBoundary_Scalar.xml",data=x[0])
1825 self.check_vtk("hex_3D_order2p_ReducedFunctionOnBoundary_Scalar.xml",reference)
1826 def test_hex_3D_order2p_ReducedFunctionOnBoundary_Vector_vtk(self):
1827 reference="hex_3D_o2p_boundary_reduced_v.xml"
1828 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1829 x=ReducedFunctionOnBoundary(dom).getX()
1830 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedFunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.])
1831 self.check_vtk("hex_3D_order2p_ReducedFunctionOnBoundary_Vector.xml",reference)
1832 def test_hex_3D_order2p_ReducedFunctionOnBoundary_Tensor_vtk(self):
1833 reference="hex_3D_o2p_boundary_reduced_t.xml"
1834 dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_3D_order2p.msh",optimize=False)
1835 x=ReducedFunctionOnBoundary(dom).getX()
1836 saveVTK(FINLEY_WORKDIR_PATH+"hex_3D_order2p_ReducedFunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]])
1837 self.check_vtk("hex_3D_order2p_ReducedFunctionOnBoundary_Tensor.xml",reference)
1838 def test_tet_2D_order2_vtk(self):
1839 reference="tet_2D_o2.xml"
1840 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
1841 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2.xml"),domain=dom)
1842 self.check_vtk("tet_2D_order2.xml",reference)
1843
1844 def test_tet_2D_order2_AllPoints_Scalar_vtk(self):
1845 reference="tet_2D_o1_node_3xs.xml"
1846 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
1847 x=Solution(dom).getX()
1848 x_r=ReducedSolution(dom).getX()
1849 x_n=ContinuousFunction(dom).getX()
1850 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_AllPoints_Scalar.xml"),data_r=x_r[0],data_n=x_n[0],data=x[0])
1851 self.check_vtk("tet_2D_order2_AllPoints_Scalar.xml",reference)
1852 def test_tet_2D_order2_02Points_Scalar_vtk(self):
1853 reference="tet_2D_o2_node_2xs.xml"
1854 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
1855 x=Solution(dom).getX()
1856 x_n=ContinuousFunction(dom).getX()
1857 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_O2Points_Scalar.xml"),data_n=x_n[0],data=x[0])
1858 self.check_vtk("tet_2D_order2_O2Points_Scalar.xml",reference)
1859 def test_tet_2D_order2_2Cells_Scalar_vtk(self):
1860 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
1861 x=Function(dom).getX()
1862 x_b=FunctionOnBoundary(dom).getX()
1863 try:
1864 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_2Cells_Scalar.xml"),data=x[0],data_b=x_b[0])
1865 self.fail("non-matching data not detected.")
1866 except StandardError:
1867 pass
1868 def test_tet_2D_order2_BoundaryPoint_Scalar_vtk(self):
1869 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
1870 x=ContinuousFunction(dom).getX()
1871 x_b=FunctionOnBoundary(dom).getX()
1872 try:
1873 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_BoundaryPoint_Scalar.xml"),data=x[0],data_b=x_b[0])
1874 self.fail("non-matching data not detected.")
1875 except StandardError:
1876 pass
1877 def test_tet_2D_order2_Cells_AllData_vtk(self):
1878 reference="tet_2D_o2_cell_all.xml"
1879 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
1880 x=Function(dom).getX()
1881 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_Cells_AllData.xml"),data_s=x[0],data_v=x[0]*[1.,2.],data_t=x[0]*[[11.,12.],[21.,22.]],data_t2=x[0]*[[-11.,-12.],[-21.,-22.]])
1882 self.check_vtk("tet_2D_order2_Cells_AllData.xml",reference)
1883
1884 def test_tet_2D_order2_CellsPoints_AllData_vtk(self):
1885 reference="tet_2D_o2_cellnode_all.xml"
1886 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
1887 x_c=Function(dom).getX()
1888 x_p=ContinuousFunction(dom).getX()
1889 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_CellsPoints_AllData.xml"),data_sp=x_p[0],
1890 data_vp=x_p[0]*[1.,2.],
1891 data_tp=x_p[0]*[[11.,12.],[21.,22.]],
1892 data_sc=x_c[0],
1893 data_vc=x_c[0]*[1.,2.],
1894 data_tc=x_c[0]*[[11.,12.],[21.,22.]])
1895 self.check_vtk("tet_2D_order2_CellsPoints_AllData.xml",reference)
1896 # ======================================================================================================================
1897 def test_tet_2D_order1_ContinuousFunction_Scalar_vtk(self):
1898 reference="tet_2D_o1_node_s.xml"
1899 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1900 x=ContinuousFunction(dom).getX()
1901 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ContinuousFunction_Scalar.xml"),data=x[0])
1902 self.check_vtk("tet_2D_order1_ContinuousFunction_Scalar.xml",reference)
1903 def test_tet_2D_order1_ContinuousFunction_Vector_vtk(self):
1904 reference="tet_2D_o1_node_v.xml"
1905 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1906 x=ContinuousFunction(dom).getX()
1907 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ContinuousFunction_Vector.xml"),data=x[0]*[1.,2.])
1908 self.check_vtk("tet_2D_order1_ContinuousFunction_Vector.xml",reference)
1909 def test_tet_2D_order1_ContinuousFunction_Tensor_vtk(self):
1910 reference="tet_2D_o1_node_t.xml"
1911 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1912 x=ContinuousFunction(dom).getX()
1913 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ContinuousFunction_Tensor.xml"),data=x[0]*[[11.,12.],[21.,22.]])
1914 self.check_vtk("tet_2D_order1_ContinuousFunction_Tensor.xml",reference)
1915 def test_tet_2D_order1_Solution_Scalar_vtk(self):
1916 reference="tet_2D_o1_node_s.xml"
1917 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1918 x=Solution(dom).getX()
1919 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_Solution_Scalar.xml"),data=x[0])
1920 self.check_vtk("tet_2D_order1_Solution_Scalar.xml",reference)
1921 def test_tet_2D_order1_Solution_Vector_vtk(self):
1922 reference="tet_2D_o1_node_v.xml"
1923 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1924 x=Solution(dom).getX()
1925 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_Solution_Vector.xml"),data=x[0]*[1.,2.])
1926 self.check_vtk("tet_2D_order1_Solution_Vector.xml",reference)
1927 def test_tet_2D_order1_Solution_Tensor_vtk(self):
1928 reference="tet_2D_o1_node_t.xml"
1929 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1930 x=Solution(dom).getX()
1931 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_Solution_Tensor.xml"),data=x[0]*[[11.,12.],[21.,22.]])
1932 self.check_vtk("tet_2D_order1_Solution_Tensor.xml",reference)
1933 def test_tet_2D_order1_ReducedSolution_Scalar_vtk(self):
1934 reference="tet_2D_o1_node_s.xml"
1935 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1936 x=ReducedSolution(dom).getX()
1937 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedSolution_Scalar.xml"),data=x[0])
1938 self.check_vtk("tet_2D_order1_ReducedSolution_Scalar.xml",reference)
1939 def test_tet_2D_order1_ReducedSolution_Vector_vtk(self):
1940 reference="tet_2D_o1_node_v.xml"
1941 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1942 x=ReducedSolution(dom).getX()
1943 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedSolution_Vector.xml"),data=x[0]*[1.,2.])
1944 self.check_vtk("tet_2D_order1_ReducedSolution_Vector.xml",reference)
1945 def test_tet_2D_order1_ReducedSolution_Tensor_vtk(self):
1946 reference="tet_2D_o1_node_t.xml"
1947 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1948 x=ReducedSolution(dom).getX()
1949 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedSolution_Tensor.xml"),data=x[0]*[[11.,12.],[21.,22.]])
1950 self.check_vtk("tet_2D_order1_ReducedSolution_Tensor.xml",reference)
1951 def test_tet_2D_order1_Function_Scalar_vtk(self):
1952 reference="tet_2D_o1_cell_s.xml"
1953 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1954 x=Function(dom).getX()
1955 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_Function_Scalar.xml"),data=x[0])
1956 self.check_vtk("tet_2D_order1_Function_Scalar.xml",reference)
1957 def test_tet_2D_order1_Function_Vector_vtk(self):
1958 reference="tet_2D_o1_cell_v.xml"
1959 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1960 x=Function(dom).getX()
1961 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_Function_Vector.xml"),data=x[0]*[1.,2.])
1962 self.check_vtk("tet_2D_order1_Function_Vector.xml",reference)
1963 def test_tet_2D_order1_Function_Tensor_vtk(self):
1964 reference="tet_2D_o1_cell_t.xml"
1965 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1966 x=Function(dom).getX()
1967 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_Function_Tensor.xml"),data=x[0]*[[11.,12.],[21.,22.]])
1968 self.check_vtk("tet_2D_order1_Function_Tensor.xml",reference)
1969 def test_tet_2D_order1_ReducedFunction_Scalar_vtk(self):
1970 reference="tet_2D_o1_cell_s.xml"
1971 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1972 x=ReducedFunction(dom).getX()
1973 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedFunction_Scalar.xml"),data=x[0])
1974 self.check_vtk("tet_2D_order1_ReducedFunction_Scalar.xml",reference)
1975 def test_tet_2D_order1_ReducedFunction_Vector_vtk(self):
1976 reference="tet_2D_o1_cell_v.xml"
1977 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1978 x=ReducedFunction(dom).getX()
1979 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedFunction_Vector.xml"),data=x[0]*[1.,2.])
1980 self.check_vtk("tet_2D_order1_ReducedFunction_Vector.xml",reference)
1981 def test_tet_2D_order1_ReducedFunction_Tensor_vtk(self):
1982 reference="tet_2D_o1_cell_t.xml"
1983 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1984 x=ReducedFunction(dom).getX()
1985 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedFunction_Tensor.xml"),data=x[0]*[[11.,12.],[21.,22.]])
1986 self.check_vtk("tet_2D_order1_ReducedFunction_Tensor.xml",reference)
1987 def test_tet_2D_order1_FunctionOnBoundary_Scalar_vtk(self):
1988 reference="tet_2D_o1_boundary_s.xml"
1989 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1990 x=FunctionOnBoundary(dom).getX()
1991 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_FunctionOnBoundary_Scalar.xml"),data=x[0])
1992 self.check_vtk("tet_2D_order1_FunctionOnBoundary_Scalar.xml",reference)
1993 def test_tet_2D_order1_FunctionOnBoundary_Vector_vtk(self):
1994 reference="tet_2D_o1_boundary_v.xml"
1995 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
1996 x=FunctionOnBoundary(dom).getX()
1997 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_FunctionOnBoundary_Vector.xml"),data=x[0]*[1.,2.])
1998 self.check_vtk("tet_2D_order1_FunctionOnBoundary_Vector.xml",reference)
1999 def test_tet_2D_order1_FunctionOnBoundary_Tensor_vtk(self):
2000 reference="tet_2D_o1_boundary_t.xml"
2001 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
2002 x=FunctionOnBoundary(dom).getX()
2003 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_FunctionOnBoundary_Tensor.xml"),data=x[0]*[[11.,12.],[21.,22.]])
2004 self.check_vtk("tet_2D_order1_FunctionOnBoundary_Tensor.xml",reference)
2005 def test_tet_2D_order1_ReducedFunctionOnBoundary_Scalar_vtk(self):
2006 reference="tet_2D_o1_boundary_s.xml"
2007 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
2008 x=ReducedFunctionOnBoundary(dom).getX()
2009 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedFunctionOnBoundary_Scalar.xml"),data=x[0])
2010 self.check_vtk("tet_2D_order1_ReducedFunctionOnBoundary_Scalar.xml",reference)
2011 def test_tet_2D_order1_ReducedFunctionOnBoundary_Vector_vtk(self):
2012 reference="tet_2D_o1_boundary_v.xml"
2013 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
2014 x=ReducedFunctionOnBoundary(dom).getX()
2015 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedFunctionOnBoundary_Vector.xml"),data=x[0]*[1.,2.])
2016 self.check_vtk("tet_2D_order1_ReducedFunctionOnBoundary_Vector.xml",reference)
2017 def test_tet_2D_order1_ReducedFunctionOnBoundary_Tensor_vtk(self):
2018 reference="tet_2D_o1_boundary_t.xml"
2019 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
2020 x=ReducedFunctionOnBoundary(dom).getX()
2021 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order1_ReducedFunctionOnBoundary_Tensor.xml"),data=x[0]*[[11.,12.],[21.,22.]])
2022 self.check_vtk("tet_2D_order1_ReducedFunctionOnBoundary_Tensor.xml",reference)
2023 # ======================================================================================================================
2024 def test_tet_2D_order2_ContinuousFunction_Scalar_vtk(self):
2025 reference="tet_2D_o2_node_s.xml"
2026 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
2027 x=ContinuousFunction(dom).getX()
2028 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_ContinuousFunction_Scalar.xml"),data=x[0])
2029 self.check_vtk("tet_2D_order2_ContinuousFunction_Scalar.xml",reference)
2030 def test_tet_2D_order2_ContinuousFunction_Vector_vtk(self):
2031 reference="tet_2D_o2_node_v.xml"
2032 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
2033 x=ContinuousFunction(dom).getX()
2034 saveVTK(os.path.join(FINLEY_WORKDIR_PATH,"tet_2D_order2_ContinuousFunction_Vector.xml"),data=x[0]*[1.,2.])
2035 self.check_vtk("tet_2D_order2_ContinuousFunction_Vector.xml",reference)
2036 def test_tet_2D_order2_ContinuousFunction_Tensor_vtk(self):
2037 reference="tet_2D_o2_node_t.xml"
2038 dom=ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=<