def METHOD_NAME(fwp, tvars):
    """Test structural relaxations with automatic restart from DEN files."""
    # Build the flow
    flow = flowtk.Flow(fwp.workdir, manager=fwp.manager)
    # Use small value for ntime to trigger restart, then disable the output of the WFK file.
    ion_input, ioncell_input = make_ion_ioncell_inputs(tvars, dilatmx=1.05)
    target_dilatmx = 1.03
    relax_work = flowtk.RelaxWork(ion_input, ioncell_input, target_dilatmx=target_dilatmx)
    flow.register_work(relax_work)
    assert flow.make_scheduler().start() == 0
    flow.show_status()
    assert all(work.finalized for work in flow)
    if not flow.all_ok:
        flow.debug()
        raise RuntimeError()
    #assert relax_work.last_dilatmx <= target_dilatmx
    # we should have (0, 1) restarts
    for i, task in enumerate(relax_work):
        assert task.status == task.S_OK
        assert task.num_restarts == i
        assert task.num_corrections == 0
    assert relax_work[1].input["dilatmx"] == 1.03
    # check that when decreasing the dilatmx it actually takes the previously relaxed
    # structure and does not start from scratch again: the lattice should not be the same.
    assert not np.allclose(relax_work.ion_task.get_final_structure().lattice_vectors(),
                           relax_work.ioncell_task.input.structure.lattice_vectors())
    flow.rmtree()