当前位置: 首页>>代码示例>>Python>>正文


Python TestCase.run_def方法代码示例

本文整理汇总了Python中TestCase.TestCase.run_def方法的典型用法代码示例。如果您正苦于以下问题:Python TestCase.run_def方法的具体用法?Python TestCase.run_def怎么用?Python TestCase.run_def使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestCase.TestCase的用法示例。


在下文中一共展示了TestCase.run_def方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import run_def [as 别名]

#.........这里部分代码省略.........
    ######################################

    pass_list = [test.run_test() for test in test_list]

    ######################################
    ### RUN SU2_GEO TESTS               ###
    ######################################

    # NACA0012
    naca0012_geo = TestCase("naca0012_geo")
    naca0012_geo.cfg_dir = "optimization_euler/steady_naca0012"
    naca0012_geo.cfg_file = "inv_NACA0012_adv.cfg"
    naca0012_geo.test_vals = [0.120011, 0.0816925, 0.0, 1.0]  # max thickness, area, twist, chord
    naca0012_geo.su2_exec = "SU2_GEO"
    naca0012_geo.timeout = 1600
    naca0012_geo.tol = 0.00001
    pass_list.append(naca0012_geo.run_geo())
    test_list.append(naca0012_geo)

    ######################################
    ### RUN SU2_DEF TESTS              ###
    ######################################

    # RAE2822
    rae2822_def = TestCase("rae2822_def")
    rae2822_def.cfg_dir = "optimization_rans/steady_rae2822"
    rae2822_def.cfg_file = "def_SA_RAE2822.cfg"
    rae2822_def.test_iter = 100
    rae2822_def.test_vals = [8.06616e-14]  # residual
    rae2822_def.su2_exec = "SU2_DEF"
    rae2822_def.timeout = 1600
    rae2822_def.tol = 1e-14

    pass_list.append(rae2822_def.run_def())
    test_list.append(rae2822_def)

    # Inviscid ONERAM6
    oneram6_sa_def = TestCase("oneram6_sa_def")
    oneram6_sa_def.cfg_dir = "optimization_euler/steady_oneram6"
    oneram6_sa_def.cfg_file = "def_ONERAM6.cfg"
    oneram6_sa_def.test_iter = 600
    oneram6_sa_def.test_vals = [3.46695e-13]  # residual
    oneram6_sa_def.su2_exec = "SU2_DEF"
    oneram6_sa_def.timeout = 1600
    oneram6_sa_def.tol = 1e-13

    pass_list.append(oneram6_sa_def.run_def())
    test_list.append(oneram6_sa_def)

    ######################################
    ### RUN PYTHON TESTS               ###
    ######################################

    # test continuous_adjoint.py
    contadj_euler_py = TestCase("contadj_euler_py")
    contadj_euler_py.cfg_dir = "cont_adj_euler/naca0012"
    contadj_euler_py.cfg_file = "inv_NACA0012.cfg"
    contadj_euler_py.test_iter = 10
    contadj_euler_py.su2_exec = "continuous_adjoint.py"
    contadj_euler_py.timeout = 1600
    contadj_euler_py.reference_file = "of_grad_cd.dat.ref"
    contadj_euler_py.test_file = "of_grad_cd.dat"
    pass_list.append(contadj_euler_py.run_filediff())
    test_list.append(contadj_euler_py)

    # test finite_difference.py
开发者ID:cspode,项目名称:SU2,代码行数:70,代码来源:serial_regression.py

示例2: main

# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import run_def [as 别名]

