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