def example_setting(self, pre_setting, h5_filename, check_result=False, isHotstart=False, hotstart_t=0.0):
    Context.contextOptionsString = pre_setting
    from . import NS_hotstart_so as my_so
    reload(my_so)
    opts.profile = False
    opts.gatherArchive = True
    opts.hotStart = isHotstart
    opts.hotStartTime = hotstart_t
    pList = []
    nList = []
    sList = []
    for (pModule, nModule) in my_so.pnList:
        pList.append(importlib.import_module(('.' + pModule), 'proteus.tests.HotStart_3P'))
        nList.append(importlib.import_module(('.' + nModule), 'proteus.tests.HotStart_3P'))
        if (pList[(- 1)].name == None):
            pList[(- 1)].name = pModule
        reload(pList[(- 1)])
        reload(nList[(- 1)])
    if (my_so.sList == []):
        for i in range(len(my_so.pnList)):
            s = default_s
            sList.append(s)
    else:
        sList = my_so.sList
    my_so.name = h5_filename
    ns = proteus.NumericalSolution.NS_base(my_so, pList, nList, sList, opts)
    self.aux_names.append(ns.modelList[0].name)
    ns.calculateSolution(my_so.name)
    if check_result:
        expected_path = (('comparison_files/' + self.compare_name) + '.h5')
        with tables.open_file(os.path.join(self._scriptdir, expected_path)) as expected, tables.open_file((my_so.name + '.h5')) as actual:
            assert np.allclose(expected.root.u_t2, actual.root.u_t2, atol=1e-10)
def example_setting(self, pre_setting, h5_filename, check_result=False, isHotstart=False, hotstart_t=0.0):
    Context.contextOptionsString = pre_setting
    from . import NS_hotstart_so as my_so
    reload(my_so)
    opts.profile = False
    opts.gatherArchive = True
    opts.hotStart = isHotstart
    opts.hotStartTime = hotstart_t
    pList = []
    nList = []
    sList = []
    for (pModule, nModule) in my_so.pnList:
        pList.append(importlib.import_module(('.' + pModule), 'proteus.tests.HotStart_3P'))
        nList.append(importlib.import_module(('.' + nModule), 'proteus.tests.HotStart_3P'))
        if (pList[(- 1)].name == None):
            pList[(- 1)].name = pModule
        reload(pList[(- 1)])
        reload(nList[(- 1)])
    if (my_so.sList == []):
        for i in range(len(my_so.pnList)):
            s = default_s
            sList.append(s)
    else:
        sList = my_so.sList
    my_so.name = h5_filename
    ns = proteus.NumericalSolution.NS_base(my_so, pList, nList, sList, opts)
    self.aux_names.append(ns.modelList[0].name)
    ns.calculateSolution(my_so.name)
    if check_result:
        expected_path = (('comparison_files/' + self.compare_name) + '.h5')
        with tables.open_file(os.path.join(self._scriptdir, expected_path)) as expected, tables.open_file((my_so.name + '.h5')) as actual:
            assert np.allclose(expected.root.u_t2, actual.root.u_t2, atol=1e-10)