~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to test/unit/io/python/vtk.py

  • Committer: corrado maurini
  • Date: 2012-12-18 12:16:08 UTC
  • mfrom: (6685.78.207 trunk)
  • Revision ID: corrado.maurini@upmc.fr-20121218121608-nk82ly9jgsld9u84
updating with trunk, fix uint in TAO solver and hacking the check for tao FindTAO.cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
    def test_save_1d_mesh(self):
33
33
        if MPI.num_processes() == 1:
34
 
            mesh = UnitInterval(32)
 
34
            mesh = UnitIntervalMesh(32)
35
35
            File("mesh.pvd") << mesh
36
36
            for file_option in file_options:
37
37
                File("mesh.pvd", file_option) << mesh
38
38
 
39
39
    def test_save_2d_mesh(self):
40
 
        mesh = UnitSquare(32, 32)
 
40
        mesh = UnitSquareMesh(32, 32)
41
41
        File("mesh.pvd") << mesh
42
42
        for file_option in file_options:
43
43
            File("mesh.pvd", file_option) << mesh
44
44
 
45
45
    def test_save_3d_mesh(self):
46
 
        mesh = UnitCube(8, 8, 8)
 
46
        mesh = UnitCubeMesh(8, 8, 8)
47
47
        File("mesh.pvd") << mesh
48
48
        for file_option in file_options:
49
49
            File("mesh.pvd", file_option) << mesh
54
54
 
55
55
    def test_save_1d_scalar(self):
56
56
        if MPI.num_processes() == 1:
57
 
            mesh = UnitInterval(32)
 
57
            mesh = UnitIntervalMesh(32)
58
58
            u = Function(FunctionSpace(mesh, "Lagrange", 2))
59
59
            u.vector()[:] = 1.0
60
60
            File("u.pvd") << u
62
62
                File("u.pvd", file_option) << u
63
63
 
64
64
    def test_save_2d_scalar(self):
65
 
        mesh = UnitSquare(16, 16)
 
65
        mesh = UnitSquareMesh(16, 16)
66
66
        u = Function(FunctionSpace(mesh, "Lagrange", 2))
67
67
        u.vector()[:] = 1.0
68
68
        File("u.pvd") << u
70
70
            File("u.pvd", file_option) << u
71
71
 
72
72
    def test_save_3d_scalar(self):
73
 
        mesh = UnitCube(8, 8, 8)
 
73
        mesh = UnitCubeMesh(8, 8, 8)
74
74
        u = Function(FunctionSpace(mesh, "Lagrange", 2))
75
75
        u.vector()[:] = 1.0
76
76
        File("u.pvd") << u
80
80
    # FFC fails for vector spaces in 1D
81
81
    #def test_save_1d_vector(self):
82
82
    #    if MPI.num_processes() == 1:
83
 
    #        mesh = UnitInterval(32)
 
83
    #        mesh = UnitIntervalMesh(32)
84
84
    #        u = Function(VectorFunctionSpace(mesh, "Lagrange", 2))
85
85
    #        u.vector()[:] = 1.0
86
86
    #        File("u.pvd") << u
88
88
    #            File("u.pvd", file_option) << u
89
89
 
90
90
    def test_save_2d_vector(self):
91
 
        mesh = UnitSquare(16, 16)
 
91
        mesh = UnitSquareMesh(16, 16)
92
92
        u = Function(VectorFunctionSpace(mesh, "Lagrange", 2))
93
93
        u.vector()[:] = 1.0
94
94
        File("u.pvd") << u
96
96
            File("u.pvd", file_option) << u
97
97
 
98
98
    def test_save_3d_vector(self):
99
 
        mesh = UnitCube(8, 8, 8)
 
99
        mesh = UnitCubeMesh(8, 8, 8)
100
100
        u = Function(VectorFunctionSpace(mesh, "Lagrange", 2))
101
101
        u.vector()[:] = 1.0
102
102
        File("u.pvd") << u
106
106
    # FFC fails for tensor spaces in 1D
107
107
    #def test_save_1d_tensor(self):
108
108
    #    if MPI.num_processes() == 1:
109
 
    #        mesh = UnitInterval(32)
 
109
    #        mesh = UnitIntervalMesh(32)
110
110
    #        u = Function(TensorFunctionSpace(mesh, "Lagrange", 2))
111
111
    #        u.vector()[:] = 1.0
112
112
    #        File("u.pvd") << u
114
114
    #            File("u.pvd", file_option) << u
115
115
 
116
116
    def test_save_2d_tensor(self):
117
 
        mesh = UnitSquare(16, 16)
 
117
        mesh = UnitSquareMesh(16, 16)
118
118
        u = Function(TensorFunctionSpace(mesh, "Lagrange", 2))
119
119
        u.vector()[:] = 1.0
120
120
        File("u.pvd") << u
122
122
            File("u.pvd", file_option) << u
123
123
 
124
124
    def test_save_3d_tensor(self):
125
 
        mesh = UnitCube(8, 8, 8)
 
125
        mesh = UnitCubeMesh(8, 8, 8)
126
126
        u = Function(TensorFunctionSpace(mesh, "Lagrange", 2))
127
127
        u.vector()[:] = 1.0
128
128
        File("u.pvd") << u