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