#.........这里部分代码省略.........

    pass_list = [ test.run_test() for test in test_list ]

    
    ######################################
    ### RUN SU2_GEO TESTS              ###
    ######################################
    
    # NACA0012
    naca0012_geo           = TestCase('naca0012_geo')
    naca0012_geo.cfg_dir   = "optimization_euler/steady_naca0012"
    naca0012_geo.cfg_file  = "inv_NACA0012_adv.cfg"
    naca0012_geo.test_vals = [0.120011, 0.0816925, 0.0, 1.0] #max thickness, area, twist, chord
    naca0012_geo.su2_exec  = "SU2_GEO"
    naca0012_geo.timeout   = 1600
    naca0012_geo.tol       = 0.00001
    pass_list.append(naca0012_geo.run_geo())
    test_list.append(naca0012_geo)

    ######################################
    ### RUN SU2_DEF TESTS              ###
    ######################################
    
    # Inviscid NACA0012 (triangles)
    naca0012_def            = TestCase('naca0012_def')
    naca0012_def.cfg_dir   = "deformation/naca0012"
    naca0012_def.cfg_file  = "def_NACA0012.cfg"
    naca0012_def.test_iter = 400
    naca0012_def.test_vals = [4.30698e-15] #residual
    naca0012_def.su2_exec  = "SU2_DEF"
    naca0012_def.timeout   = 1600
    naca0012_def.tol       = 1e-15
    
    pass_list.append(naca0012_def.run_def())
    test_list.append(naca0012_def)
    
    # RAE2822 (mixed tris + quads)
    rae2822_def            = TestCase('rae2822_def')
    rae2822_def.cfg_dir   = "deformation/rae2822"
    rae2822_def.cfg_file  = "def_RAE2822.cfg"
    rae2822_def.test_iter = 150
    rae2822_def.test_vals = [5.59336e-16] #residual
    rae2822_def.su2_exec  = "SU2_DEF"
    rae2822_def.timeout   = 1600
    rae2822_def.tol       = 1e-16
    
    pass_list.append(rae2822_def.run_def())
    test_list.append(rae2822_def)
    
    # Turb NACA4412 (quads, wall distance)
    naca4412_def            = TestCase('naca4412_def')
    naca4412_def.cfg_dir   = "deformation/naca4412"
    naca4412_def.cfg_file  = "def_NACA4412.cfg"
    naca4412_def.test_iter = 300
    naca4412_def.test_vals = [3.26428e-15] #residual
    naca4412_def.su2_exec  = "SU2_DEF"
    naca4412_def.timeout   = 1600
    naca4412_def.tol       = 1e-15
    
    pass_list.append(naca4412_def.run_def())
    test_list.append(naca4412_def)

    # Brick of tets (inverse volume)
    brick_tets_def            = TestCase('brick_tets_def')
    brick_tets_def.cfg_dir   = "deformation/brick_tets"
    brick_tets_def.cfg_file  = "def_brick_tets.cfg"
开发者ID:EduardoMolina,项目名称:SU2,代码行数:70,代码来源:serial_regression.py

示例3: main

# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import run_def [as 别名]

#.........这里部分代码省略.........
    test_list.append(dynbeam2d)

    # FSI, 2d
    fsi2d = TestCase("fsi2d")
    fsi2d.cfg_dir = "fea_fsi/WallChannel_2d"
    fsi2d.cfg_file = "configFSI_2D.cfg"
    fsi2d.test_iter = 4
    fsi2d.test_vals = [2.000000, 0.500000, -7.777910, -1.139830]  # last 4 columns
    fsi2d.su2_exec = "parallel_computation_fsi.py -f"
    fsi2d.timeout = 1600
    fsi2d.tol = 0.00001
    test_list.append(fsi2d)

    ######################################
    ### RUN TESTS                      ###
    ######################################

    pass_list = [test.run_test() for test in test_list]

    ######################################
    ### RUN SU2_DEF TESTS              ###
    ######################################

    # Inviscid NACA0012 (triangles)
    naca0012_def = TestCase("naca0012_def")
    naca0012_def.cfg_dir = "deformation/naca0012"
    naca0012_def.cfg_file = "def_NACA0012.cfg"
    naca0012_def.test_iter = 250
    naca0012_def.test_vals = [5.44754e-15]  # residual
    naca0012_def.su2_exec = "mpirun -n 2 SU2_DEF"
    naca0012_def.timeout = 1600
    naca0012_def.tol = 1e-15

    pass_list.append(naca0012_def.run_def())
    test_list.append(naca0012_def)

    # RAE2822 (mixed tris + quads)
    rae2822_def = TestCase("rae2822_def")
    rae2822_def.cfg_dir = "deformation/rae2822"
    rae2822_def.cfg_file = "def_RAE2822.cfg"
    rae2822_def.test_iter = 150
    rae2822_def.test_vals = [1.47076e-15]  # residual
    rae2822_def.su2_exec = "mpirun -n 2 SU2_DEF"
    rae2822_def.timeout = 1600
    rae2822_def.tol = 1e-16

    pass_list.append(rae2822_def.run_def())
    test_list.append(rae2822_def)

    # Turb NACA4412 (quads, wall distance)
    naca4412_def = TestCase("naca4412_def")
    naca4412_def.cfg_dir = "deformation/naca4412"
    naca4412_def.cfg_file = "def_NACA4412.cfg"
    naca4412_def.test_iter = 300
    naca4412_def.test_vals = [4.46129e-15]  # residual
    naca4412_def.su2_exec = "mpirun -n 2 SU2_DEF"
    naca4412_def.timeout = 1600
    naca4412_def.tol = 1e-15

    pass_list.append(naca4412_def.run_def())
    test_list.append(naca4412_def)

    # Brick of tets (inverse volume)
    brick_tets_def = TestCase("brick_tets_def")
    brick_tets_def.cfg_dir = "deformation/brick_tets"
    brick_tets_def.cfg_file = "def_brick_tets.cfg"
