diff --git a/python/dune/perftool/pdelab/driver.py b/python/dune/perftool/pdelab/driver.py index 7b57ca2162050e34fe91b1a8c6b79f6297a41cc6..8f3fb65597e04e623d6b4f4f3045fee7ef7bdc1a 100644 --- a/python/dune/perftool/pdelab/driver.py +++ b/python/dune/perftool/pdelab/driver.py @@ -904,17 +904,20 @@ def name_stationarynonlinearproblemsolver(): def dune_solve(): # Test if form is linear in ansatzfunction if is_linear(_form): - if not get_option("matrix_free"): - slp = name_stationarylinearproblemsolver() - return "{}.apply();".format(slp) - else: + if get_option("matrix_free"): go = name_gridoperator() x = name_vector() include_file("dune/perftool/matrixfree.hh", filetag="drive") return "solveMatrixFree({},{});".format(go, x) + else: + slp = name_stationarylinearproblemsolver() + return "{}.apply();".format(slp) else: - snp = name_stationarynonlinearproblemsolver() - return "{}.apply();".format(snp) + if get_option("matrix_free"): + raise NotImplementedError("Nonlinear and matrix free is not yet implemented") + else: + snp = name_stationarynonlinearproblemsolver() + return "{}.apply();".format(snp) @preamble