SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.04679 · 2023

Flow reconstruction by multiresolution optimization of a discrete loss with automatic differentiation

arXiv · PDF · Open in the Atlas

Code that ran

7 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 9 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2303.04679.json · badge: /api/ran/2303.04679.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
cselab/odil canonical (classifier label)
classifier basis not recorded on the link
7 ran · 9 no recorded run
FunctionStatusWhere it lives
cache_to_file Ran
ran on a synthesized input
cselab/odil/src/odil/cache.py
code served (permissive licence) · get_code("4273b21d2936b32b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import functools

# Create a temporary directory for cache files
temp_dir = tempfile.mkdtemp()

# Define the arguments for cache_to_file
ARGS = {
    "targetbase": os.path.join(temp_dir, "_cache.pickle"),
    "update": False,
    "name_with_arg0": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_cmap Ran
ran on a synthesized input
cselab/odil/src/odil/plot.py
code served (permissive licence) · get_code("a8278e57206d1bfa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned LinearSegmentedColormap. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import matplotlib.colors
import numpy as np

ARGS = {
    'name': 'rainbow'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LinearSegmentedColormap — a LinearSegmentedColormap output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LinearSegmentedColormap output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_colormap_data Ran
ran on a synthesized input
cselab/odil/src/odil/plot.py
code served (permissive licence) · get_code("21d1a888b6d64ab7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (8, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    'name': 'rainbow'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 4) — shape (8, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_error Ran
ran on a synthesized input
cselab/odil/src/odil/util.py
code served (permissive licence) · get_code("9c50d0e45ae4e4e4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct two numpy arrays of different shapes to compute error metrics
u = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
v = np.array([1.1, 2.2, 2.9, 4.1, 4.8])

ARGS = {
    "u": u,
    "v": v,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_neural_net Ran
ran on a synthesized input
cselab/odil/src/odil/core.py
code served (permissive licence) · get_code("6bdfc895e1593b47")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned NeuralNet. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

class MockModule:
    """Mock module that provides random and zeros methods like tensorflow/jax"""
    def __init__(self):
        self.random = self
        pass
    
    def uniform(self, shape, minval, maxval, dtype):
        return np.random.uniform(minval, maxval, shape).astype(dtype)
    
    def zeros(self, shape, dtype):
        if isinstance(shape, int):
            return np.zeros(shape, dtype=dtype)
        return np.zeros(shape, dtype=dtype)

# Set seed for reproducibility
np.random.seed(42)

# Create mock module instance
mock_mod = MockModule()

# Define arguments for make_neural_net
ARGS = {
    'layers': [5, 8, 4, 3],
    'dtype': np.float32,
    'mod': mock_mod,
    'initializer': 'lecun',
    'func_in': None,
    'func_out': None,
    'activation': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NeuralNet — a NeuralNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NeuralNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
plot_1d Ran
ran on a synthesized input
cselab/odil/src/odil/plot.py
code served (permissive licence) · get_code("f368b17e2b766e97")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Figure. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import matplotlib.pyplot as plt

class Domain:
    """Stand-in Domain class with required attributes and methods."""
    def __init__(self):
        self.lower = np.array([0.0, 0.0])
        self.upper = np.array([10.0, 5.0])
        self.cshape = (4, 3)  # cell shape for domain discretization
    
    def points_1d(self, ix, iy):
        """Return 1D points along two axes."""
        x = np.linspace(self.lower[ix], self.upper[ix], self.cshape[ix])
        y = np.linspace(self.lower[iy], self.upper[iy], self.cshape[iy])
        return x, y

# Create domain instance
domain = Domain()

# Create reference and state arrays (4x3 shape to match domain.cshape)
u_ref = np.random.randn(4, 3) + 5.0
u_state = np.random.randn(4, 3) + 5.0

# Define ARGS dict with all parameters
ARGS = {
    'domain': domain,
    'u_ref': u_ref,
    'u_state': u_state,
    'path': None,
    'title': 'Test 1D Plot',
    'umin': None,
    'umax': None,
    'slice_lim': 0.1,
    'transpose': False,
    'invertx': False,
    'nslices': 6,
    'dpi': 300,
    'transparent': True,
    'figsize': (3, 2.5),
    'aspect': 'auto',
    'callback': None,
    'interpolation': 'nearest',
    'cmap': None,
    'cref': 'C2',
    'cstate': 'C0',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
solve Ran
ran on a synthesized input
cselab/odil/src/odil/linsolver.py
code served (permissive licence) · get_code("98b02d0c221514de")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import scipy.sparse

class ArgsConfig:
    def __init__(self):
        self.linsolver = 'direct'
        self.linsolver_maxiter = None
        self.linsolver_damp = 0.01
        self.linsolver_dampdiag = 0.0
        self.linsolver_tol = 1e-6

# Create a small sparse matrix (4x3)
np.random.seed(0)
matr_dense = np.random.randn(4, 3)
matr = scipy.sparse.csr_matrix(matr_dense)

# Create a right-hand side vector (4,)
rhs = np.random.randn(4)

# Create args object with required attributes
args = ArgsConfig()

# Create status dict for storing results
status = {}

ARGS = {
    'matr': matr,
    'rhs': rhs,
    'args': args,
    'status': status,
    'linsolver': 'direct'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cupy, cupyx, numpy, pyamg, scipy, sparseqr — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
interp_to_finer Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/core.py
code served (permissive licence) · get_code("59e3a2251adc7b83")
How it ran

no invocation recorded.

make_optimizer Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/optimizer.py
code served (permissive licence) · get_code("e1e44850adde7fe3")
How it ran

no invocation recorded.

optimize_grad Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/util.py
code served (permissive licence) · get_code("e88c87222c6454f6")
How it ran

no invocation recorded.

optimize_newton Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/util.py
code served (permissive licence) · get_code("9e6f094c159099b8")
How it ran

no invocation recorded.

parse_raw_xmf Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/io.py
code served (permissive licence) · get_code("8c8dbcafe7fc36fc")
How it ran

no invocation recorded.

read_raw Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/io.py
code served (permissive licence) · get_code("6cfbfd3990e106d9")
How it ran

no invocation recorded.

read_raw_with_xmf Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/io.py
code served (permissive licence) · get_code("c9b49d097355788c")
How it ran

no invocation recorded.

restrict_to_coarser Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/core.py
code served (permissive licence) · get_code("f51ce2d92462204c")
How it ran

no invocation recorded.

savefig Not yet run
unverified (harvested, no recorded run)
cselab/odil/src/odil/plotutil.py
code served (permissive licence) · get_code("853fdbdeaddf52b4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 16 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We present a potent computational method for the solution of inverse problems in fluid mechanics. We consider inverse problems formulated in terms of a deterministic loss function that can accommodate data and regularization terms. We introduce a multigrid decomposition technique that accelerates the convergence of gradient-based methods for optimization problems with parameters on a grid. We incorporate this multigrid technique to the ODIL (Optimizing a DIscrete Loss) framework. The multiresolution ODIL (mODIL) accelerates by an order of magnitude the original formalism and improves the avoidance of local minima. Moreover, mODIL accommodates the use of automatic differentiation for calculating the gradients of the loss function, thus facilitating the implementation of the framework. We demonstrate the capabilities of mODIL on a variety of inverse and flow reconstruction problems: solution reconstruction for the Burgers equation, inferring conductivity from temperature measurements, and inferring the body shape from wake velocity measurements in three dimensions. We also provide a comparative study with the related, popular Physics-Informed Neural Networks (PINNs) method. We demonstrate that mODIL has three to five orders of magnitude lower computational cost than PINNs in benchmark problems including simple PDEs and lid-driven cavity problems. Our results suggest that mODIL is a very potent, fast and consistent method for solving inverse problems in fluid mechanics.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2303.04679")
get_code_for_paper("2303.04679")
have("2303.04679")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2303.04679.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2303.04679.svg)](https://syntology.ai/paper/2303.04679)

Connect an agent — have() is free.