예제 #1
0
    def test_refine_3_8(self):
        mesh = Mesh('3_8', data_dir + '/meshes/elements/3_8_1.mesh')
        domain = refine(FEDomain('domain', mesh), self.options.out_dir, 1)

        ok = compare_mesh('3_8', domain.mesh.coors, domain.mesh.conns[0])

        return ok
예제 #2
0
    def test_refine_hexa(self):
        mesh = Mesh('mesh_hexa',
                    data_dir + '/meshes/various_formats/abaqus_hex.inp')
        domain = FEDomain('domain', mesh)

        refine(domain, self.options.out_dir)

        return True
예제 #3
0
    def from_conf(conf, options):
        from sfepy import data_dir
        from sfepy.discrete.fem import Mesh, FEDomain
        from sfepy.discrete import Functions

        mesh = Mesh('test mesh',
                    data_dir + '/meshes/various_formats/abaqus_tet.inp')
        mesh.nodal_bcs['set0'] = [0, 7]
        domain = FEDomain('test domain', mesh)

        conf_functions = {
            'get_vertices': (get_vertices, ),
            'get_cells': (get_cells, ),
        }
        functions = Functions.from_conf(transform_functions(conf_functions))

        test = Test(conf=conf,
                    options=options,
                    domain=domain,
                    functions=functions)
        return test
예제 #4
0
    def from_conf(conf, options):
        mesh = Mesh('mesh_tetra',
                    data_dir + '/meshes/various_formats/small3d.mesh')
        domain = FEDomain('domain', mesh)

        return Test(conf=conf, options=options, domain=domain)