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

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

Parent Directory Parent Directory | Revision Log Revision Log


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