开发者ID:youmengtian,项目名称:SU2,代码行数:70,代码来源:parallel_regression.py

示例4: main

# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import run_def [as 别名]

#.........这里部分代码省略.........
    # FSI, 2d
    pywrapper_fsi2d           = TestCase('pywrapper_fsi2d')
    pywrapper_fsi2d.cfg_dir   = "fea_fsi/WallChannel_2d"
    pywrapper_fsi2d.cfg_file  = "configFSI_2D.cfg"
    pywrapper_fsi2d.test_iter = 4
    pywrapper_fsi2d.test_vals = [2.000000, 0.500000, -7.777910, -1.139830] #last 4 columns
    pywrapper_fsi2d.su2_exec  = "mpirun -np 2 SU2_CFD.py --nZone 2 --fsi True --parallel -f"
    pywrapper_fsi2d.timeout   = 1600
    pywrapper_fsi2d.tol       = 0.00001
    test_list.append(pywrapper_fsi2d)
    
    
    ######################################
    ### RUN TESTS                      ###
    ######################################
    
    pass_list = [ test.run_test() for test in test_list ]


    ######################################
    ### RUN SU2_DEF TESTS              ###
    ######################################
    
    # Inviscid NACA0012 (triangles)
    naca0012_def            = TestCase('naca0012_def')
    naca0012_def.cfg_dir   = "deformation/naca0012"
    naca0012_def.cfg_file  = "def_NACA0012.cfg"
    naca0012_def.test_iter = 250
    naca0012_def.test_vals = [5.44754e-15] #residual
    naca0012_def.su2_exec  = "mpirun -n 2 SU2_DEF"
    naca0012_def.timeout   = 1600
    naca0012_def.tol       = 1e-15
    
    pass_list.append(naca0012_def.run_def())
    test_list.append(naca0012_def)

    # RAE2822 (mixed tris + quads)
    rae2822_def            = TestCase('rae2822_def')
    rae2822_def.cfg_dir   = "deformation/rae2822"
    rae2822_def.cfg_file  = "def_RAE2822.cfg"
    rae2822_def.test_iter = 150
    rae2822_def.test_vals = [1.47076e-15] #residual
    rae2822_def.su2_exec  = "mpirun -n 2 SU2_DEF"
    rae2822_def.timeout   = 1600
    rae2822_def.tol       = 1e-16
    
    pass_list.append(rae2822_def.run_def())
    test_list.append(rae2822_def)
    
    # Turb NACA4412 (quads, wall distance)
    naca4412_def            = TestCase('naca4412_def')
    naca4412_def.cfg_dir   = "deformation/naca4412"
    naca4412_def.cfg_file  = "def_NACA4412.cfg"
    naca4412_def.test_iter = 300
    naca4412_def.test_vals = [4.46129e-15] #residual
    naca4412_def.su2_exec  = "mpirun -n 2 SU2_DEF"
    naca4412_def.timeout   = 1600
    naca4412_def.tol       = 1e-15
    
    pass_list.append(naca4412_def.run_def())
    test_list.append(naca4412_def)
    
    # Brick of tets (inverse volume)
    brick_tets_def            = TestCase('brick_tets_def')
    brick_tets_def.cfg_dir   = "deformation/brick_tets"
    brick_tets_def.cfg_file  = "def_brick_tets.cfg"
开发者ID:EduardoMolina,项目名称:SU2,代码行数:70,代码来源:parallel_regression.py


注:本文中的TestCase.TestCase.run_def方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。