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=FINLEY_TEST_DATA+"/data_meshes/" |
24 |
if os.name == "nt": |
25 |
FINLEY_TEST_MESH_PATH = 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 |
out_string=open(FINLEY_WORKDIR_PATH+f).read().splitlines() |
31 |
ref_string=open(FINLEY_TEST_MESH_PATH+reference_f).read().splitlines() |
32 |
c=0 |
33 |
for l in range(0,len(ref_string)): |
34 |
if not ref_string[l].strip()[:2]=="<!": |
35 |
self.failUnlessEqual(out_string[c].strip().replace("e-00","e+00"),ref_string[l].strip(),"line %d (%s) in vtk files does not match reference (%s)"%(c,out_string[c].strip(),ref_string[l].strip())) |
36 |
c+=1 |
37 |
|
38 |
def check_dx(self,f,reference_f): |
39 |
out_string=open(FINLEY_WORKDIR_PATH+f).read().splitlines() |
40 |
ref_string=open(FINLEY_TEST_MESH_PATH+reference_f).read().splitlines() |
41 |
c=0 |
42 |
for l in range(0,len(ref_string)): |
43 |
if not ref_string[l].strip()[0]=="#": |
44 |
self.failUnlessEqual(out_string[c].strip().replace("e-00","e+00"),ref_string[l].strip(),"line %d (%s) in dx file does not match reference (%s)"%(c,out_string[c].strip(),ref_string[l].strip())) |
45 |
c+=1 |
46 |
|
47 |
class Test_VTKFiles(Test_VisualizationInterface): |
48 |
# ====================================================================================================================== |
49 |
def test_hex_2D_order2_vtk(self): |
50 |
reference="hex_2D_o2.xml" |
51 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
52 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2.xml",domain=dom) |
53 |
self.check_vtk("hex_2D_order2.xml",reference) |
54 |
|
55 |
def test_hex_2D_order2_AllPoints_Scalar_vtk(self): |
56 |
reference="hex_2D_o1_node_3xs.xml" |
57 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
58 |
x=Solution(dom).getX() |
59 |
x_r=ReducedSolution(dom).getX() |
60 |
x_n=ContinuousFunction(dom).getX() |
61 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_AllPoints_Scalar.xml",data_r=x_r[0],data_n=x_n[0],data=x[0]) |
62 |
self.check_vtk("hex_2D_order2_AllPoints_Scalar.xml",reference) |
63 |
def test_hex_2D_order2_02Points_Scalar_vtk(self): |
64 |
reference="hex_2D_o2_node_2xs.xml" |
65 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
66 |
x=Solution(dom).getX() |
67 |
x_n=ContinuousFunction(dom).getX() |
68 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_O2Points_Scalar.xml",data_n=x_n[0],data=x[0]) |
69 |
self.check_vtk("hex_2D_order2_O2Points_Scalar.xml",reference) |
70 |
def test_hex_2D_order2_2Cells_Scalar_vtk(self): |
71 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
72 |
x=Function(dom).getX() |
73 |
x_b=FunctionOnBoundary(dom).getX() |
74 |
try: |
75 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_2Cells_Scalar.xml",data=x[0],data_b=x_b[0]) |
76 |
self.fail("non-matching data not detected.") |
77 |
except StandardError: |
78 |
pass |
79 |
def test_hex_2D_order2_BoundrayPoint_Scalar_vtk(self): |
80 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
81 |
x=ContinuousFunction(dom).getX() |
82 |
x_b=FunctionOnBoundary(dom).getX() |
83 |
try: |
84 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_BoundrayPoint_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_Cells_AllData_vtk(self): |
89 |
reference="hex_2D_o2_cell_all.xml" |
90 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
91 |
x=Function(dom).getX() |
92 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_Cells_AllData.xml",data_s=x[0],data_v=x[0]*[1.,2.],data_t=x[0]*[[11.,12.],[21.,22.]],data_t2=x[0]*[[-11.,-12.],[-21.,-22.]]) |
93 |
self.check_vtk("hex_2D_order2_Cells_AllData.xml",reference) |
94 |
|
95 |
def test_hex_2D_order2_CellsPoints_AllData_vtk(self): |
96 |
reference="hex_2D_o2_cellnode_all.xml" |
97 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
98 |
x_c=Function(dom).getX() |
99 |
x_p=ContinuousFunction(dom).getX() |
100 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_2D_order2_CellsPoints_AllData.xml",data_sp=x_p[0], |
101 |
data_vp=x_p[0]*[1.,2.], |
102 |
data_tp=x_p[0]*[[11.,12.],[21.,22.]], |
103 |
data_sc=x_c[0], |
104 |
data_vc=x_c[0]*[1.,2.], |
105 |
data_tc=x_c[0]*[[11.,12.],[21.,22.]]) |
106 |
self.check_vtk("hex_2D_order2_CellsPoints_AllData.xml",reference) |
107 |
# ====================================================================================================================== |
108 |
def test_hex_contact_2D_order1_ContinuousFunction_Scalar_vtk(self): |
109 |
reference="hex_2D_o1_node_s.xml" |
110 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
111 |
x=ContinuousFunction(dom).getX() |
112 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Scalar.xml",data=x[0]) |
113 |
self.check_vtk("hex_contact_2D_order1_ContinuousFunction_Scalar.xml",reference) |
114 |
def test_hex_contact_2D_order1_ContinuousFunction_Vector_vtk(self): |
115 |
reference="hex_2D_o1_node_v.xml" |
116 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
117 |
x=ContinuousFunction(dom).getX() |
118 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.]) |
119 |
self.check_vtk("hex_contact_2D_order1_ContinuousFunction_Vector.xml",reference) |
120 |
def test_hex_contact_2D_order1_ContinuousFunction_Tensor_vtk(self): |
121 |
reference="hex_2D_o1_node_t.xml" |
122 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
123 |
x=ContinuousFunction(dom).getX() |
124 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
125 |
self.check_vtk("hex_contact_2D_order1_ContinuousFunction_Tensor.xml",reference) |
126 |
def test_hex_contact_2D_order1_Solution_Scalar_vtk(self): |
127 |
reference="hex_2D_o1_node_s.xml" |
128 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
129 |
x=Solution(dom).getX() |
130 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Scalar.xml",data=x[0]) |
131 |
self.check_vtk("hex_contact_2D_order1_Solution_Scalar.xml",reference) |
132 |
def test_hex_contact_2D_order1_Solution_Vector_vtk(self): |
133 |
reference="hex_2D_o1_node_v.xml" |
134 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
135 |
x=Solution(dom).getX() |
136 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Vector.xml",data=x[0]*[1.,2.]) |
137 |
self.check_vtk("hex_contact_2D_order1_Solution_Vector.xml",reference) |
138 |
def test_hex_contact_2D_order1_Solution_Tensor_vtk(self): |
139 |
reference="hex_2D_o1_node_t.xml" |
140 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
141 |
x=Solution(dom).getX() |
142 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
143 |
self.check_vtk("hex_contact_2D_order1_Solution_Tensor.xml",reference) |
144 |
def test_hex_contact_2D_order1_ReducedSolution_Scalar_vtk(self): |
145 |
reference="hex_2D_o1_node_s.xml" |
146 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
147 |
x=ReducedSolution(dom).getX() |
148 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Scalar.xml",data=x[0]) |
149 |
self.check_vtk("hex_contact_2D_order1_ReducedSolution_Scalar.xml",reference) |
150 |
def test_hex_contact_2D_order1_ReducedSolution_Vector_vtk(self): |
151 |
reference="hex_2D_o1_node_v.xml" |
152 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
153 |
x=ReducedSolution(dom).getX() |
154 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Vector.xml",data=x[0]*[1.,2.]) |
155 |
self.check_vtk("hex_contact_2D_order1_ReducedSolution_Vector.xml",reference) |
156 |
def test_hex_contact_2D_order1_ReducedSolution_Tensor_vtk(self): |
157 |
reference="hex_2D_o1_node_t.xml" |
158 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
159 |
x=ReducedSolution(dom).getX() |
160 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
161 |
self.check_vtk("hex_contact_2D_order1_ReducedSolution_Tensor.xml",reference) |
162 |
def test_hex_contact_2D_order1_Function_Scalar_vtk(self): |
163 |
reference="hex_2D_o1_cell_s.xml" |
164 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
165 |
x=Function(dom).getX() |
166 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Scalar.xml",data=x[0]) |
167 |
self.check_vtk("hex_contact_2D_order1_Function_Scalar.xml",reference) |
168 |
def test_hex_contact_2D_order1_Function_Vector_vtk(self): |
169 |
reference="hex_2D_o1_cell_v.xml" |
170 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
171 |
x=Function(dom).getX() |
172 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Vector.xml",data=x[0]*[1.,2.]) |
173 |
self.check_vtk("hex_contact_2D_order1_Function_Vector.xml",reference) |
174 |
def test_hex_contact_2D_order1_Function_Tensor_vtk(self): |
175 |
reference="hex_2D_o1_cell_t.xml" |
176 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
177 |
x=Function(dom).getX() |
178 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
179 |
self.check_vtk("hex_contact_2D_order1_Function_Tensor.xml",reference) |
180 |
def test_hex_contact_2D_order1_FunctionOnBoundary_Scalar_vtk(self): |
181 |
reference="hex_2D_o1_boundary_s.xml" |
182 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
183 |
x=FunctionOnBoundary(dom).getX() |
184 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Scalar.xml",data=x[0]) |
185 |
self.check_vtk("hex_contact_2D_order1_FunctionOnBoundary_Scalar.xml",reference) |
186 |
def test_hex_contact_2D_order1_FunctionOnBoundary_Vector_vtk(self): |
187 |
reference="hex_2D_o1_boundary_v.xml" |
188 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
189 |
x=FunctionOnBoundary(dom).getX() |
190 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.]) |
191 |
self.check_vtk("hex_contact_2D_order1_FunctionOnBoundary_Vector.xml",reference) |
192 |
def test_hex_contact_2D_order1_FunctionOnBoundary_Tensor_vtk(self): |
193 |
reference="hex_2D_o1_boundary_t.xml" |
194 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
195 |
x=FunctionOnBoundary(dom).getX() |
196 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
197 |
self.check_vtk("hex_contact_2D_order1_FunctionOnBoundary_Tensor.xml",reference) |
198 |
def test_hex_contact_2D_order1_onFace_FunctionOnBoundary_Scalar_vtk(self): |
199 |
reference="hex_2D_o1_f_boundary_s.xml" |
200 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
201 |
x=FunctionOnBoundary(dom).getX() |
202 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnBoundary_Scalar.xml",data=x[0]) |
203 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnBoundary_Scalar.xml",reference) |
204 |
def test_hex_contact_2D_order1_onFace_FunctionOnBoundary_Vector_vtk(self): |
205 |
reference="hex_2D_o1_f_boundary_v.xml" |
206 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
207 |
x=FunctionOnBoundary(dom).getX() |
208 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.]) |
209 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnBoundary_Vector.xml",reference) |
210 |
def test_hex_contact_2D_order1_onFace_FunctionOnBoundary_Tensor_vtk(self): |
211 |
reference="hex_2D_o1_f_boundary_t.xml" |
212 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
213 |
x=FunctionOnBoundary(dom).getX() |
214 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
215 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnBoundary_Tensor.xml",reference) |
216 |
def test_hex_contact_2D_order1_FunctionOnContactZero_Scalar_vtk(self): |
217 |
reference="hex_2D_o1_contact_s.xml" |
218 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
219 |
x=FunctionOnContactZero(dom).getX() |
220 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactZero_Scalar.xml",data=x[0]) |
221 |
self.check_vtk("hex_contact_2D_order1_FunctionOnContactZero_Scalar.xml",reference) |
222 |
def test_hex_contact_2D_order1_FunctionOnContactZero_Vector_vtk(self): |
223 |
reference="hex_2D_o1_contact_v.xml" |
224 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
225 |
x=FunctionOnContactZero(dom).getX() |
226 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.]) |
227 |
self.check_vtk("hex_contact_2D_order1_FunctionOnContactZero_Vector.xml",reference) |
228 |
def test_hex_contact_2D_order1_FunctionOnContactZero_Tensor_vtk(self): |
229 |
reference="hex_2D_o1_contact_t.xml" |
230 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
231 |
x=FunctionOnContactZero(dom).getX() |
232 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
233 |
self.check_vtk("hex_contact_2D_order1_FunctionOnContactZero_Tensor.xml",reference) |
234 |
def test_hex_contact_2D_order1_onFace_FunctionOnContactZero_Scalar_vtk(self): |
235 |
reference="hex_2D_o1_contact_s.xml" |
236 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
237 |
x=FunctionOnContactZero(dom).getX() |
238 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactZero_Scalar.xml",data=x[0]) |
239 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactZero_Scalar.xml",reference) |
240 |
def test_hex_contact_2D_order1_onFace_FunctionOnContactZero_Vector_vtk(self): |
241 |
reference="hex_2D_o1_contact_v.xml" |
242 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
243 |
x=FunctionOnContactZero(dom).getX() |
244 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.]) |
245 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactZero_Vector.xml",reference) |
246 |
def test_hex_contact_2D_order1_onFace_FunctionOnContactZero_Tensor_vtk(self): |
247 |
reference="hex_2D_o1_contact_t.xml" |
248 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
249 |
x=FunctionOnContactZero(dom).getX() |
250 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
251 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactZero_Tensor.xml",reference) |
252 |
def test_hex_contact_2D_order1_FunctionOnContactOne_Scalar_vtk(self): |
253 |
reference="hex_2D_o1_contact_s.xml" |
254 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
255 |
x=FunctionOnContactOne(dom).getX() |
256 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactOne_Scalar.xml",data=x[0]) |
257 |
self.check_vtk("hex_contact_2D_order1_FunctionOnContactOne_Scalar.xml",reference) |
258 |
def test_hex_contact_2D_order1_FunctionOnContactOne_Vector_vtk(self): |
259 |
reference="hex_2D_o1_contact_v.xml" |
260 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
261 |
x=FunctionOnContactOne(dom).getX() |
262 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.]) |
263 |
self.check_vtk("hex_contact_2D_order1_FunctionOnContactOne_Vector.xml",reference) |
264 |
def test_hex_contact_2D_order1_FunctionOnContactOne_Tensor_vtk(self): |
265 |
reference="hex_2D_o1_contact_t.xml" |
266 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
267 |
x=FunctionOnContactOne(dom).getX() |
268 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
269 |
self.check_vtk("hex_contact_2D_order1_FunctionOnContactOne_Tensor.xml",reference) |
270 |
def test_hex_contact_2D_order1_onFace_FunctionOnContactOne_Scalar_vtk(self): |
271 |
reference="hex_2D_o1_contact_s.xml" |
272 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
273 |
x=FunctionOnContactOne(dom).getX() |
274 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactOne_Scalar.xml",data=x[0]) |
275 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactOne_Scalar.xml",reference) |
276 |
def test_hex_contact_2D_order1_onFace_FunctionOnContactOne_Vector_vtk(self): |
277 |
reference="hex_2D_o1_contact_v.xml" |
278 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
279 |
x=FunctionOnContactOne(dom).getX() |
280 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.]) |
281 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactOne_Vector.xml",reference) |
282 |
def test_hex_contact_2D_order1_onFace_FunctionOnContactOne_Tensor_vtk(self): |
283 |
reference="hex_2D_o1_contact_t.xml" |
284 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1_onFace.msh") |
285 |
x=FunctionOnContactOne(dom).getX() |
286 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
287 |
self.check_vtk("hex_contact_2D_order1_onFace_FunctionOnContactOne_Tensor.xml",reference) |
288 |
# ====================================================================================================================== |
289 |
def test_hex_contact_2D_order2_ContinuousFunction_Scalar_vtk(self): |
290 |
reference="hex_2D_o2_node_s.xml" |
291 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
292 |
x=ContinuousFunction(dom).getX() |
293 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Scalar.xml",data=x[0]) |
294 |
self.check_vtk("hex_contact_2D_order2_ContinuousFunction_Scalar.xml",reference) |
295 |
def test_hex_contact_2D_order2_ContinuousFunction_Vector_vtk(self): |
296 |
reference="hex_2D_o2_node_v.xml" |
297 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
298 |
x=ContinuousFunction(dom).getX() |
299 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.]) |
300 |
self.check_vtk("hex_contact_2D_order2_ContinuousFunction_Vector.xml",reference) |
301 |
def test_hex_contact_2D_order2_ContinuousFunction_Tensor_vtk(self): |
302 |
reference="hex_2D_o2_node_t.xml" |
303 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
304 |
x=ContinuousFunction(dom).getX() |
305 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
306 |
self.check_vtk("hex_contact_2D_order2_ContinuousFunction_Tensor.xml",reference) |
307 |
def test_hex_contact_2D_order2_Solution_Scalar_vtk(self): |
308 |
reference="hex_2D_o2_node_s.xml" |
309 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
310 |
x=Solution(dom).getX() |
311 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Scalar.xml",data=x[0]) |
312 |
self.check_vtk("hex_contact_2D_order2_Solution_Scalar.xml",reference) |
313 |
def test_hex_contact_2D_order2_Solution_Vector_vtk(self): |
314 |
reference="hex_2D_o2_node_v.xml" |
315 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
316 |
x=Solution(dom).getX() |
317 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Vector.xml",data=x[0]*[1.,2.]) |
318 |
self.check_vtk("hex_contact_2D_order2_Solution_Vector.xml",reference) |
319 |
def test_hex_contact_2D_order2_Solution_Tensor_vtk(self): |
320 |
reference="hex_2D_o2_node_t.xml" |
321 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
322 |
x=Solution(dom).getX() |
323 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
324 |
self.check_vtk("hex_contact_2D_order2_Solution_Tensor.xml",reference) |
325 |
def test_hex_contact_2D_order2_ReducedSolution_Scalar_vtk(self): |
326 |
reference="hex_2D_o1_node_s.xml" |
327 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
328 |
x=ReducedSolution(dom).getX() |
329 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Scalar.xml",data=x[0]) |
330 |
self.check_vtk("hex_contact_2D_order2_ReducedSolution_Scalar.xml",reference) |
331 |
def test_hex_contact_2D_order2_ReducedSolution_Vector_vtk(self): |
332 |
reference="hex_2D_o1_node_v.xml" |
333 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
334 |
x=ReducedSolution(dom).getX() |
335 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Vector.xml",data=x[0]*[1.,2.]) |
336 |
self.check_vtk("hex_contact_2D_order2_ReducedSolution_Vector.xml",reference) |
337 |
def test_hex_contact_2D_order2_ReducedSolution_Tensor_vtk(self): |
338 |
reference="hex_2D_o1_node_t.xml" |
339 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
340 |
x=ReducedSolution(dom).getX() |
341 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
342 |
self.check_vtk("hex_contact_2D_order2_ReducedSolution_Tensor.xml",reference) |
343 |
def test_hex_contact_2D_order2_Function_Scalar_vtk(self): |
344 |
reference="hex_2D_o2_cell_s.xml" |
345 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
346 |
x=Function(dom).getX() |
347 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Scalar.xml",data=x[0]) |
348 |
self.check_vtk("hex_contact_2D_order2_Function_Scalar.xml",reference) |
349 |
def test_hex_contact_2D_order2_Function_Vector_vtk(self): |
350 |
reference="hex_2D_o2_cell_v.xml" |
351 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
352 |
x=Function(dom).getX() |
353 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Vector.xml",data=x[0]*[1.,2.]) |
354 |
self.check_vtk("hex_contact_2D_order2_Function_Vector.xml",reference) |
355 |
def test_hex_contact_2D_order2_Function_Tensor_vtk(self): |
356 |
reference="hex_2D_o2_cell_t.xml" |
357 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
358 |
x=Function(dom).getX() |
359 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
360 |
self.check_vtk("hex_contact_2D_order2_Function_Tensor.xml",reference) |
361 |
def test_hex_contact_2D_order2_FunctionOnBoundary_Scalar_vtk(self): |
362 |
reference="hex_2D_o2_boundary_s.xml" |
363 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
364 |
x=FunctionOnBoundary(dom).getX() |
365 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Scalar.xml",data=x[0]) |
366 |
self.check_vtk("hex_contact_2D_order2_FunctionOnBoundary_Scalar.xml",reference) |
367 |
def test_hex_contact_2D_order2_FunctionOnBoundary_Vector_vtk(self): |
368 |
reference="hex_2D_o2_boundary_v.xml" |
369 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
370 |
x=FunctionOnBoundary(dom).getX() |
371 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.]) |
372 |
self.check_vtk("hex_contact_2D_order2_FunctionOnBoundary_Vector.xml",reference) |
373 |
def test_hex_contact_2D_order2_FunctionOnBoundary_Tensor_vtk(self): |
374 |
reference="hex_2D_o2_boundary_t.xml" |
375 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
376 |
x=FunctionOnBoundary(dom).getX() |
377 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
378 |
self.check_vtk("hex_contact_2D_order2_FunctionOnBoundary_Tensor.xml",reference) |
379 |
def test_hex_contact_2D_order2_onFace_FunctionOnBoundary_Scalar_vtk(self): |
380 |
reference="hex_2D_o2_f_boundary_s.xml" |
381 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
382 |
x=FunctionOnBoundary(dom).getX() |
383 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnBoundary_Scalar.xml",data=x[0]) |
384 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnBoundary_Scalar.xml",reference) |
385 |
def test_hex_contact_2D_order2_onFace_FunctionOnBoundary_Vector_vtk(self): |
386 |
reference="hex_2D_o2_f_boundary_v.xml" |
387 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
388 |
x=FunctionOnBoundary(dom).getX() |
389 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.]) |
390 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnBoundary_Vector.xml",reference) |
391 |
def test_hex_contact_2D_order2_onFace_FunctionOnBoundary_Tensor_vtk(self): |
392 |
reference="hex_2D_o2_f_boundary_t.xml" |
393 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
394 |
x=FunctionOnBoundary(dom).getX() |
395 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
396 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnBoundary_Tensor.xml",reference) |
397 |
def test_hex_contact_2D_order2_FunctionOnContactZero_Scalar_vtk(self): |
398 |
reference="hex_2D_o2_contact_s.xml" |
399 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
400 |
x=FunctionOnContactZero(dom).getX() |
401 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactZero_Scalar.xml",data=x[0]) |
402 |
self.check_vtk("hex_contact_2D_order2_FunctionOnContactZero_Scalar.xml",reference) |
403 |
def test_hex_contact_2D_order2_FunctionOnContactZero_Vector_vtk(self): |
404 |
reference="hex_2D_o2_contact_v.xml" |
405 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
406 |
x=FunctionOnContactZero(dom).getX() |
407 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.]) |
408 |
self.check_vtk("hex_contact_2D_order2_FunctionOnContactZero_Vector.xml",reference) |
409 |
def test_hex_contact_2D_order2_FunctionOnContactZero_Tensor_vtk(self): |
410 |
reference="hex_2D_o2_contact_t.xml" |
411 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
412 |
x=FunctionOnContactZero(dom).getX() |
413 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
414 |
self.check_vtk("hex_contact_2D_order2_FunctionOnContactZero_Tensor.xml",reference) |
415 |
def test_hex_contact_2D_order2_onFace_FunctionOnContactZero_Scalar_vtk(self): |
416 |
reference="hex_2D_o2_contact_s.xml" |
417 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
418 |
x=FunctionOnContactZero(dom).getX() |
419 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactZero_Scalar.xml",data=x[0]) |
420 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactZero_Scalar.xml",reference) |
421 |
def test_hex_contact_2D_order2_onFace_FunctionOnContactZero_Vector_vtk(self): |
422 |
reference="hex_2D_o2_contact_v.xml" |
423 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
424 |
x=FunctionOnContactZero(dom).getX() |
425 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.]) |
426 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactZero_Vector.xml",reference) |
427 |
def test_hex_contact_2D_order2_onFace_FunctionOnContactZero_Tensor_vtk(self): |
428 |
reference="hex_2D_o2_contact_t.xml" |
429 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
430 |
x=FunctionOnContactZero(dom).getX() |
431 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
432 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactZero_Tensor.xml",reference) |
433 |
def test_hex_contact_2D_order2_FunctionOnContactOne_Scalar_vtk(self): |
434 |
reference="hex_2D_o2_contact_s.xml" |
435 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
436 |
x=FunctionOnContactOne(dom).getX() |
437 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactOne_Scalar.xml",data=x[0]) |
438 |
self.check_vtk("hex_contact_2D_order2_FunctionOnContactOne_Scalar.xml",reference) |
439 |
def test_hex_contact_2D_order2_FunctionOnContactOne_Vector_vtk(self): |
440 |
reference="hex_2D_o2_contact_v.xml" |
441 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
442 |
x=FunctionOnContactOne(dom).getX() |
443 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.]) |
444 |
self.check_vtk("hex_contact_2D_order2_FunctionOnContactOne_Vector.xml",reference) |
445 |
def test_hex_contact_2D_order2_FunctionOnContactOne_Tensor_vtk(self): |
446 |
reference="hex_2D_o2_contact_t.xml" |
447 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
448 |
x=FunctionOnContactOne(dom).getX() |
449 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
450 |
self.check_vtk("hex_contact_2D_order2_FunctionOnContactOne_Tensor.xml",reference) |
451 |
def test_hex_contact_2D_order2_onFace_FunctionOnContactOne_Scalar_vtk(self): |
452 |
reference="hex_2D_o2_contact_s.xml" |
453 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
454 |
x=FunctionOnContactOne(dom).getX() |
455 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactOne_Scalar.xml",data=x[0]) |
456 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactOne_Scalar.xml",reference) |
457 |
def test_hex_contact_2D_order2_onFace_FunctionOnContactOne_Vector_vtk(self): |
458 |
reference="hex_2D_o2_contact_v.xml" |
459 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
460 |
x=FunctionOnContactOne(dom).getX() |
461 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.]) |
462 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactOne_Vector.xml",reference) |
463 |
def test_hex_contact_2D_order2_onFace_FunctionOnContactOne_Tensor_vtk(self): |
464 |
reference="hex_2D_o2_contact_t.xml" |
465 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2_onFace.msh") |
466 |
x=FunctionOnContactOne(dom).getX() |
467 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.],[21.,22.]]) |
468 |
self.check_vtk("hex_contact_2D_order2_onFace_FunctionOnContactOne_Tensor.xml",reference) |
469 |
|
470 |
|
471 |
# ====================================================================================================================== |
472 |
def test_hex_contact_3D_order1_ContinuousFunction_Scalar_vtk(self): |
473 |
reference="hex_3D_o1_node_s.xml" |
474 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
475 |
x=ContinuousFunction(dom).getX() |
476 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Scalar.xml",data=x[0]) |
477 |
self.check_vtk("hex_contact_3D_order1_ContinuousFunction_Scalar.xml",reference) |
478 |
def test_hex_contact_3D_order1_ContinuousFunction_Vector_vtk(self): |
479 |
reference="hex_3D_o1_node_v.xml" |
480 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
481 |
x=ContinuousFunction(dom).getX() |
482 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.,3.]) |
483 |
self.check_vtk("hex_contact_3D_order1_ContinuousFunction_Vector.xml",reference) |
484 |
def test_hex_contact_3D_order1_ContinuousFunction_Tensor_vtk(self): |
485 |
reference="hex_3D_o1_node_t.xml" |
486 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
487 |
x=ContinuousFunction(dom).getX() |
488 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
489 |
self.check_vtk("hex_contact_3D_order1_ContinuousFunction_Tensor.xml",reference) |
490 |
def test_hex_contact_3D_order1_Solution_Scalar_vtk(self): |
491 |
reference="hex_3D_o1_node_s.xml" |
492 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
493 |
x=Solution(dom).getX() |
494 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Scalar.xml",data=x[0]) |
495 |
self.check_vtk("hex_contact_3D_order1_Solution_Scalar.xml",reference) |
496 |
def test_hex_contact_3D_order1_Solution_Vector_vtk(self): |
497 |
reference="hex_3D_o1_node_v.xml" |
498 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
499 |
x=Solution(dom).getX() |
500 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Vector.xml",data=x[0]*[1.,2.,3.]) |
501 |
self.check_vtk("hex_contact_3D_order1_Solution_Vector.xml",reference) |
502 |
def test_hex_contact_3D_order1_Solution_Tensor_vtk(self): |
503 |
reference="hex_3D_o1_node_t.xml" |
504 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
505 |
x=Solution(dom).getX() |
506 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
507 |
self.check_vtk("hex_contact_3D_order1_Solution_Tensor.xml",reference) |
508 |
def test_hex_contact_3D_order1_ReducedSolution_Scalar_vtk(self): |
509 |
reference="hex_3D_o1_node_s.xml" |
510 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
511 |
x=ReducedSolution(dom).getX() |
512 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Scalar.xml",data=x[0]) |
513 |
self.check_vtk("hex_contact_3D_order1_ReducedSolution_Scalar.xml",reference) |
514 |
def test_hex_contact_3D_order1_ReducedSolution_Vector_vtk(self): |
515 |
reference="hex_3D_o1_node_v.xml" |
516 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
517 |
x=ReducedSolution(dom).getX() |
518 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Vector.xml",data=x[0]*[1.,2.,3.]) |
519 |
self.check_vtk("hex_contact_3D_order1_ReducedSolution_Vector.xml",reference) |
520 |
def test_hex_contact_3D_order1_ReducedSolution_Tensor_vtk(self): |
521 |
reference="hex_3D_o1_node_t.xml" |
522 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
523 |
x=ReducedSolution(dom).getX() |
524 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
525 |
self.check_vtk("hex_contact_3D_order1_ReducedSolution_Tensor.xml",reference) |
526 |
def test_hex_contact_3D_order1_Function_Scalar_vtk(self): |
527 |
reference="hex_3D_o1_cell_s.xml" |
528 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
529 |
x=Function(dom).getX() |
530 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Scalar.xml",data=x[0]) |
531 |
self.check_vtk("hex_contact_3D_order1_Function_Scalar.xml",reference) |
532 |
def test_hex_contact_3D_order1_Function_Vector_vtk(self): |
533 |
reference="hex_3D_o1_cell_v.xml" |
534 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
535 |
x=Function(dom).getX() |
536 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Vector.xml",data=x[0]*[1.,2.,3.]) |
537 |
self.check_vtk("hex_contact_3D_order1_Function_Vector.xml",reference) |
538 |
def test_hex_contact_3D_order1_Function_Tensor_vtk(self): |
539 |
reference="hex_3D_o1_cell_t.xml" |
540 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
541 |
x=Function(dom).getX() |
542 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
543 |
self.check_vtk("hex_contact_3D_order1_Function_Tensor.xml",reference) |
544 |
def test_hex_contact_3D_order1_FunctionOnBoundary_Scalar_vtk(self): |
545 |
reference="hex_3D_o1_boundary_s.xml" |
546 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
547 |
x=FunctionOnBoundary(dom).getX() |
548 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Scalar.xml",data=x[0]) |
549 |
self.check_vtk("hex_contact_3D_order1_FunctionOnBoundary_Scalar.xml",reference) |
550 |
def test_hex_contact_3D_order1_FunctionOnBoundary_Vector_vtk(self): |
551 |
reference="hex_3D_o1_boundary_v.xml" |
552 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
553 |
x=FunctionOnBoundary(dom).getX() |
554 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.]) |
555 |
self.check_vtk("hex_contact_3D_order1_FunctionOnBoundary_Vector.xml",reference) |
556 |
def test_hex_contact_3D_order1_FunctionOnBoundary_Tensor_vtk(self): |
557 |
reference="hex_3D_o1_boundary_t.xml" |
558 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
559 |
x=FunctionOnBoundary(dom).getX() |
560 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
561 |
self.check_vtk("hex_contact_3D_order1_FunctionOnBoundary_Tensor.xml",reference) |
562 |
def test_hex_contact_3D_order1_onFace_FunctionOnBoundary_Scalar_vtk(self): |
563 |
reference="hex_3D_o1_f_boundary_s.xml" |
564 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
565 |
x=FunctionOnBoundary(dom).getX() |
566 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnBoundary_Scalar.xml",data=x[0]) |
567 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnBoundary_Scalar.xml",reference) |
568 |
def test_hex_contact_3D_order1_onFace_FunctionOnBoundary_Vector_vtk(self): |
569 |
reference="hex_3D_o1_f_boundary_v.xml" |
570 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
571 |
x=FunctionOnBoundary(dom).getX() |
572 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.]) |
573 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnBoundary_Vector.xml",reference) |
574 |
def test_hex_contact_3D_order1_onFace_FunctionOnBoundary_Tensor_vtk(self): |
575 |
reference="hex_3D_o1_f_boundary_t.xml" |
576 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
577 |
x=FunctionOnBoundary(dom).getX() |
578 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
579 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnBoundary_Tensor.xml",reference) |
580 |
def test_hex_contact_3D_order1_FunctionOnContactZero_Scalar_vtk(self): |
581 |
reference="hex_3D_o1_contact_s.xml" |
582 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
583 |
x=FunctionOnContactZero(dom).getX() |
584 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactZero_Scalar.xml",data=x[0]) |
585 |
self.check_vtk("hex_contact_3D_order1_FunctionOnContactZero_Scalar.xml",reference) |
586 |
def test_hex_contact_3D_order1_FunctionOnContactZero_Vector_vtk(self): |
587 |
reference="hex_3D_o1_contact_v.xml" |
588 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
589 |
x=FunctionOnContactZero(dom).getX() |
590 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.]) |
591 |
self.check_vtk("hex_contact_3D_order1_FunctionOnContactZero_Vector.xml",reference) |
592 |
def test_hex_contact_3D_order1_FunctionOnContactZero_Tensor_vtk(self): |
593 |
reference="hex_3D_o1_contact_t.xml" |
594 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
595 |
x=FunctionOnContactZero(dom).getX() |
596 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
597 |
self.check_vtk("hex_contact_3D_order1_FunctionOnContactZero_Tensor.xml",reference) |
598 |
def test_hex_contact_3D_order1_onFace_FunctionOnContactZero_Scalar_vtk(self): |
599 |
reference="hex_3D_o1_contact_s.xml" |
600 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
601 |
x=FunctionOnContactZero(dom).getX() |
602 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactZero_Scalar.xml",data=x[0]) |
603 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactZero_Scalar.xml",reference) |
604 |
def test_hex_contact_3D_order1_onFace_FunctionOnContactZero_Vector_vtk(self): |
605 |
reference="hex_3D_o1_contact_v.xml" |
606 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
607 |
x=FunctionOnContactZero(dom).getX() |
608 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.]) |
609 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactZero_Vector.xml",reference) |
610 |
def test_hex_contact_3D_order1_onFace_FunctionOnContactZero_Tensor_vtk(self): |
611 |
reference="hex_3D_o1_contact_t.xml" |
612 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
613 |
x=FunctionOnContactZero(dom).getX() |
614 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
615 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactZero_Tensor.xml",reference) |
616 |
def test_hex_contact_3D_order1_FunctionOnContactOne_Scalar_vtk(self): |
617 |
reference="hex_3D_o1_contact_s.xml" |
618 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
619 |
x=FunctionOnContactOne(dom).getX() |
620 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactOne_Scalar.xml",data=x[0]) |
621 |
self.check_vtk("hex_contact_3D_order1_FunctionOnContactOne_Scalar.xml",reference) |
622 |
def test_hex_contact_3D_order1_FunctionOnContactOne_Vector_vtk(self): |
623 |
reference="hex_3D_o1_contact_v.xml" |
624 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
625 |
x=FunctionOnContactOne(dom).getX() |
626 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.]) |
627 |
self.check_vtk("hex_contact_3D_order1_FunctionOnContactOne_Vector.xml",reference) |
628 |
def test_hex_contact_3D_order1_FunctionOnContactOne_Tensor_vtk(self): |
629 |
reference="hex_3D_o1_contact_t.xml" |
630 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
631 |
x=FunctionOnContactOne(dom).getX() |
632 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
633 |
self.check_vtk("hex_contact_3D_order1_FunctionOnContactOne_Tensor.xml",reference) |
634 |
def test_hex_contact_3D_order1_onFace_FunctionOnContactOne_Scalar_vtk(self): |
635 |
reference="hex_3D_o1_contact_s.xml" |
636 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
637 |
x=FunctionOnContactOne(dom).getX() |
638 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactOne_Scalar.xml",data=x[0]) |
639 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactOne_Scalar.xml",reference) |
640 |
def test_hex_contact_3D_order1_onFace_FunctionOnContactOne_Vector_vtk(self): |
641 |
reference="hex_3D_o1_contact_v.xml" |
642 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
643 |
x=FunctionOnContactOne(dom).getX() |
644 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.]) |
645 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactOne_Vector.xml",reference) |
646 |
def test_hex_contact_3D_order1_onFace_FunctionOnContactOne_Tensor_vtk(self): |
647 |
reference="hex_3D_o1_contact_t.xml" |
648 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1_onFace.msh") |
649 |
x=FunctionOnContactOne(dom).getX() |
650 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
651 |
self.check_vtk("hex_contact_3D_order1_onFace_FunctionOnContactOne_Tensor.xml",reference) |
652 |
# ====================================================================================================================== |
653 |
def test_hex_contact_3D_order2_ContinuousFunction_Scalar_vtk(self): |
654 |
reference="hex_3D_o2_node_s.xml" |
655 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
656 |
x=ContinuousFunction(dom).getX() |
657 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Scalar.xml",data=x[0]) |
658 |
self.check_vtk("hex_contact_3D_order2_ContinuousFunction_Scalar.xml",reference) |
659 |
def test_hex_contact_3D_order2_ContinuousFunction_Vector_vtk(self): |
660 |
reference="hex_3D_o2_node_v.xml" |
661 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
662 |
x=ContinuousFunction(dom).getX() |
663 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Vector.xml",data=x[0]*[1.,2.,3.]) |
664 |
self.check_vtk("hex_contact_3D_order2_ContinuousFunction_Vector.xml",reference) |
665 |
def test_hex_contact_3D_order2_ContinuousFunction_Tensor_vtk(self): |
666 |
reference="hex_3D_o2_node_t.xml" |
667 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
668 |
x=ContinuousFunction(dom).getX() |
669 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
670 |
self.check_vtk("hex_contact_3D_order2_ContinuousFunction_Tensor.xml",reference) |
671 |
def test_hex_contact_3D_order2_Solution_Scalar_vtk(self): |
672 |
reference="hex_3D_o2_node_s.xml" |
673 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
674 |
x=Solution(dom).getX() |
675 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Scalar.xml",data=x[0]) |
676 |
self.check_vtk("hex_contact_3D_order2_Solution_Scalar.xml",reference) |
677 |
def test_hex_contact_3D_order2_Solution_Vector_vtk(self): |
678 |
reference="hex_3D_o2_node_v.xml" |
679 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
680 |
x=Solution(dom).getX() |
681 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Vector.xml",data=x[0]*[1.,2.,3.]) |
682 |
self.check_vtk("hex_contact_3D_order2_Solution_Vector.xml",reference) |
683 |
def test_hex_contact_3D_order2_Solution_Tensor_vtk(self): |
684 |
reference="hex_3D_o2_node_t.xml" |
685 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
686 |
x=Solution(dom).getX() |
687 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
688 |
self.check_vtk("hex_contact_3D_order2_Solution_Tensor.xml",reference) |
689 |
def test_hex_contact_3D_order2_ReducedSolution_Scalar_vtk(self): |
690 |
reference="hex_3D_o1_node_s.xml" |
691 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
692 |
x=ReducedSolution(dom).getX() |
693 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Scalar.xml",data=x[0]) |
694 |
self.check_vtk("hex_contact_3D_order2_ReducedSolution_Scalar.xml",reference) |
695 |
def test_hex_contact_3D_order2_ReducedSolution_Vector_vtk(self): |
696 |
reference="hex_3D_o1_node_v.xml" |
697 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
698 |
x=ReducedSolution(dom).getX() |
699 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Vector.xml",data=x[0]*[1.,2.,3.]) |
700 |
self.check_vtk("hex_contact_3D_order2_ReducedSolution_Vector.xml",reference) |
701 |
def test_hex_contact_3D_order2_ReducedSolution_Tensor_vtk(self): |
702 |
reference="hex_3D_o1_node_t.xml" |
703 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
704 |
x=ReducedSolution(dom).getX() |
705 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
706 |
self.check_vtk("hex_contact_3D_order2_ReducedSolution_Tensor.xml",reference) |
707 |
def test_hex_contact_3D_order2_Function_Scalar_vtk(self): |
708 |
reference="hex_3D_o2_cell_s.xml" |
709 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
710 |
x=Function(dom).getX() |
711 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Scalar.xml",data=x[0]) |
712 |
self.check_vtk("hex_contact_3D_order2_Function_Scalar.xml",reference) |
713 |
def test_hex_contact_3D_order2_Function_Vector_vtk(self): |
714 |
reference="hex_3D_o2_cell_v.xml" |
715 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
716 |
x=Function(dom).getX() |
717 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Vector.xml",data=x[0]*[1.,2.,3.]) |
718 |
self.check_vtk("hex_contact_3D_order2_Function_Vector.xml",reference) |
719 |
def test_hex_contact_3D_order2_Function_Tensor_vtk(self): |
720 |
reference="hex_3D_o2_cell_t.xml" |
721 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
722 |
x=Function(dom).getX() |
723 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
724 |
self.check_vtk("hex_contact_3D_order2_Function_Tensor.xml",reference) |
725 |
def test_hex_contact_3D_order2_FunctionOnBoundary_Scalar_vtk(self): |
726 |
reference="hex_3D_o2_boundary_s.xml" |
727 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
728 |
x=FunctionOnBoundary(dom).getX() |
729 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Scalar.xml",data=x[0]) |
730 |
self.check_vtk("hex_contact_3D_order2_FunctionOnBoundary_Scalar.xml",reference) |
731 |
def test_hex_contact_3D_order2_FunctionOnBoundary_Vector_vtk(self): |
732 |
reference="hex_3D_o2_boundary_v.xml" |
733 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
734 |
x=FunctionOnBoundary(dom).getX() |
735 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.]) |
736 |
self.check_vtk("hex_contact_3D_order2_FunctionOnBoundary_Vector.xml",reference) |
737 |
def test_hex_contact_3D_order2_FunctionOnBoundary_Tensor_vtk(self): |
738 |
reference="hex_3D_o2_boundary_t.xml" |
739 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
740 |
x=FunctionOnBoundary(dom).getX() |
741 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
742 |
self.check_vtk("hex_contact_3D_order2_FunctionOnBoundary_Tensor.xml",reference) |
743 |
def test_hex_contact_3D_order2_onFace_FunctionOnBoundary_Scalar_vtk(self): |
744 |
reference="hex_3D_o2_f_boundary_s.xml" |
745 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
746 |
x=FunctionOnBoundary(dom).getX() |
747 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnBoundary_Scalar.xml",data=x[0]) |
748 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnBoundary_Scalar.xml",reference) |
749 |
def test_hex_contact_3D_order2_onFace_FunctionOnBoundary_Vector_vtk(self): |
750 |
reference="hex_3D_o2_f_boundary_v.xml" |
751 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
752 |
x=FunctionOnBoundary(dom).getX() |
753 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnBoundary_Vector.xml",data=x[0]*[1.,2.,3.]) |
754 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnBoundary_Vector.xml",reference) |
755 |
def test_hex_contact_3D_order2_onFace_FunctionOnBoundary_Tensor_vtk(self): |
756 |
reference="hex_3D_o2_f_boundary_t.xml" |
757 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
758 |
x=FunctionOnBoundary(dom).getX() |
759 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnBoundary_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
760 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnBoundary_Tensor.xml",reference) |
761 |
def test_hex_contact_3D_order2_FunctionOnContactZero_Scalar_vtk(self): |
762 |
reference="hex_3D_o2_contact_s.xml" |
763 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
764 |
x=FunctionOnContactZero(dom).getX() |
765 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactZero_Scalar.xml",data=x[0]) |
766 |
self.check_vtk("hex_contact_3D_order2_FunctionOnContactZero_Scalar.xml",reference) |
767 |
def test_hex_contact_3D_order2_FunctionOnContactZero_Vector_vtk(self): |
768 |
reference="hex_3D_o2_contact_v.xml" |
769 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
770 |
x=FunctionOnContactZero(dom).getX() |
771 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.]) |
772 |
self.check_vtk("hex_contact_3D_order2_FunctionOnContactZero_Vector.xml",reference) |
773 |
def test_hex_contact_3D_order2_FunctionOnContactZero_Tensor_vtk(self): |
774 |
reference="hex_3D_o2_contact_t.xml" |
775 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
776 |
x=FunctionOnContactZero(dom).getX() |
777 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
778 |
self.check_vtk("hex_contact_3D_order2_FunctionOnContactZero_Tensor.xml",reference) |
779 |
def test_hex_contact_3D_order2_onFace_FunctionOnContactZero_Scalar_vtk(self): |
780 |
reference="hex_3D_o2_contact_s.xml" |
781 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
782 |
x=FunctionOnContactZero(dom).getX() |
783 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactZero_Scalar.xml",data=x[0]) |
784 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactZero_Scalar.xml",reference) |
785 |
def test_hex_contact_3D_order2_onFace_FunctionOnContactZero_Vector_vtk(self): |
786 |
reference="hex_3D_o2_contact_v.xml" |
787 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
788 |
x=FunctionOnContactZero(dom).getX() |
789 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactZero_Vector.xml",data=x[0]*[1.,2.,3.]) |
790 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactZero_Vector.xml",reference) |
791 |
def test_hex_contact_3D_order2_onFace_FunctionOnContactZero_Tensor_vtk(self): |
792 |
reference="hex_3D_o2_contact_t.xml" |
793 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
794 |
x=FunctionOnContactZero(dom).getX() |
795 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactZero_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
796 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactZero_Tensor.xml",reference) |
797 |
def test_hex_contact_3D_order2_FunctionOnContactOne_Scalar_vtk(self): |
798 |
reference="hex_3D_o2_contact_s.xml" |
799 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
800 |
x=FunctionOnContactOne(dom).getX() |
801 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactOne_Scalar.xml",data=x[0]) |
802 |
self.check_vtk("hex_contact_3D_order2_FunctionOnContactOne_Scalar.xml",reference) |
803 |
def test_hex_contact_3D_order2_FunctionOnContactOne_Vector_vtk(self): |
804 |
reference="hex_3D_o2_contact_v.xml" |
805 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
806 |
x=FunctionOnContactOne(dom).getX() |
807 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.]) |
808 |
self.check_vtk("hex_contact_3D_order2_FunctionOnContactOne_Vector.xml",reference) |
809 |
def test_hex_contact_3D_order2_FunctionOnContactOne_Tensor_vtk(self): |
810 |
reference="hex_3D_o2_contact_t.xml" |
811 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
812 |
x=FunctionOnContactOne(dom).getX() |
813 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
814 |
self.check_vtk("hex_contact_3D_order2_FunctionOnContactOne_Tensor.xml",reference) |
815 |
def test_hex_contact_3D_order2_onFace_FunctionOnContactOne_Scalar_vtk(self): |
816 |
reference="hex_3D_o2_contact_s.xml" |
817 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
818 |
x=FunctionOnContactOne(dom).getX() |
819 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactOne_Scalar.xml",data=x[0]) |
820 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactOne_Scalar.xml",reference) |
821 |
def test_hex_contact_3D_order2_onFace_FunctionOnContactOne_Vector_vtk(self): |
822 |
reference="hex_3D_o2_contact_v.xml" |
823 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
824 |
x=FunctionOnContactOne(dom).getX() |
825 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactOne_Vector.xml",data=x[0]*[1.,2.,3.]) |
826 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactOne_Vector.xml",reference) |
827 |
def test_hex_contact_3D_order2_onFace_FunctionOnContactOne_Tensor_vtk(self): |
828 |
reference="hex_3D_o2_contact_t.xml" |
829 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2_onFace.msh") |
830 |
x=FunctionOnContactOne(dom).getX() |
831 |
saveVTK(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_onFace_FunctionOnContactOne_Tensor.xml",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
832 |
self.check_vtk("hex_contact_3D_order2_onFace_FunctionOnContactOne_Tensor.xml",reference) |
833 |
|
834 |
class Test_DXFiles(Test_VisualizationInterface): |
835 |
# ====================================================================================================================== |
836 |
def test_hex_2D_order2_dx(self): |
837 |
reference="hex_2D_o1.dx" |
838 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
839 |
saveDX(FINLEY_WORKDIR_PATH+"hex_2D_order2.dx",domain=dom) |
840 |
self.check_dx("hex_2D_order2.dx",reference) |
841 |
|
842 |
def test_hex_2D_order2_AllPoints_Scalar_dx(self): |
843 |
reference="hex_2D_o1_node_3xs.dx" |
844 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
845 |
x=Solution(dom).getX() |
846 |
x_r=ReducedSolution(dom).getX() |
847 |
x_n=ContinuousFunction(dom).getX() |
848 |
saveDX(FINLEY_WORKDIR_PATH+"hex_2D_order2_AllPoints_Scalar.dx",data_r=x_r[0],data_n=x_n[0],data=x[0]) |
849 |
self.check_dx("hex_2D_order2_AllPoints_Scalar.dx",reference) |
850 |
def test_hex_2D_order2_02Points_Scalar_dx(self): |
851 |
reference="hex_2D_o1_node_2xs.dx" |
852 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
853 |
x=Solution(dom).getX() |
854 |
x_n=ContinuousFunction(dom).getX() |
855 |
saveDX(FINLEY_WORKDIR_PATH+"hex_2D_order2_O2Points_Scalar.dx",data_n=x_n[0],data=x[0]) |
856 |
self.check_dx("hex_2D_order2_O2Points_Scalar.dx",reference) |
857 |
def test_hex_2D_order2_2Cells_Scalar_dx(self): |
858 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
859 |
x=Function(dom).getX() |
860 |
x_b=FunctionOnBoundary(dom).getX() |
861 |
try: |
862 |
saveDX(FINLEY_WORKDIR_PATH+"hex_2D_order2_2Cells_Scalar.dx",data=x[0],data_b=x_b[0]) |
863 |
self.fail("non-matching data not detected.") |
864 |
except StandardError: |
865 |
pass |
866 |
def test_hex_2D_order2_BoundrayPoint_Scalar_dx(self): |
867 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
868 |
x=ContinuousFunction(dom).getX() |
869 |
x_b=FunctionOnBoundary(dom).getX() |
870 |
try: |
871 |
saveDX(FINLEY_WORKDIR_PATH+"hex_2D_order2_BoundrayPoint_Scalar.dx",data=x[0],data_b=x_b[0]) |
872 |
self.fail("non-matching data not detected.") |
873 |
except StandardError: |
874 |
pass |
875 |
def test_hex_2D_order2_Cells_AllData_dx(self): |
876 |
reference="hex_2D_o1_cell_all.dx" |
877 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
878 |
x=Function(dom).getX() |
879 |
saveDX(FINLEY_WORKDIR_PATH+"hex_2D_order2_Cells_AllData.dx",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.]]) |
880 |
self.check_dx("hex_2D_order2_Cells_AllData.dx",reference) |
881 |
|
882 |
def test_hex_2D_order2_CellsPoints_AllData_dx(self): |
883 |
reference="hex_2D_o1_cellnode_all.dx" |
884 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_2D_order2.msh") |
885 |
x_c=Function(dom).getX() |
886 |
x_p=ContinuousFunction(dom).getX() |
887 |
saveDX(FINLEY_WORKDIR_PATH+"hex_2D_order2_CellsPoints_AllData.dx",data_sp=x_p[0], |
888 |
data_vp=x_p[0]*[1.,2.], |
889 |
data_tp=x_p[0]*[[11.,12.],[21.,22.]], |
890 |
data_sc=x_c[0], |
891 |
data_vc=x_c[0]*[1.,2.], |
892 |
data_tc=x_c[0]*[[11.,12.],[21.,22.]]) |
893 |
self.check_dx("hex_2D_order2_CellsPoints_AllData.dx",reference) |
894 |
# ====================================================================================================================== |
895 |
def test_hex_contact_2D_order1_ContinuousFunction_Scalar_dx(self): |
896 |
reference="hex_2D_o1_node_s.dx" |
897 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
898 |
x=ContinuousFunction(dom).getX() |
899 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Scalar.dx",data=x[0]) |
900 |
self.check_dx("hex_contact_2D_order1_ContinuousFunction_Scalar.dx",reference) |
901 |
def test_hex_contact_2D_order1_ContinuousFunction_Vector_dx(self): |
902 |
reference="hex_2D_o1_node_v.dx" |
903 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
904 |
x=ContinuousFunction(dom).getX() |
905 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Vector.dx",data=x[0]*[1.,2.]) |
906 |
self.check_dx("hex_contact_2D_order1_ContinuousFunction_Vector.dx",reference) |
907 |
def test_hex_contact_2D_order1_ContinuousFunction_Tensor_dx(self): |
908 |
reference="hex_2D_o1_node_t.dx" |
909 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
910 |
x=ContinuousFunction(dom).getX() |
911 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ContinuousFunction_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
912 |
self.check_dx("hex_contact_2D_order1_ContinuousFunction_Tensor.dx",reference) |
913 |
def test_hex_contact_2D_order1_Solution_Scalar_dx(self): |
914 |
reference="hex_2D_o1_node_s.dx" |
915 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
916 |
x=Solution(dom).getX() |
917 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Scalar.dx",data=x[0]) |
918 |
self.check_dx("hex_contact_2D_order1_Solution_Scalar.dx",reference) |
919 |
def test_hex_contact_2D_order1_Solution_Vector_dx(self): |
920 |
reference="hex_2D_o1_node_v.dx" |
921 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
922 |
x=Solution(dom).getX() |
923 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Vector.dx",data=x[0]*[1.,2.]) |
924 |
self.check_dx("hex_contact_2D_order1_Solution_Vector.dx",reference) |
925 |
def test_hex_contact_2D_order1_Solution_Tensor_dx(self): |
926 |
reference="hex_2D_o1_node_t.dx" |
927 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
928 |
x=Solution(dom).getX() |
929 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Solution_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
930 |
self.check_dx("hex_contact_2D_order1_Solution_Tensor.dx",reference) |
931 |
def test_hex_contact_2D_order1_ReducedSolution_Scalar_dx(self): |
932 |
reference="hex_2D_o1_node_s.dx" |
933 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
934 |
x=ReducedSolution(dom).getX() |
935 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Scalar.dx",data=x[0]) |
936 |
self.check_dx("hex_contact_2D_order1_ReducedSolution_Scalar.dx",reference) |
937 |
def test_hex_contact_2D_order1_ReducedSolution_Vector_dx(self): |
938 |
reference="hex_2D_o1_node_v.dx" |
939 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
940 |
x=ReducedSolution(dom).getX() |
941 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Vector.dx",data=x[0]*[1.,2.]) |
942 |
self.check_dx("hex_contact_2D_order1_ReducedSolution_Vector.dx",reference) |
943 |
def test_hex_contact_2D_order1_ReducedSolution_Tensor_dx(self): |
944 |
reference="hex_2D_o1_node_t.dx" |
945 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
946 |
x=ReducedSolution(dom).getX() |
947 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_ReducedSolution_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
948 |
self.check_dx("hex_contact_2D_order1_ReducedSolution_Tensor.dx",reference) |
949 |
def test_hex_contact_2D_order1_Function_Scalar_dx(self): |
950 |
reference="hex_2D_o1_cell_s.dx" |
951 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
952 |
x=Function(dom).getX() |
953 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Scalar.dx",data=x[0]) |
954 |
self.check_dx("hex_contact_2D_order1_Function_Scalar.dx",reference) |
955 |
def test_hex_contact_2D_order1_Function_Vector_dx(self): |
956 |
reference="hex_2D_o1_cell_v.dx" |
957 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
958 |
x=Function(dom).getX() |
959 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Vector.dx",data=x[0]*[1.,2.]) |
960 |
self.check_dx("hex_contact_2D_order1_Function_Vector.dx",reference) |
961 |
def test_hex_contact_2D_order1_Function_Tensor_dx(self): |
962 |
reference="hex_2D_o1_cell_t.dx" |
963 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
964 |
x=Function(dom).getX() |
965 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_Function_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
966 |
self.check_dx("hex_contact_2D_order1_Function_Tensor.dx",reference) |
967 |
def test_hex_contact_2D_order1_FunctionOnBoundary_Scalar_dx(self): |
968 |
reference="hex_2D_o1_boundary_s.dx" |
969 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
970 |
x=FunctionOnBoundary(dom).getX() |
971 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Scalar.dx",data=x[0]) |
972 |
self.check_dx("hex_contact_2D_order1_FunctionOnBoundary_Scalar.dx",reference) |
973 |
def test_hex_contact_2D_order1_FunctionOnBoundary_Vector_dx(self): |
974 |
reference="hex_2D_o1_boundary_v.dx" |
975 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
976 |
x=FunctionOnBoundary(dom).getX() |
977 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Vector.dx",data=x[0]*[1.,2.]) |
978 |
self.check_dx("hex_contact_2D_order1_FunctionOnBoundary_Vector.dx",reference) |
979 |
def test_hex_contact_2D_order1_FunctionOnBoundary_Tensor_dx(self): |
980 |
reference="hex_2D_o1_boundary_t.dx" |
981 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order1.msh") |
982 |
x=FunctionOnBoundary(dom).getX() |
983 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order1_FunctionOnBoundary_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
984 |
self.check_dx("hex_contact_2D_order1_FunctionOnBoundary_Tensor.dx",reference) |
985 |
# ====================================================================================================================== |
986 |
def test_hex_contact_2D_order2_ContinuousFunction_Scalar_dx(self): |
987 |
reference="hex_2D_o2_node_s.dx" |
988 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
989 |
x=ContinuousFunction(dom).getX() |
990 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Scalar.dx",data=x[0]) |
991 |
self.check_dx("hex_contact_2D_order2_ContinuousFunction_Scalar.dx",reference) |
992 |
def test_hex_contact_2D_order2_ContinuousFunction_Vector_dx(self): |
993 |
reference="hex_2D_o2_node_v.dx" |
994 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
995 |
x=ContinuousFunction(dom).getX() |
996 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Vector.dx",data=x[0]*[1.,2.]) |
997 |
self.check_dx("hex_contact_2D_order2_ContinuousFunction_Vector.dx",reference) |
998 |
def test_hex_contact_2D_order2_ContinuousFunction_Tensor_dx(self): |
999 |
reference="hex_2D_o2_node_t.dx" |
1000 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1001 |
x=ContinuousFunction(dom).getX() |
1002 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ContinuousFunction_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
1003 |
self.check_dx("hex_contact_2D_order2_ContinuousFunction_Tensor.dx",reference) |
1004 |
def test_hex_contact_2D_order2_Solution_Scalar_dx(self): |
1005 |
reference="hex_2D_o2_node_s.dx" |
1006 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1007 |
x=Solution(dom).getX() |
1008 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Scalar.dx",data=x[0]) |
1009 |
self.check_dx("hex_contact_2D_order2_Solution_Scalar.dx",reference) |
1010 |
def test_hex_contact_2D_order2_Solution_Vector_dx(self): |
1011 |
reference="hex_2D_o2_node_v.dx" |
1012 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1013 |
x=Solution(dom).getX() |
1014 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Vector.dx",data=x[0]*[1.,2.]) |
1015 |
self.check_dx("hex_contact_2D_order2_Solution_Vector.dx",reference) |
1016 |
def test_hex_contact_2D_order2_Solution_Tensor_dx(self): |
1017 |
reference="hex_2D_o2_node_t.dx" |
1018 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1019 |
x=Solution(dom).getX() |
1020 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Solution_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
1021 |
self.check_dx("hex_contact_2D_order2_Solution_Tensor.dx",reference) |
1022 |
def test_hex_contact_2D_order2_ReducedSolution_Scalar_dx(self): |
1023 |
reference="hex_2D_o1_node_s.dx" |
1024 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1025 |
x=ReducedSolution(dom).getX() |
1026 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Scalar.dx",data=x[0]) |
1027 |
self.check_dx("hex_contact_2D_order2_ReducedSolution_Scalar.dx",reference) |
1028 |
def test_hex_contact_2D_order2_ReducedSolution_Vector_dx(self): |
1029 |
reference="hex_2D_o1_node_v.dx" |
1030 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1031 |
x=ReducedSolution(dom).getX() |
1032 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Vector.dx",data=x[0]*[1.,2.]) |
1033 |
self.check_dx("hex_contact_2D_order2_ReducedSolution_Vector.dx",reference) |
1034 |
def test_hex_contact_2D_order2_ReducedSolution_Tensor_dx(self): |
1035 |
reference="hex_2D_o1_node_t.dx" |
1036 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1037 |
x=ReducedSolution(dom).getX() |
1038 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_ReducedSolution_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
1039 |
self.check_dx("hex_contact_2D_order2_ReducedSolution_Tensor.dx",reference) |
1040 |
def test_hex_contact_2D_order2_Function_Scalar_dx(self): |
1041 |
reference="hex_2D_o2_cell_s.dx" |
1042 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1043 |
x=Function(dom).getX() |
1044 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Scalar.dx",data=x[0]) |
1045 |
self.check_dx("hex_contact_2D_order2_Function_Scalar.dx",reference) |
1046 |
def test_hex_contact_2D_order2_Function_Vector_dx(self): |
1047 |
reference="hex_2D_o2_cell_v.dx" |
1048 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1049 |
x=Function(dom).getX() |
1050 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Vector.dx",data=x[0]*[1.,2.]) |
1051 |
self.check_dx("hex_contact_2D_order2_Function_Vector.dx",reference) |
1052 |
def test_hex_contact_2D_order2_Function_Tensor_dx(self): |
1053 |
reference="hex_2D_o2_cell_t.dx" |
1054 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1055 |
x=Function(dom).getX() |
1056 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_Function_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
1057 |
self.check_dx("hex_contact_2D_order2_Function_Tensor.dx",reference) |
1058 |
def test_hex_contact_2D_order2_FunctionOnBoundary_Scalar_dx(self): |
1059 |
reference="hex_2D_o2_boundary_s.dx" |
1060 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1061 |
x=FunctionOnBoundary(dom).getX() |
1062 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Scalar.dx",data=x[0]) |
1063 |
self.check_dx("hex_contact_2D_order2_FunctionOnBoundary_Scalar.dx",reference) |
1064 |
def test_hex_contact_2D_order2_FunctionOnBoundary_Vector_dx(self): |
1065 |
reference="hex_2D_o2_boundary_v.dx" |
1066 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1067 |
x=FunctionOnBoundary(dom).getX() |
1068 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Vector.dx",data=x[0]*[1.,2.]) |
1069 |
self.check_dx("hex_contact_2D_order2_FunctionOnBoundary_Vector.dx",reference) |
1070 |
def test_hex_contact_2D_order2_FunctionOnBoundary_Tensor_dx(self): |
1071 |
reference="hex_2D_o2_boundary_t.dx" |
1072 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_2D_order2.msh") |
1073 |
x=FunctionOnBoundary(dom).getX() |
1074 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_2D_order2_FunctionOnBoundary_Tensor.dx",data=x[0]*[[11.,12.],[21.,22.]]) |
1075 |
self.check_dx("hex_contact_2D_order2_FunctionOnBoundary_Tensor.dx",reference) |
1076 |
# ====================================================================================================================== |
1077 |
def test_hex_contact_3D_order1_ContinuousFunction_Scalar_dx(self): |
1078 |
reference="hex_3D_o1_node_s.dx" |
1079 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1080 |
x=ContinuousFunction(dom).getX() |
1081 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Scalar.dx",data=x[0]) |
1082 |
self.check_dx("hex_contact_3D_order1_ContinuousFunction_Scalar.dx",reference) |
1083 |
def test_hex_contact_3D_order1_ContinuousFunction_Vector_dx(self): |
1084 |
reference="hex_3D_o1_node_v.dx" |
1085 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1086 |
x=ContinuousFunction(dom).getX() |
1087 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Vector.dx",data=x[0]*[1.,2.,3.]) |
1088 |
self.check_dx("hex_contact_3D_order1_ContinuousFunction_Vector.dx",reference) |
1089 |
def test_hex_contact_3D_order1_ContinuousFunction_Tensor_dx(self): |
1090 |
reference="hex_3D_o1_node_t.dx" |
1091 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1092 |
x=ContinuousFunction(dom).getX() |
1093 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ContinuousFunction_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1094 |
self.check_dx("hex_contact_3D_order1_ContinuousFunction_Tensor.dx",reference) |
1095 |
def test_hex_contact_3D_order1_Solution_Scalar_dx(self): |
1096 |
reference="hex_3D_o1_node_s.dx" |
1097 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1098 |
x=Solution(dom).getX() |
1099 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Scalar.dx",data=x[0]) |
1100 |
self.check_dx("hex_contact_3D_order1_Solution_Scalar.dx",reference) |
1101 |
def test_hex_contact_3D_order1_Solution_Vector_dx(self): |
1102 |
reference="hex_3D_o1_node_v.dx" |
1103 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1104 |
x=Solution(dom).getX() |
1105 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Vector.dx",data=x[0]*[1.,2.,3.]) |
1106 |
self.check_dx("hex_contact_3D_order1_Solution_Vector.dx",reference) |
1107 |
def test_hex_contact_3D_order1_Solution_Tensor_dx(self): |
1108 |
reference="hex_3D_o1_node_t.dx" |
1109 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1110 |
x=Solution(dom).getX() |
1111 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Solution_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1112 |
self.check_dx("hex_contact_3D_order1_Solution_Tensor.dx",reference) |
1113 |
def test_hex_contact_3D_order1_ReducedSolution_Scalar_dx(self): |
1114 |
reference="hex_3D_o1_node_s.dx" |
1115 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1116 |
x=ReducedSolution(dom).getX() |
1117 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Scalar.dx",data=x[0]) |
1118 |
self.check_dx("hex_contact_3D_order1_ReducedSolution_Scalar.dx",reference) |
1119 |
def test_hex_contact_3D_order1_ReducedSolution_Vector_dx(self): |
1120 |
reference="hex_3D_o1_node_v.dx" |
1121 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1122 |
x=ReducedSolution(dom).getX() |
1123 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Vector.dx",data=x[0]*[1.,2.,3.]) |
1124 |
self.check_dx("hex_contact_3D_order1_ReducedSolution_Vector.dx",reference) |
1125 |
def test_hex_contact_3D_order1_ReducedSolution_Tensor_dx(self): |
1126 |
reference="hex_3D_o1_node_t.dx" |
1127 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1128 |
x=ReducedSolution(dom).getX() |
1129 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_ReducedSolution_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1130 |
self.check_dx("hex_contact_3D_order1_ReducedSolution_Tensor.dx",reference) |
1131 |
def test_hex_contact_3D_order1_Function_Scalar_dx(self): |
1132 |
reference="hex_3D_o1_cell_s.dx" |
1133 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1134 |
x=Function(dom).getX() |
1135 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Scalar.dx",data=x[0]) |
1136 |
self.check_dx("hex_contact_3D_order1_Function_Scalar.dx",reference) |
1137 |
def test_hex_contact_3D_order1_Function_Vector_dx(self): |
1138 |
reference="hex_3D_o1_cell_v.dx" |
1139 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1140 |
x=Function(dom).getX() |
1141 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Vector.dx",data=x[0]*[1.,2.,3.]) |
1142 |
self.check_dx("hex_contact_3D_order1_Function_Vector.dx",reference) |
1143 |
def test_hex_contact_3D_order1_Function_Tensor_dx(self): |
1144 |
reference="hex_3D_o1_cell_t.dx" |
1145 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1146 |
x=Function(dom).getX() |
1147 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_Function_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1148 |
self.check_dx("hex_contact_3D_order1_Function_Tensor.dx",reference) |
1149 |
def test_hex_contact_3D_order1_FunctionOnBoundary_Scalar_dx(self): |
1150 |
reference="hex_3D_o1_boundary_s.dx" |
1151 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1152 |
x=FunctionOnBoundary(dom).getX() |
1153 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Scalar.dx",data=x[0]) |
1154 |
self.check_dx("hex_contact_3D_order1_FunctionOnBoundary_Scalar.dx",reference) |
1155 |
def test_hex_contact_3D_order1_FunctionOnBoundary_Vector_dx(self): |
1156 |
reference="hex_3D_o1_boundary_v.dx" |
1157 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1158 |
x=FunctionOnBoundary(dom).getX() |
1159 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Vector.dx",data=x[0]*[1.,2.,3.]) |
1160 |
self.check_dx("hex_contact_3D_order1_FunctionOnBoundary_Vector.dx",reference) |
1161 |
def test_hex_contact_3D_order1_FunctionOnBoundary_Tensor_dx(self): |
1162 |
reference="hex_3D_o1_boundary_t.dx" |
1163 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order1.msh") |
1164 |
x=FunctionOnBoundary(dom).getX() |
1165 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order1_FunctionOnBoundary_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1166 |
self.check_dx("hex_contact_3D_order1_FunctionOnBoundary_Tensor.dx",reference) |
1167 |
# ====================================================================================================================== |
1168 |
def test_hex_contact_3D_order2_ContinuousFunction_Scalar_dx(self): |
1169 |
reference="hex_3D_o1_node_s.dx" |
1170 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1171 |
x=ContinuousFunction(dom).getX() |
1172 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Scalar.dx",data=x[0]) |
1173 |
self.check_dx("hex_contact_3D_order2_ContinuousFunction_Scalar.dx",reference) |
1174 |
def test_hex_contact_3D_order2_ContinuousFunction_Vector_dx(self): |
1175 |
reference="hex_3D_o1_node_v.dx" |
1176 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1177 |
x=ContinuousFunction(dom).getX() |
1178 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Vector.dx",data=x[0]*[1.,2.,3.]) |
1179 |
self.check_dx("hex_contact_3D_order2_ContinuousFunction_Vector.dx",reference) |
1180 |
def test_hex_contact_3D_order2_ContinuousFunction_Tensor_dx(self): |
1181 |
reference="hex_3D_o1_node_t.dx" |
1182 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1183 |
x=ContinuousFunction(dom).getX() |
1184 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ContinuousFunction_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1185 |
self.check_dx("hex_contact_3D_order2_ContinuousFunction_Tensor.dx",reference) |
1186 |
def test_hex_contact_3D_order2_Solution_Scalar_dx(self): |
1187 |
reference="hex_3D_o1_node_s.dx" |
1188 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1189 |
x=Solution(dom).getX() |
1190 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Scalar.dx",data=x[0]) |
1191 |
self.check_dx("hex_contact_3D_order2_Solution_Scalar.dx",reference) |
1192 |
def test_hex_contact_3D_order2_Solution_Vector_dx(self): |
1193 |
reference="hex_3D_o1_node_v.dx" |
1194 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1195 |
x=Solution(dom).getX() |
1196 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Vector.dx",data=x[0]*[1.,2.,3.]) |
1197 |
self.check_dx("hex_contact_3D_order2_Solution_Vector.dx",reference) |
1198 |
def test_hex_contact_3D_order2_Solution_Tensor_dx(self): |
1199 |
reference="hex_3D_o1_node_t.dx" |
1200 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1201 |
x=Solution(dom).getX() |
1202 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Solution_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1203 |
self.check_dx("hex_contact_3D_order2_Solution_Tensor.dx",reference) |
1204 |
def test_hex_contact_3D_order2_ReducedSolution_Scalar_dx(self): |
1205 |
reference="hex_3D_o1_node_s.dx" |
1206 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1207 |
x=ReducedSolution(dom).getX() |
1208 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Scalar.dx",data=x[0]) |
1209 |
self.check_dx("hex_contact_3D_order2_ReducedSolution_Scalar.dx",reference) |
1210 |
def test_hex_contact_3D_order2_ReducedSolution_Vector_dx(self): |
1211 |
reference="hex_3D_o1_node_v.dx" |
1212 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1213 |
x=ReducedSolution(dom).getX() |
1214 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Vector.dx",data=x[0]*[1.,2.,3.]) |
1215 |
self.check_dx("hex_contact_3D_order2_ReducedSolution_Vector.dx",reference) |
1216 |
def test_hex_contact_3D_order2_ReducedSolution_Tensor_dx(self): |
1217 |
reference="hex_3D_o1_node_t.dx" |
1218 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1219 |
x=ReducedSolution(dom).getX() |
1220 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_ReducedSolution_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1221 |
self.check_dx("hex_contact_3D_order2_ReducedSolution_Tensor.dx",reference) |
1222 |
def test_hex_contact_3D_order2_Function_Scalar_dx(self): |
1223 |
reference="hex_3D_o1_cell_s.dx" |
1224 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1225 |
x=Function(dom).getX() |
1226 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Scalar.dx",data=x[0]) |
1227 |
self.check_dx("hex_contact_3D_order2_Function_Scalar.dx",reference) |
1228 |
def test_hex_contact_3D_order2_Function_Vector_dx(self): |
1229 |
reference="hex_3D_o1_cell_v.dx" |
1230 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1231 |
x=Function(dom).getX() |
1232 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Vector.dx",data=x[0]*[1.,2.,3.]) |
1233 |
self.check_dx("hex_contact_3D_order2_Function_Vector.dx",reference) |
1234 |
def test_hex_contact_3D_order2_Function_Tensor_dx(self): |
1235 |
reference="hex_3D_o1_cell_t.dx" |
1236 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1237 |
x=Function(dom).getX() |
1238 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_Function_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1239 |
self.check_dx("hex_contact_3D_order2_Function_Tensor.dx",reference) |
1240 |
def test_hex_contact_3D_order2_FunctionOnBoundary_Scalar_dx(self): |
1241 |
reference="hex_3D_o1_boundary_s.dx" |
1242 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1243 |
x=FunctionOnBoundary(dom).getX() |
1244 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Scalar.dx",data=x[0]) |
1245 |
self.check_dx("hex_contact_3D_order2_FunctionOnBoundary_Scalar.dx",reference) |
1246 |
def test_hex_contact_3D_order2_FunctionOnBoundary_Vector_dx(self): |
1247 |
reference="hex_3D_o1_boundary_v.dx" |
1248 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1249 |
x=FunctionOnBoundary(dom).getX() |
1250 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Vector.dx",data=x[0]*[1.,2.,3.]) |
1251 |
self.check_dx("hex_contact_3D_order2_FunctionOnBoundary_Vector.dx",reference) |
1252 |
def test_hex_contact_3D_order2_FunctionOnBoundary_Tensor_dx(self): |
1253 |
reference="hex_3D_o1_boundary_t.dx" |
1254 |
dom=ReadMesh(FINLEY_TEST_MESH_PATH+"hex_contact_3D_order2.msh") |
1255 |
x=FunctionOnBoundary(dom).getX() |
1256 |
saveDX(FINLEY_WORKDIR_PATH+"hex_contact_3D_order2_FunctionOnBoundary_Tensor.dx",data=x[0]*[[11.,12.,13.],[21.,22.,23],[31.,32.,33.]]) |
1257 |
self.check_dx("hex_contact_3D_order2_FunctionOnBoundary_Tensor.dx",reference) |
1258 |
|
1259 |
if __name__ == '__main__': |
1260 |
suite = unittest.TestSuite() |
1261 |
suite.addTest(unittest.makeSuite(Test_VTKFiles)) |
1262 |
suite.addTest(unittest.makeSuite(Test_DXFiles)) |
1263 |
s=unittest.TextTestRunner(verbosity=2).run(suite) |
1264 |
if s.wasSuccessful(): |
1265 |
sys.exit(0) |
1266 |
else: |
1267 |
sys.exit(1) |