betaFeedback

WorksPhysics and Astronomy

Differentiable Schwarz-Coupled Solvers for Thin Boundary Layer Transport: Inverse Modeling via Agentic AI Optimization

Abstract

High-Péclet-number transport problems give rise to thin boundary layers with steep near-wall gradients whose accurate solution requires high-resolution meshes and could challenge inverse modeling. To address this challenge, we develop an overlapping Schwarz domain-decomposition framework grounded in perturbation theory, in which an inner equation governs near-wall dynamics and an outer equation governs bulk transport, and both subproblems are discretized using the finite element method and assembled into a fully differentiable multidomain physics solver. The formulation permits coarser mesh resolutions, reducing computational cost relative to a single-domain formulation. Exploiting the differentiability of the coupled solver, we formulate inverse problems in which the governing equations and boundary conditions are imposed as hard constraints, with the Schwarz coupling enforcing interface continuity. To accelerate the resulting adjoint-based optimization, we integrate large language models (LLMs) into the inverse workflow in two distinct configurations: a standalone optimizer that proposes successive parameter updates from the adjoint-computed sensitivities and an agentic artificial intelligence (AI) approach with access to the complete solver workflow, enabling it to perform multistage optimization procedures. The agentic AI configuration is shown to be most advantageous when the spatially varying unknown is represented in a functional basis rather than a high-dimensional nodal field representation. In this case, the AI agent grows the library of candidate basis functions during optimization under a prescribed admission policy, admitting predefined families in stages and initializing their parameters. In short, our proposed framework integrates Schwarz-coupled differentiable physics with agentic AI optimization for the inverse modeling of multiscale transport problems.

Introduction

Many problems in fluid mechanics involve the transport of a passive scalar, such as heat, chemical species, or biological solute, that is carried by the flow and diffuses through it without influencing the flow itself. Of particular importance are problems in which the scalar is exchanged between the fluid and a solid wall, often leading to thin boundary layer formation. A practical example is mass transport between the blood and the vessel wall in large arteries, which plays a central role in major forms of cardiovascular disease [1, 2, 3]. In general, near-wall transport is governed by the competition between two mechanisms: advection by the flow and molecular diffusion. Their relative strength is measured by the Péclet number, Pe=UL/D\mathrm{Pe}=UL/D, where UU and LL are characteristic velocity and length scales and DD is the molecular diffusivity. In many applications, chemical diffusivity is small, leading to Pe≫1\mathrm{Pe}\gg1 and thin boundary layers. The thickness δ\delta of these layers follows from a balance between tangential advection and wall-normal diffusion, and it consequently depends on the velocity profile near the wall. Although the boundary layer occupies an asymptotically small fraction of the domain, it controls the wall concentration (or temperature) and the wall flux, so that any reliable prediction of these quantities must resolve the layer accurately.

Resolving boundary layers is the central difficulty in the numerical simulation of near-wall transport at high Péclet numbers, as discussed in [4], and requires high-resolution near-wall meshing. Layer-adapted meshes tackle this challenge by concentrating resolution near the wall, but the mesh must be redesigned whenever the layer thickness changes [5] (e.g., different diffusivity). In practice, these requirements are severe. As an example, in large arteries, where Pe∼107\mathrm{Pe} \sim10^{7}–10810^{8}, the concentration boundary layer is of micron scale, whereas the flow must be resolved over the entire vessel, and such simulations are consequently often under-resolved [4].

Singular perturbation theory provides the classical framework for exploiting this separation of scales at high Péclet number [6, 7, 8]. Since Pe−1\mathrm{Pe}^{-1} multiplies the highest-order derivative in the dimensionless transport equation, the problem is singularly perturbed, and an approximate solution can be constructed by the method of matched asymptotic expansions. In the outer region, which comprises the bulk of the domain, diffusion is neglected at leading order and the scalar is transported by advection alone. In the inner region, adjacent to the wall, the wall-normal coordinate is stretched by δ\delta, so that the boundary layer is O(1)\mathcal{O}(1) in the stretched coordinate, independently of Pe\mathrm{Pe}, and wall-normal diffusion is retained to satisfy the wall condition. The inner and outer solutions are then connected through asymptotic matching conditions and combined into a composite expansion that is uniformly valid across the domain, an approach long applied to high-Péclet transport problems [9, 10, 11, 12]. This mathematical structure has also been embedded in machine learning based computational methods for convection-dominated transport [13, 14, 15, 16]. The accuracy of these approaches, however, rests on asymptotic assumptions and the nature of coupling between the inner and outer regions. This one-way structure of coupling is adequate when the boundary layer remains attached along the entire wall, but it deteriorates when complex phenomena such as flow separation occur. At separation and reattachment points, the tangential velocity at the wall vanishes, so that the boundary layer scaling breaks down locally and the interaction between the near-wall and outer regions of the flow intensifies.

Domain decomposition provides a natural framework for such coupled problems. In Schwarz coupling, which originates from the Schwarz alternating method [17], the domain is divided into overlapping subdomains, and the governing equation is solved in each subdomain in turn, with Dirichlet data on its artificial boundary taken from the most recent solution in the neighboring subdomain, until the solutions agree in the overlap region [18, 19, 20, 21]. Because each subdomain problem is a separate boundary value problem, it can be discretized independently, with non-matching meshes of different resolutions [22, 23]. For a boundary layer problem, the domain can thus be divided into an inner subdomain adjacent to the wall and an outer subdomain containing the bulk flow, and each Schwarz iteration passes information from the inner subdomain to the outer subdomain and back, providing the two-way exchange that the one-way structure of leading-order matched asymptotics lacks. Since the inner subdomain is discretized independently, it can also be posed in the stretched wall-normal coordinate of singular perturbation theory, so that, for a known boundary-layer scaling, the inner mesh need not be redesigned as Pe\mathrm{Pe} changes, unlike a layer-adapted mesh. Such combinations of domain decomposition and singular perturbation theory have been developed for advection-dominated transport since the 1980s [24, 25, 26, 27, 28, 29, 30, 31, 32, 33], and Schwarz coupling has more recently been combined with reduced-order models and neural networks [34, 35, 36]. In these methods, however, the subdomain containing a wall layer is posed in physical coordinates [28, 29] or formulated and analyzed for an advection velocity of fixed direction that is bounded away from zero [31, 37, 32, 33], as are the layer-adapted meshes for such layers [38, 39]. Other approaches reduce the cost by simplifying the governing equation in one region, either near the wall, as in surface transport models [40], or in the bulk, as in heterogeneous domain decomposition [41, 42]. All of these methods have consequently been developed almost exclusively for flows without separation, for which their simplifications and velocity assumptions hold. At separation and reattachment points, by contrast, the near-wall tangential velocity changes sign and, as noted above, the boundary-layer approximation breaks down, so that all terms of the advection–diffusion equation must be retained, and at separation the layer leaves the wall and is carried into the bulk. To our knowledge, Schwarz coupling with the inner subdomain in the stretched wall-normal coordinate has not been extensively investigated for thin boundary layers containing critical points of the near-wall flow, such as separation and reattachment points, where the boundary layer assumptions break down and the near-wall and bulk solutions must be coupled in both directions to obtain an accurate solution. Effective inverse modeling within such formulations is also another open problem.

The present work addresses this gap with a formulation for thin boundary layers with separation and reattachment points that combines the scale separation of perturbation theory with the two-way information exchange of Schwarz coupling. The computational domain is divided into an inner subdomain adjacent to the wall and an outer subdomain containing the bulk flow, which overlap over a finite region. The inner subdomain is posed in the stretched wall-normal coordinate of perturbation theory for efficient meshing, whereas the outer subdomain is posed in physical coordinates. In contrast to classical matched asymptotics, the full advection–diffusion equation is retained in both subdomains, and the subdomains exchange Dirichlet data across their artificial boundaries at every Schwarz iteration, so that the near-wall and bulk solutions influence each other. The resulting multidomain Schwarz-coupled solver is implemented with the finite element method in FEniCS [43] and made differentiable with dolfin-adjoint [44, 45], which computes gradients with the discrete adjoint method [46, 47]. Thus, it allows the solver to be used for inverse modeling, in which unknown parameters are recovered from available measurements by minimizing the misfit between predicted and measured quantities. Because the boundary layer is represented in stretched coordinates, the multidomain formulation is expected to reduce computational cost in two respects. In forward modeling, very thin boundary layers, at high PePe numbers, can be resolved on a much coarser mesh than a single-domain discretization would require, which lowers the cost of each forward solve. This reduction is compounded in inverse modeling, where each epoch involves a forward and an adjoint solve. Beyond cost, because the governing equation and boundary conditions are enforced as hard constraints at every optimization epoch, the accuracy of the inversion is limited by the available data and the discretization error of the forward solution rather than by a balance of competing loss terms. This distinguishes the adopted differentiable physics approach from physics-informed machine-learning approaches, which impose the governing physics and the data as soft constraints [48, 49] (see [50] for a comparison of the two approaches). Nevertheless, the efficacy of the inversion depends not only on the cost of each forward and adjoint solve but also on the optimization strategy used to translate the adjoint gradients into parameter updates, which is the second focus of this work.

Classical gradient-based optimizers (for instance, Adam and Newton methods) update the parameters through a deterministic rule that is selected a priori and remains fixed throughout the optimization. In contrast, large language models (LLMs) have recently been proposed as optimizers that generate the parameter update from the optimization history supplied to them as a contextual prompt, potentially allowing the optimization strategy to be chosen adaptively for the problem at hand [51]. Depending on their degree of interaction with the solver, LLMs can serve in a passive or an active role. In a passive role, the LLM acts as a standalone optimizer in place of a classical method and proposes the next update from the history of previous iterates and their objective values [52, 53, 54, 55]. In an active role, the LLM operates as an agent with access to the entire solver and can update or modify the solver on the basis of the optimization history. Such agents have automated computational fluid dynamics workflows [56, 57, 58], generated and debugged finite element and reduced-order solvers [59, 60], calibrated the parameters of flow and transport models in inverse problems [61], and discovered governing equations from data [62, 63]. This recently emerging agentic AI paradigm has further been extended to multi-agent systems for scientific machine learning, in which specialized agents propose, critique, and refine the model architecture, loss formulation, and training strategy, and discover methods that outperform single-agent and human-designed baselines [64]. In the present work, the differentiable inverse solver is retained unchanged up to the computation of the misfit and its adjoint gradients are passed to the LLM at each optimization epoch. In the passive role, the LLM uses a limited history of the misfit, gradient, and parameters to propose the next update and can adapt its strategy rather than following a fixed classical rule. In the active role, the agent has access to the complete optimization history and the inverse-solver workflow, selects the update strategy at each epoch, and, when the unknown is represented in a functional basis, additionally decides when to admit predefined families of basis functions and initializes their parameters. In both methodological roles, the language model is wrapped around a mechanistic differentiable physics solver and seeks to accelerate its convergence for inverse problems, and its performance is compared with that of classical optimizers. Rather than claiming that LLMs and agentic AI can replace classical methods, this work investigates inverse modeling scenarios in which they may offer a viable optimization strategy [65], and we also seek to understand scenarios in which they currently cannot surpass classical methods.

The main contributions of this work are as follows.

  • Multidomain Schwarz-coupled solver for thin boundary layers: A Schwarz-coupled solver is developed for advection–diffusion problems with thin boundary layers containing separation and reattachment points, in which a perturbation-based inner subdomain in the stretched wall-normal coordinate and an outer subdomain in physical coordinates are coupled in a two-way fashion.

  • Differentiable multidomain inversion: The Schwarz-coupled solver is made differentiable with the discrete adjoint method, with the governing equation and boundary conditions enforced as hard constraints. The adjoint sensitivities propagate across the subdomain interface, so that the measurements and the unknown can reside in different subdomains.

  • LLM-integrated and agentic optimization for inverse modeling: LLMs are integrated into the differentiable inverse solver, which remains unchanged and supplies the misfit and adjoint gradient at each epoch. LLM reasoning is used to propose a parameter update policy during the course of optimization.

  • Staged growth of the basis function library with agentic AI: For inverse problems in which the unknown varies in space, the LLM agent grows the library of basis functions during the inversion instead of using a library fixed before the optimization begins. Under a prescribed admission policy, the agent decides when to admit new pre-specified candidate functions and decides how to initialize their parameters.

  • Comparison with classical optimizers: LLM-based and classical gradient-based optimizers are compared systematically for boundary layer transport problems over a range of Péclet numbers and unknowns of increasing spatial complexity, to identify where LLMs offer a viable alternative and where current LLM methodology does not surpass classical methods.

The remainder of this paper is organized as follows. In Section 2, we present the governing equations and methods. In Section 3, we first benchmark the solver in a forward setting and then provide a detailed comparison with classical methods for inverse modeling. In Section 4, the findings, their limitations, and directions for future work are discussed, and in Section 5, the paper is concluded. The solver algorithms, as well as the prompts and human validation of the LLM-based optimizations, are provided in the Appendix.

Methods

Governing equations

We consider the steady transport of a passive scalar in a bounded domain Ω⊂R2\Omega\subset\mathbb{R}^{2}. The boundary ∂Ω=Γw∪ΓD\partial\Omega= \Gamma_{w} \cup\Gamma_{D} comprises a wall Γw\Gamma_{w} subject to a prescribed flux and a remainder ΓD\Gamma_{D} subject to a Dirichlet condition. The scalar concentration CC is governed by the advection–diffusion equation

v⋅∇C=D∇2Cin Ω,(1)\mathbf{v} \cdot\nabla C = D \nabla^{2} C \qquad\text{in } \Omega, \tag*{(1)}

where v\mathbf{v} is a prescribed incompressible velocity field satisfying ∇⋅v=0\nabla\cdot\mathbf{v} = 0, and DD is a constant molecular diffusivity. Here, we focus on the advection-dominated regime, characterized by a large Péclet number Pe=UL/D≫1\mathrm{Pe} = UL/D \gg1, where UU is a characteristic velocity scale and LL is a characteristic domain length.

Near the wall, a thin boundary layer develops, across which CC varies rapidly in the wall-normal direction. The characteristic layer thickness follows from a balance between tangential advection and normal diffusion. For a slip wall, the tangential velocity is O(U)O(U) at the wall, yielding δ∼LPe−1/2\delta\sim L\mathrm{Pe}^{-1/2}, whereas, for a no-slip wall, the tangential velocity vanishes at the wall, and the corresponding balance yields the Lévêque scaling δ∼LPe−1/3\delta\sim L\mathrm{Pe}^{-1/3}. In either case, δ≪L\delta\ll L is noted for sufficiently large Pe\mathrm{Pe}. Here, a Cartesian coordinate system (x,y)(x,y) is considered, with xx parallel to the bottom wall and yy directed inward normal to it, such that Γw\Gamma_{w} lies at y=0y = 0 and the domain occupies y>0y > 0. The Neumann boundary condition ∂C/∂n=g(x)\partial C/\partial n = g(x) is imposed on Γw\Gamma_{w}, where nn is directed into the domain. Thus, g(x)<0g(x) < 0 denotes scalar injection into the domain. Here, the prescribed gradient, which is referred to as the wall flux in the manuscript, g(x)g(x), may either vary spatially along Γw\Gamma_{w} or be a constant scalar value. Zero Dirichlet values are imposed on all remaining boundaries ΓD\Gamma_{D}.

Forward modeling through the differentiable physics solver

High-fidelity single-domain forward solver

For a reference configuration, we solve the governing (1) over the full domain Ω\Omega using a single high-resolution mesh that directly resolves the thin near-wall boundary layer. The corresponding weak formulation is

∫Ω(v⋅∇C) ϕ dx+D∫Ω∇C⋅∇ϕ dx−D∫Γwg(x)ϕ dΓ=0,(2)\int_{\Omega} (\mathbf{v} \cdot\nabla C)\,\phi\,\mathrm{d}x + D\int_{\Omega} \nabla C \cdot\nabla\phi\,\mathrm{d}x - D\int_{\Gamma_{w}} g(x)\phi\,\mathrm{d}\Gamma= 0, \tag*{(2)}

where ϕ\phi is a test function and the boundary integral over Γw\Gamma_{w} weakly imposes the prescribed flux g(x)g(x). The problem is discretized using continuous piecewise-linear finite elements and stabilized by the streamline-upwind Petrov–Galerkin (SUPG) method. The resulting linear system is assembled and solved using a sparse direct solver.

The mesh is refined until the wall profile and the interior field are grid-converged. The resulting single-domain solution serves as the reference for the present work, where its concentration field provides the benchmark for assessing the accuracy of the Schwarz-coupled solver.

Schwarz-coupled inner–outer perturbation theory forward solver

To resolve thin boundary layers efficiently, the forward problem is solved using an overlapping Schwarz domain-decomposition method [22, 23] with singular perturbation theory [7, 13]. The computational domain is divided into an inner subdomain, Ωin\Omega_{\mathrm{in}}, containing the near-wall boundary layer, and an outer subdomain, Ωout\Omega_{\mathrm{out}}, containing the bulk outer flow. The advection–diffusion equation is retained in both subdomains, and the two solutions are coupled numerically over a finite overlap domain, rather than through the more conventional asymptotic matching approach in classical perturbation theory. The overlap domain, Ωoverlap=Ωin∩Ωout\Omega_{\mathrm{overlap}} = \Omega_{\mathrm{in}} \cap\Omega_{\mathrm{out}}, has thickness O(δ)O(\delta) and is located at a wall-normal distance O(δ)O(\delta) from the bottom wall, Γw\Gamma_{w}. Thus, the upper portion of Ωin\Omega_{\mathrm{in}} and the lower portion of Ωout\Omega_{\mathrm{out}} represent the same physical region. The coupled solution is obtained iteratively. At each Schwarz iteration, the concentration trace from the inner solution is imposed on the lower artificial boundary of Ωout\Omega_{\mathrm{out}}, while the trace from the outer solution is imposed on the upper artificial boundary of Ωin\Omega_{\mathrm{in}}. The iterations are continued until the exchanged traces and the solution in the overlap domain converge. An overview of the domain decomposition is shown in Figure 1.

Figure 1. Schwarz-coupled inner–outer domain decomposition. (a) Single-domain configuration in Cartesian coordinates (x,y)(x,y), with prescribed scalar influx g(x)g(x) on the lower wall. (b) Overlapping decomposition into an inner subdomain Ωin\Omega_{\mathrm{in}}, formulated in the stretched coordinates (ξ,η)(\xi,\eta), and an outer subdomain Ωout\Omega_{\mathrm{out}} in physical coordinates. The overlap region is bounded by ηinterface\eta_{\mathrm{interface}} and ηtop\eta_{\mathrm{top}}, which correspond to y=δηinterfacey=\delta\eta_{\mathrm{interface}} and y=δηtopy=\delta\eta_{\mathrm{top}} in the outer domain. (c) One alternating Schwarz sweep. Dirichlet data probed from the overlap at ηtop\eta_{\mathrm{top}} drive the inner solve. The updated overlap is then probed at ηinterface\eta_{\mathrm{interface}} to drive the outer solve. Each overlap update is under-relaxed and sweeps continue until the change falls below the tolerance ε\varepsilon.

Within the inner subdomain Ωin\Omega_{\mathrm{in}}, singular perturbation theory is used and the physical Cartesian coordinates (x,y)(x,y) are transformed to the stretched coordinates ξ=x/L\xi=x/L and η=y/δ\eta=y/\delta, where δ\delta is the boundary layer thickness scale and LL is the characteristic domain length. Retaining the physical dimensions for the dependent variables, under this transformation, Eq. (1) becomes

δLvξ∂C∂ξ+vη∂C∂η=DδL2∂2C∂ξ2+Dδ∂2C∂η2.(3)\frac{\delta}{L}v_{\xi}\frac{\partial C}{\partial\xi}+v_{\eta}\frac{\partial C}{\partial\eta}=\frac{D\delta}{L^{2}}\frac{\partial^{2}C}{\partial\xi^{2}}+\frac{D}{\delta}\frac{\partial^{2}C}{\partial\eta^{2}}. \tag*{(3)}

For a slip wall, the boundary layer thickness scales as δ/L∼Pe−1/2\delta/L\sim\mathrm{Pe}^{-1/2}. We set L=1L=1 and U=1U=1, which gives δ=D\delta=\sqrt{D}. Substituting this choice into Eq. (3) and dividing by D\sqrt{D} gives

vξ∂C∂ξ+vηD∂C∂η=D∂2C∂ξ2+∂2C∂η2,(4)v_{\xi}\frac{\partial C}{\partial\xi}+\frac{v_{\eta}}{\sqrt{D}}\frac{\partial C}{\partial\eta}=D\frac{\partial^{2}C}{\partial\xi^{2}}+\frac{\partial^{2}C}{\partial\eta^{2}}, \tag*{(4)}

while for a no-slip wall, the Lévêque scaling gives δ/L∼Pe−1/3\delta/L\sim\mathrm{Pe}^{-1/3}. Proceeding in the same way with the same choice of scales gives δ=D1/3\delta=D^{1/3}. Substituting this choice into Eq. (3) and dividing by D2/3D^{2/3} gives

vξD1/3∂C∂ξ+vηD2/3∂C∂η=D2/3∂2C∂ξ2+∂2C∂η2,(5)\frac{v_{\xi}}{D^{1/3}}\frac{\partial C}{\partial\xi}+\frac{v_{\eta}}{D^{2/3}}\frac{\partial C}{\partial\eta}=D^{2/3}\frac{\partial^{2}C}{\partial\xi^{2}}+\frac{\partial^{2}C}{\partial\eta^{2}}, \tag*{(5)}

where the second derivatives with respect to ξ\xi and η\eta represent wall-parallel and wall-normal diffusion, respectively. Although the wall-parallel diffusion term is asymptotically small, it is retained in the formulation, providing mild stabilization of the discrete problem numerically. The coordinate stretching renders the boundary layer O(1)\mathcal{O}(1) in η\eta, thereby relaxing the need for excessive wall-normal mesh refinement in physical coordinates. The inner domain formulation is closed using the prescribed wall flux condition from § 2.1. The flux condition in stretched coordinates is imposed as ∂C/∂η=δg(Lξ)\partial C/\partial\eta=\delta g(L\xi) at η=0\eta=0. Homogeneous zero Dirichlet conditions are applied on the lateral boundaries, and the concentration trace supplied by the outer solution is imposed as a Dirichlet condition at the upper boundary of the inner subdomain, CoverlaptopC_{\mathrm{overlap}}^{\mathrm{top}} probed at η=ηtop\eta=\eta_{\mathrm{top}}, during the Schwarz iteration. The outer subdomain retains the original, unscaled form of Eq. (1) in the physical Cartesian coordinates (x,y)(x,y). The outer problem is stabilized using the SUPG formulation. It is closed by the prescribed lateral boundary conditions together with a Dirichlet concentration trace supplied by the inner solution at the lower artificial boundary of Ωout\Omega_{\mathrm{out}}.

At each Schwarz iteration, the concentration trace obtained from one subdomain is prescribed as a Dirichlet boundary condition on the artificial boundary of the other subdomain and the overlap concentration field CoverlapC_{\mathrm{overlap}} is under-relaxed according to

Coverlap(k)=ωC^overlap(k)+(1−ω)Coverlap(k−1),ω∈(0,1],(6)C_{\mathrm{overlap}}^{(k)}=\omega\widehat{C}_{\mathrm{overlap}}^{(k)}+(1-\omega)C_{\mathrm{overlap}}^{(k-1)},\qquad\omega\in(0,1], \tag*{(6)}

where C^overlap(k)\widehat{C}_{\mathrm{overlap}}^{(k)} denotes the newly computed concentration solution at a Schwarz iteration kk, Coverlap(k−1)C_{\mathrm{overlap}}^{(k-1)} is the relaxed concentration solution from the preceding iteration, and ω\omega is the relaxation parameter. Convergence is assessed from the change in the relaxed overlap concentration field between two successive Schwarz iterations, and the iteration is terminated when ∥Coverlap(k)−Coverlap(k−1)∥Ωoverlap\left\|C_{\mathrm{overlap}}^{(k)}-C_{\mathrm{overlap}}^{(k-1)}\right\|_{\Omega_{\mathrm{overlap}}} falls below the prescribed tolerance ϵ\epsilon. Alternatively, the convergence criterion may be evaluated only on either artificial boundary, η=ηtop\eta=\eta_{\mathrm{top}} or η=ηinterface\eta=\eta_{\mathrm{interface}}. Based on our experiments, this reduced criterion produces a coupled solution that is indistinguishable, within numerical accuracy, from that obtained by evaluating the mismatch throughout the overlap region.

Forward solution procedure

Rather than resolving the entire domain on a single, globally refined mesh, the Schwarz-coupled solver divides the problem into two subproblems, each discretized to suit the physics it resolves. The reference configuration, shown in Figure 1a, is posed over the full domain Ω\Omega in Cartesian coordinates (x,y)(x,y) and solved with the high-fidelity solver of § 2.2.1. The corresponding decomposed configuration is depicted in Figure 1b. The inner subdomain Ωin\Omega_{\mathrm{in}} extends from the wall, η=ηwall=0\eta=\eta_{\mathrm{wall}}=0, to its upper artificial boundary, η=ηtop\eta=\eta_{\mathrm{top}}, and is formulated in the stretched coordinates (ξ,η)(\xi,\eta). The outer subdomain Ωout\Omega_{\mathrm{out}} extends from its lower artificial boundary, y=δηinterfacey=\delta\eta_{\mathrm{interface}}, to the far field and is formulated in the physical coordinates (x,y)(x,y). Since ηinterface<ηtop\eta_{\mathrm{interface}}<\eta_{\mathrm{top}}, the two subdomains share the

overlap region Ωoverlap\Omega_{\mathrm{overlap}}: ηinterface≤η≤ηtop\eta_{\mathrm{interface}} \le\eta\le\eta_{\mathrm{top}}, equivalently δηinterface≤y≤δηtop\delta\eta_{\mathrm{interface}} \le y \le\delta\eta_{\mathrm{top}}. Each artificial boundary therefore lies in the interior of the other subdomain, where that subdomain’s solution provides the required Dirichlet data. The two subdomains are meshed separately with the same spatial resolution. Data are transferred between them by evaluating the donor finite-element solution at the receiver’s nodes, which are located through the mapping x=Lξx = L\xi, y=δηy = \delta\eta.

The coupled problem is solved by the alternating Schwarz sweep illustrated in Figure 1c. At sweep kk, the following four steps are performed.

  • Step A: Probe Dirichlet data for the inner problem. Evaluate CoverlapC_{\mathrm{overlap}} at η=ηtop\eta= \eta_{\mathrm{top}} to obtain the trace C^overlaptop\widehat{C}_{\mathrm{overlap}}^{\mathrm{top}}. For k>1k > 1, this trace originates from the outer solution of the preceding sweep.

  • Step B: Inner solve. Solve the inner equation, Eq. (4) for a slip wall or Eq. (5) for a no-slip wall, on Ωin\Omega_{\mathrm{in}}. The wall flux ∂C/∂η=δ g(x)\partial C/\partial\eta= \delta\,g(x) is imposed at η=ηwall\eta= \eta_{\mathrm{wall}}, and the Dirichlet condition CoverlaptopC_{\mathrm{overlap}}^{\mathrm{top}} is imposed at η=ηtop\eta= \eta_{\mathrm{top}}. The inner solution restricted to the overlap then serves as C^overlap\widehat{C}_{\mathrm{overlap}} in Eq. (6), which updates CoverlapC_{\mathrm{overlap}}.

  • Step C: Probe Dirichlet data for the outer problem. Evaluate the updated CoverlapC_{\mathrm{overlap}} at η=ηinterface\eta= \eta_{\mathrm{interface}} to obtain the trace C^overlapinterface\widehat{C}_{\mathrm{overlap}}^{\mathrm{interface}}. This trace originates from the inner solution of the current sweep.

  • Step D: Outer solve. Solve the SUPG-stabilized form of Eq. (1) on Ωout\Omega_{\mathrm{out}}. The prescribed far-field and lateral conditions are imposed, together with the Dirichlet condition C=C^overlapinterfaceC = \widehat{C}_{\mathrm{overlap}}^{\mathrm{interface}} at y=δηinterfacey = \delta\eta_{\mathrm{interface}}. The outer solution restricted to the overlap then serves as C^overlap\widehat{C}_{\mathrm{overlap}} in Eq. (6), which updates CoverlapC_{\mathrm{overlap}} to Coverlap(k)C_{\mathrm{overlap}}^{(k)}.

Each sweep thus performs one inner-to-outer and one outer-to-inner exchange, and each subdomain always receives the most recent information from the other. The sweep is repeated until the change of CoverlapC_{\mathrm{overlap}} between two successive sweeps falls below the tolerance ϵ\epsilon. Upon convergence, the inner and outer solutions agree throughout the overlap to within ϵ\epsilon and together constitute the coupled solution, which is compared with the single-domain reference.

One-way method: To assess the role of the two-way coupling, we also consider a one-way variant in which the procedure advances from Step A to Step D only once and never completes the Step D to Step A loop. The one-way approach is what is used in classical perturbation theory [13], which limits accuracy when complex phenomena such as flow separation are present. Comparing the one-way and fully coupled solutions, therefore, isolates the contribution of the outer-to-inner feedback. It demonstrates that the accuracy of the method stems from cycling the data exchange between the subdomains, not merely from performing subdomain solves.

The complete forward procedure is summarized in Algorithm 1 of Appendix A. Within this algorithm, the one-way variant corresponds to a single pass through the Schwarz loop, obtained by setting the iteration limit to K=1K = 1.

Inverse modeling through the differentiable physics solver

The forward solvers developed above serve as the basis for an inverse problem, in which an unknown parameter θ\theta of the transport model is recovered from measurements available only on a subregion Ωobs\Omega_{\mathrm{obs}} of the domain. The parameter may enter the governing operator, as in the diffusivity DD, or the boundary condition, as in the wall flux g(x)g(x). The recovery is posed as minimization of the data misfit

J(θ)=12∫Ωobs(C(θ)−Cobs)2 dx,(7)J(\theta) = \frac{1}{2}\int_{\Omega_{\mathrm{obs}}}\left(C(\theta)-C_{\mathrm{obs}}\right)^2\,\mathrm{d}x, \tag*{(7)}

where C(θ)C(\theta) denotes the forward prediction and CobsC_{\mathrm{obs}} the partial available data. In contrast to soft-constrained formulations, in which the governing equations are appended to the objective as penalty terms, the differentiable solver minimizes the misfit J(θ)J(\theta) subject to the governing equations and boundary conditions being satisfied exactly, to the accuracy of the discretization chosen, and the Schwarz coupling to the prescribed iterative tolerance. Minimization requires the gradient dJ/dθ\mathrm{d}J/\mathrm{d}\theta, whose computation differs between the single-domain and coupled treatments developed below: the single-domain case is presented first as a reference scenario, followed by the coupled solver methodology, in which the sensitivity is propagated across the subdomain interface through a differentiable strategy.

High-fidelity single-domain inverse solver formulation

In the single-domain solver, the forward problem is solved exactly at each parameter θ\theta and the state is thereby determined by the parameter, u=u(θ)\mathbf{u} = \mathbf{u}(\theta). Writing the discretized forward problem as R(u,θ)=0\mathbf{R}(\mathbf{u},\theta) = \mathbf{0}, the discrete adjoint yields the required derivative by introducing an adjoint state μ\boldsymbol{\mu}, which is first obtained from a transpose solve and then contracted to give the reduced gradient,

(∂R∂u)Tμ=(∂J∂u)T,dJdθ=∂J∂θ−μT∂R∂θ.(8)\left(\frac{\partial\mathbf{R}}{\partial\mathbf{u}}\right)^{\mathsf{T}}\boldsymbol{\mu} = \left(\frac{\partial J}{\partial\mathbf{u}}\right)^{\mathsf{T}}, \qquad\frac{\mathrm{d}J}{\mathrm{d}\theta} = \frac{\partial J}{\partial\theta} - \boldsymbol{\mu}^{\mathsf{T}}\frac{\partial\mathbf{R}}{\partial\theta}. \tag*{(8)}

The adjoint solve on the left is driven by the misfit sensitivity ∂J/∂u\partial J/\partial u, which is nonzero only on Ωobs\Omega_{\mathrm{obs}}. Since the forward operator is already factorized, this solve reuses the same factorization and is correspondingly inexpensive. Given μ\mu, the gradient on the right follows from a single contraction against the parametric sensitivity ∂R/∂θ\partial\mathbf{R}/\partial\theta and is exact for the discrete problem. In practice, neither relation is assembled by hand and the forward solve is recorded and reverse-differentiated by algorithmic automatic differentiation in FEniCS, which returns this gradient directly.

Schwarz-coupled inverse solver formulation

In the coupled solver, the forward evaluation is recorded as a directed sequence of subdomain solves connected by the interface transfer, and the corresponding adjoint is obtained by applying reverse-mode differentiation to this sequence. Since the two subdomains are coupled only through their interface traces, the transfer provides the sole pathway for sensitivity propagation between them. Each transfer samples one subdomain at the interface and injects the value as boundary data for the other. Denoting the inner-to-outer transfer by P\mathbf{P}, the receiving near-wall datum is Cinterface=P CinC_{\mathrm{interface}}=\mathbf{P}\,C_{\mathrm{in}}. As P\mathbf{P} is a fixed linear map, consisting of an interface probe composed with interpolation onto the receiving boundary, its adjoint is exactly the transpose PT\mathbf{P}^{\mathsf{T}}.

At a given θ\theta, the two subdomains are advanced alternately until the Schwarz iteration converges, after which the interface trace feeding back into the subdomain containing θ\theta is held fixed. Importantly, this frozen trace is now the converged interface trace, which evolved from the initialized interface trace over the Schwarz iteration. Thus, the recorded evaluation must be taken at the converged state for the gradient to correspond to the coupled problem. With the feedback frozen, the recorded model constitutes a single directed evaluation and JJ reduces to a function of θ\theta alone, so that its gradient follows from the same discrete adjoint Eq. (8), as in the single-domain case. The misfit sensitivity ∂J/∂u\partial J/\partial u, which remains nonzero only on Ωobs\Omega_{\mathrm{obs}}, seeds the adjoint in the subdomain containing the data, and the subsequent path of the adjoint is governed by the placement of θ\theta relative to the data region, leading to two regimes:

  • Common subdomain: When θ\theta resides in the same subdomain as the data, the adjoint is seeded and closed within it, PT\mathbf{P}^{\mathsf{T}} does not enter, and the recovery reduces to the single-domain adjoint on a single scale. Nevertheless, the coupling iteration remains necessary in the forward prediction, as the interface trace closing that subdomain acts as its boundary condition and determines the accuracy of the recovered field.

  • Distinct subdomains: When θ\theta lies in the opposing subdomain, the adjoint must cross, and PT\mathbf{P}^{\mathsf{T}} conveys the sensitivity from the data side across the overlap, with the adjoint of the remaining domain completing the path to θ\theta. This transposed transfer operator is the coupling mechanism in the reverse pass, without which the two subdomain adjoints decouple, and the cross-domain gradient vanishes identically.

Parametrization of the unknown variable

The construction is independent of how the unknown variable θ\theta is represented. In each case, the chosen quantities are declared as controls to the adjoint framework, and since the forward solve and the adjoint computations are unchanged, the representation affects only the form of the returned gradient. Throughout, θ\theta denotes the set of controls, and the cases differ in their definitions as follows.

  • Scalar control: When the unknown variable is a single scalar, such as the diffusivity DD or a spatially uniform boundary flux, θ\theta contains only that value.

  • Discrete field: When the unknown variable is a spatially varying field, such as a non-uniform wall flux g(x)g(x), it may be recovered pointwise, with θ={gi}\theta=\{g_i\} the nodal values on the mesh and the adjoint returning the sensitivity at each node. This representation imposes no functional form on gg, at the cost of one control variable per node. As a consequence, the dimension of θ\theta scales proportionally with the chosen mesh resolution.

  • Functional basis: The same field may instead be expanded in a set of basis functions, g(x)=∑jcjϕj(x;βj)g(x)=\sum_j c_j\phi_j(x;\beta_j), which represent it with substantially fewer controls than a nodal discretization. The controls θ={cj,βj}\theta=\{c_j,\beta_j\} comprise the linear coefficients cjc_j that scale the basis functions and the internal parameters βj\beta_j, such as the frequency of a sinusoidal function, which enter nonlinearly. The adjoint returns the gradient with respect to both through the same recorded differentiation. The basis set may be fixed and selected from a predefined library or grown during the inversion.

Inverse solution procedure

With the gradient computation and the parametrizations established, the complete inverse problem is solved by an iterative loop that separates two roles. The differentiable physics solver evaluates the objective and its gradient, and an optimizer uses this information to update the unknown parameter. This workflow is shown in Figure 2. Starting from an initial guess θ0\theta^0, each optimization epoch nn consists of the following steps.

Figure 2. Inverse modeling with the differentiable physics solver. At each optimization epoch nn, the solver maps the control θn\theta^n, together with the known boundary conditions and PDE parameters, to a prediction that is compared with the observational data to form the misfit JJ. The adjoint gradient ∇θJ\nabla_\theta J is then passed to an update operator θn+1←O(J,∇θJ,θn)\theta^{n+1} \leftarrow\mathcal{O}(J,\nabla_\theta J,\theta^n). Three realizations of O\mathcal{O} are considered: Method 1, classical gradient-based optimizers; Method 2, a passive LLM optimizer with access to a limited history of JJ, ∇θJ\nabla_\theta J, and θ\theta; and Method 3, an active agentic optimizer with access to the complete history and the full inverse-solver workflow.

  • Step 1: Forward evaluation. Solve the forward problem at θn\theta^n. For the single-domain solver, this is a direct solve on the full mesh. For the Schwarz-coupled solver, the Schwarz iteration of § 2.2.2 is first advanced to convergence without being recorded for differentiation. The interface trace feeding the subdomain containing θ\theta is then frozen at its converged value, and a single directed evaluation of the coupled model is recorded with this trace held fixed.

  • Step 2: Misfit evaluation. Compare the forward prediction with the observations on Ωobs\Omega_{\mathrm{obs}} to obtain J(θn)J(\theta^n) from Eq. (7).

  • Step 3: Adjoint gradient. Apply reverse-mode algorithmic differentiation to the recorded evaluation to obtain ∇θJ(θn)\nabla_\theta J(\theta^n), following Eq. (8). Because only the final evaluation is recorded, the cost and memory of the reverse pass are independent of the number of Schwarz sweeps. When θ\theta and the data lie in distinct subdomains, the sensitivity crosses the overlap through PT\mathbf{P}^{\mathsf{T}}, as described in § 2.3.2.

  • Step 4: Parameter update. Pass the objective, its gradient, and the current iterate to the update operator O\mathcal{O}, which returns θn+1=O(J,∇θJ,θn)\theta^{n+1}=\mathcal{O}(J,\nabla_\theta J,\theta^n).

The loop is repeated until the misfit or the parameter update falls below a prescribed tolerance, or until a maximum number of epochs is reached. The optimization epoch nn is distinct from the Schwarz sweep index kk, and every epoch contains a complete, converged Schwarz iteration within Step 1.

Steps 1–3 are identical in all cases. The optimization methods differ only in how Step 4 is realized. Three methods are considered, shown as Methods 1–3 in Figure 2. The classical method establishes the reference case, while the two large language model (LLM) configurations differ in the extent of their access to the inverse solver workflow:

  • Method 1 – Classical optimization: In this method, the update operator O\mathcal{O} is a conventional gradient-based optimizer, such as gradient descent, Adam, L-BFGS, a secant method, or a damped Newton method. The update rule is fixed in advance and applied identically at every epoch. Among these, the first-order Adam scheme serves as the reference update rule throughout, and the second-order damped Newton scheme is applied where the control dimension keeps the curvature information tractable.

  • Method 2 – Passive LLM optimization: In this method, the update operator is realized by an LLM, the open-source Qwen3-8B [66], which acts as a standalone optimizer in place of the classical update rule. The model is prompted to act as a minimization engine. It may employ any of the classical methods, and it must record the action taken and its reasoning at every epoch. Its access is limited to the recent optimization history, namely a text-formatted record of JJ, ∇θJ\nabla_\theta J, and θ\theta over the ten most recent epochs. It returns the selected method and its controls, from which the controller computes θn+1\theta^{n+1}, together with a log of the reasoning behind it. The model is passive in the sense that it acts only on this history and has no access to the solver or the wider workflow. This configuration assesses whether a language model can generate effective updates from the optimization history alone in a very controlled fashion.

  • Method 3 – Active agentic optimization: In this method, the update operator is realized by an autonomous LLM agent, GPT 5.6 Terra, built on Codex [67], which receives a similar prompt and produces the same type of output as in Method 2. However, the agent is given access to the complete optimization history and to the full inverse solver workflow. It has read access to the entire code but write access only to the definition of θ\theta, so that the forward and adjoint computations remain untouched and the agent operates solely on their output. At each epoch, after Steps 1–3 are complete, the agent examines the misfit and adjoint sensitivities and returns the update method and its controls, from which the controller computes θn+1\theta^{n+1}. In addition, the write access allows the agent to change the representation of θ\theta during the inversion, which is exploited only for the functional basis parametrization (§ 3.2.3). This cycle continues for a prescribed number of epochs.

The distinction between the three methods is most pronounced for the functional basis parametrization. Method 1 can adjust only the coefficients of a fixed library. In contrast, the agent of Method 3 can additionally grow the library during the inversion, deciding under a prescribed admission policy when to admit new candidate functions and initializing their parameters. The idea is motivated by the recent use of LLMs for equation discovery and symbolic regression [68, 69], although here the search is restricted to the staged admission of prescribed candidate functions. The complete inverse procedure is summarized in Algorithm 2 of Appendix § 8.

Differentiable physics solver implementation

The forward and inverse formulations are implemented in a differentiable programming workflow built on the FEniCS finite element framework [43], with the variational forms expressed in the Unified Form Language (UFL) [70]. Differentiation is performed with dolfin-adjoint [45, 44], whose pyadjoint backend records the forward operations on a computational tape. The unknown θ\theta is registered as a control and the misfit as a reduced functional, so that the state remains implicitly constrained by the discrete forward problem. In the reverse pass, the UFL residual is differentiated symbolically to assemble the transpose adjoint system and accumulate the reduced gradient. Because differentiation acts on the discrete variational form, the adjoint is consistent with the assembled forward problem, and the gradients are exact for the discrete problem up to solver tolerance, without manual derivation of the adjoint equations. This differentiable physics framework for transport equations was developed and validated in our recent study [50].

Benchmark Problem

2D Steady Double Gyre Flow: A passive scalar is transported on the unit square Ω=[0,1]2\Omega= [0,1]^2 by a steady double-gyre flow, following the boundary layer transport benchmark of [13]. The double gyre flow was chosen as it induces flow separation at the bottom wall. The incompressible velocity field is generated from the streamfunction ψ(x,y)=0.1sin⁡(2πx)sin⁡(πy)\psi(x,y) = 0.1\sin(2\pi x)\sin(\pi y) and is given by

v(x,y)=[0.1πsin⁡(2πx)cos⁡(πy), −0.2πcos⁡(2πx)sin⁡(πy)],(9)\mathbf{v}(x,y) = \left[0.1\pi\sin(2\pi x)\cos(\pi y),\ -0.2\pi\cos(2\pi x)\sin(\pi y)\right], \tag*{(9)}

so that ∇⋅v=0\nabla\cdot\mathbf{v} = 0. Three diffusivities are considered, D∈{10−4,10−5,10−6}D \in\{10^{-4}, 10^{-5}, 10^{-6}\}, with domain scale L=1L = 1 and characteristic speed U=max⁡∣v∣=0.2πU = \max|\mathbf{v}| = 0.2\pi. The corresponding Péclet numbers, Pe⁡=UL/D≈6.3×103\operatorname{Pe} = UL/D \approx6.3 \times10^3, 6.3×1046.3 \times10^4, and 6.3×1056.3 \times10^5, place the transport in the advection-dominated regime. A thin diffusive boundary layer of thickness O(δ)O(\delta) forms adjacent to the lower wall y=0y = 0, while the bulk remains advection dominated. Since the near-wall tangential velocity vx(x,0)=0.1πsin⁡(2πx)v_x(x,0) = 0.1\pi\sin(2\pi x) is O(U)O(U), the layer follows the slip-wall scaling δ∼Pe⁡−1/2\delta\sim\operatorname{Pe}^{-1/2}. Accordingly, δ\delta ranges from 10−210^{-2} to 10−310^{-3} across the three cases. A nonhomogeneous Neumann condition, ∂C/∂y∣y=0=g(x)\left.\partial C/\partial y\right|_{y=0} = g(x), is imposed on the lower wall, and homogeneous Dirichlet conditions are imposed on the remaining three boundaries.

The wall flux is written g(x)=−AK(x)g(x) = -A K(x), where A>0A > 0 sets the peak influx magnitude and K(x)K(x) its spatial shape. To test the solver under forcing of increasing spatial complexity, four peak-normalized shapes are used:

K(x)={1,Constant,4x(1−x),Polynomial envelope,0.5[1−cos⁡(2kπx)],Fourier envelope,2x(1−x)[1−cos⁡(2kπx)],Hybrid Poly-Fourier envelope,with k=3.(10)K(x) = \begin{cases} 1, & \text{Constant},\\ 4x(1-x), & \text{Polynomial envelope},\\ 0.5\left[1-\cos(2k\pi x)\right], & \text{Fourier envelope},\\ 2x(1-x)\left[1-\cos(2k\pi x)\right], & \text{Hybrid Poly-Fourier envelope}, \end{cases} \qquad\text{with } k = 3. \tag*{(10)}

Each shape is nonnegative with unit peak, 0≤K(x)≤10 \le K(x) \le1. With A=10A = 10,

gconst=−10,gpoly=−40x(1−x),gFourier=−5[1−cos⁡(6πx)],ghybrid=−20x(1−x)[1−cos⁡(6πx)].(11)g_{\mathrm{const}} = -10,\qquad g_{\mathrm{poly}} = -40x(1-x),\qquad g_{\mathrm{Fourier}} = -5\left[1-\cos(6\pi x)\right],\qquad g_{\mathrm{hybrid}} = -20x(1-x)\left[1-\cos(6\pi x)\right]. \tag*{(11)}

The four profiles represent uniform, single-lobed, oscillatory, and combined lobed–oscillatory forcing. They benchmark the Schwarz-coupled inverse solver under bottom-wall forcing of increasing spatial complexity.

Geometric definition: The single-domain solver discretizes the full unit square Ω=[0,1]2\Omega= [0,1]^2 in physical coordinates. For the Schwarz-coupled solver, the domain is divided along the wall-normal direction into two overlapping subdomains, Ωin\Omega_{\mathrm{in}} and Ωout\Omega_{\mathrm{out}}, both spanning the full wall length 0≤x≤10 \le x \le1. The inner subdomain extends from the wall, η=0\eta= 0, to its upper artificial boundary, ηtop=7\eta_{\mathrm{top}} = 7, and is discretized in the stretched coordinate η\eta. The outer subdomain extends from its lower artificial boundary, ηinterface=2\eta_{\mathrm{interface}} = 2, to the far-field boundary, y=1y = 1, and is discretized in the physical coordinate yy. In physical units, the artificial boundaries lie at y=2δy = 2\delta and y=7δy = 7\delta, so that the two subdomains overlap over 2δ≤y≤7δ2\delta\le y \le7\delta, a thickness of 5δ5\delta. Because the inner subdomain is defined in the stretched coordinate, its extent in η\eta and hence the number of grid divisions across the boundary layer are independent of DD and only its physical height, 7δ7\delta, contracts as DD decreases. The outer subdomain, in contrast, resolves the bulk flow, where the solution varies on the scale of the domain. Six mesh resolutions are considered for the grid-refinement study, labeled M0 to M5 and summarized in Table 1, with the nominal resolution doubling from m=128m = 128 to m=4096m = 4096 between successive levels. At each level, the single-domain solver employs an m×mm \times m grid with (m+1)2(m+1)^2 degrees of freedom (DOFs). The Schwarz-coupled solver employs an m×(m/8)m \times(m/8) inner grid, with mm divisions along the wall and m/8m/8 divisions across η∈[0,ηtop]\eta\in[0,\eta_{\mathrm{top}}], and an m×(15m/16)m \times(15m/16) outer grid over y∈[δηinterface,1]y \in[\delta\eta_{\mathrm{interface}},1], giving 6.3–7.0% more DOFs than the single-domain solver at the same mm. The Schwarz iteration employs an under-relaxation factor ω=0.5\omega= 0.5 and a convergence tolerance ϵ=10−10\epsilon= 10^{-10}, with the overlap field initialized to the far-field concentration, Coverlap(0)=0C_{\mathrm{overlap}}^{(0)} = 0. Accuracy is assessed against the high-fidelity reference (the single-domain solution on M4). All computations were performed on a single workstation with an Intel Xeon W-1370P processor (3.6 GHz, 8 cores, 16 threads) and 32 GB of memory.

Mesh tagMesh resolutionGridDOFsInner gridOuter gridTotal DOFs
M0Very coarse128×128128 \times12816,641128×16128 \times16128×120128 \times12017,802
M1Coarse256×256256 \times25666,049256×32256 \times32256×240256 \times24070,418
M2Medium512×512512 \times512263,169512×64512 \times64512×480512 \times480280,098
M3Fine1024×10241024 \times10241,050,6251024×1281024 \times1281024×9601024 \times9601,117,250
M4Very fine2048×20482048 \times20484,198,4012048×2562048 \times2562048×19202048 \times19204,462,722
M5Super fine4096×40964096 \times409616,785,4094096×5124096 \times5124096×38404096 \times384017,838,338

Table 1. Grid dimensions, given as mx×mym_x \times m_y divisions, and degrees of freedom (DOFs) for each mesh level. The piecewise-linear discretization places one DOF at each of the (mx+1)(my+1)(m_x + 1)(m_y + 1) grid vertices. The single-domain solver uses a single m×mm \times m grid over Ω\Omega. The Schwarz-coupled solver uses an m×(m/8)m \times(m/8) inner grid over η∈[0,ηtop]\eta\in[0,\eta_{\mathrm{top}}] in stretched coordinates and an m×(15m/16)m \times(15m/16) outer grid over y∈[δηinterface,1]y \in[\delta\eta_{\mathrm{interface}},1] in physical coordinates. The coupled solver therefore contains between 6.3% (M5) and 7.0% (M0) more DOFs than the single-domain solver at the same mm.

Results

Differentiable Schwarz Coupled Solver: Forward and Inverse Modeling

We first benchmark the proposed Schwarz-coupled solver as a forward map against a high-fidelity single-domain solver. The single-domain solver resolves the thin boundary layer directly on a globally refined mesh. In addition, a feedback-free one-way method, in which interface information is transferred without alternating outer–inner updates, is included as an additional case to isolate the contribution of “bidirectional” Schwarz coupling. The forward comparison is performed for D∈{10−4,10−5,10−6}D \in\{10^{-4}, 10^{-5}, 10^{-6}\} under the constant Neumann bottom wall condition g(x)=−10g(x)=-10. Next, the Schwarz-coupled solver is employed as the differentiable forward model in adjoint-based inverse recovery experiments. Two inverse problems are considered: identification of the unknown diffusion coefficient DD and reconstruction of the unknown Neumann boundary condition gg at the bottom wall.

Forward Modeling

As a prerequisite for the benchmarking, a grid-convergence study is first performed to establish a sufficiently resolved high-fidelity reference solution. This is conducted at the smallest diffusivity considered (D=10−6D = 10^{-6}) where the concentration boundary layer is thinnest (numerically, the most challenging case). For this purpose, the single-domain mesh is successively refined from M1 to M5, as listed in Table 1, and the resulting wall concentration profiles on M1–M4 are shown in the left panel of Figure 3a. The profiles converge systematically with refinement, and the M3 and M4 solutions closely agree over the entire wall. This convergence is quantified in the center panel through the spatially averaged wall concentration, ⟨Cwall⟩=∫01C(x,0) dx\langle C_{\mathrm{wall}}\rangle= \int_{0}^{1} C(x,0)\,\mathrm{d}x, which approaches an asymptotic value as the mesh is refined, the change between M4 and M5 being negligible compared with that between the coarser levels. The relative wall profile error with respect to M4 decreases from 29.81% on M1 to 10.16% on M2 and 2.17% on M3 (Table 2). The single-domain solution on M4 is therefore adopted as the high-fidelity reference for all diffusivities, and the corresponding wall profiles are compared in the right panel of Figure 3a.

Forward solver verification of the Schwarz-coupled solver

Figure 3. Forward solver verification of the Schwarz-coupled solver against the high-fidelity single-domain reference on the double-gyre benchmark. (a) High-fidelity solver: the wall profile Cwall(x)C_{\mathrm{wall}}(x) for meshes M1–M4 at D=10−6D = 10^{-6} (left); the spatially averaged wall concentration ⟨Cwall⟩\langle C_{\mathrm{wall}}\rangle against mesh refinement (center); and Cwall(x)C_{\mathrm{wall}}(x) on M4 for D∈{10−4,10−5,10−6}D \in\{10^{-4}, 10^{-5}, 10^{-6}\} (right). (b) At D=10−4D = 10^{-4} on M4, the concentration fields for the high-fidelity (with superimposed streamlines), one-way, and Schwarz solvers, together with the corresponding Cwall(x)C_{\mathrm{wall}}(x) traces and the pointwise error maps of the one-way and Schwarz solutions, sharing the same colormap. (c) Computational performance: the Schwarz Cwall(x)C_{\mathrm{wall}}(x) on the coarse M1 mesh overlaid on the M4 reference (left); the relative full-domain L∞L_\infty error of the high-fidelity (dashed, M1–M3) and Schwarz (solid, M1–M4) solutions with respect to the high-fidelity M4 reference (center); and the Schwarz speedup relative to the high-fidelity M4 solve (right).

MethodMeshSchwarz iterationsRel. L∞L_{\infty} error Full domainRel. L2L_2 error Full domainRel. L2L_2 error Wall profileRuntime (s)
Single domainM1—1.1297%0.2058%0.7040%1.52
M2—0.5571%0.0589%0.2260%6.36
M3—0.2205%0.0162%0.0628%34.67
M4—ReferenceReferenceReference203.51
One-wayM414.1991%10.8442%7.3910%195.36
SchwarzM1480.9981%1.2050%0.7691%3.39
M2470.4811%0.1592%0.2283%12.32
M3470.1775%0.0378%0.0570%47.31
M4470.0224%0.0076%0.0080%240.11
Single domainM1—4.7966%1.5127%4.8779%1.54
M2—1.5512%0.3328%1.1779%7.01
M3—0.5620%0.0632%0.2549%35.45
M4—ReferenceReferenceReference254.92
One-wayM413.7295%10.9711%7.3690%251.42
SchwarzM1453.0210%4.2335%1.2549%3.62
M2451.0953%0.8767%0.4388%11.01
M3450.2981%0.1866%0.1316%46.99
M4450.2800%0.0368%0.0682%277.71
Single domainM1—32.7257%13.7340%29.8072%1.48
M2—10.3612%2.3819%10.1571%6.45
M3—2.2785%0.4591%2.1689%31.68
M4—ReferenceReferenceReference254.83
One-wayM414.3020%10.4922%6.9450%243.64
SchwarzM1396.3448%13.1975%3.6150%2.94
M2434.1676%8.9514%1.8091%10.05
M3431.8609%2.2243%0.7292%41.57
M4431.2081%0.5807%0.6780%265.18

Table 2. Forward solver accuracy and computational cost on the double-gyre benchmark, grouped by diffusivity DD. The single-domain solution on M4 serves as the high-fidelity reference. The single-domain solver is evaluated on M1–M4, the one-way method on M4, and the alternating Schwarz method on M1–M4, using relaxation factor ω=0.5\omega= 0.5 and convergence tolerance ε=10−10\varepsilon= 10^{-10}. Relative L∞L_{\infty} errors are normalized by max⁡∣Cref∣\max|C_{\mathrm{ref}}|, and relative L2L_2 errors by the L2L_2 norm of the reference over the same region (full domain or wall). All errors are reported as percentages. For all methods, runtimes are end-to-end wall-clock times for one complete forward solve, including operator assembly and factorization, and, for the decomposed methods, all subdomain solves and interface transfers.

Before comparing the Schwarz and single-domain solvers, we examine whether bidirectional coupling is necessary for resolving the thin boundary layer accurately by comparing the one-way and Schwarz-coupled solutions at D=10−4D = 10^{-4} on the M4 mesh and with identical boundary conditions. The concentration fields and error distributions are presented in Figure 3b. The double-gray streamlines, superimposed on the high-fidelity reference, show that the flow lifts the concentration away from the wall near x=0.5x = 0.5, carrying it from the boundary layer through the bulk toward the upper wall. The one-way method reproduces the overall structure of the field and qualitatively captures the boundary layer, but it quantitatively deviates from the reference, whereas the Schwarz profile is nearly indistinguishable from it. The one-way error, with a maximum of 1.44×10−21.44 \times10^{-2}, extends well beyond the near-wall region and persists throughout the bulk, showing that an accurate local representation of the boundary layer alone is insufficient to recover the global field due to flow separation. The maximum Schwarz error, 7.71×10−57.71 \times10^{-5}, is more than two orders of magnitude smaller, corresponding to 0.02% of the peak concentration, and is confined to the region near the upper wall where the plume impinges and generates local gradients. Across all three diffusivities, the one-way method yields relative full-domain L2L_2 errors of 10.5–11.0% and wall-profile errors of approximately 7%, despite being evaluated on the finest mesh.

With the coupling established, we turn to the central comparison between the Schwarz-coupled and single-domain solvers in resolving the thin boundary layer as both are coarsened from M4 to M1, as summarized in Figure 3c. The

left panel shows that, on the coarsest mesh, M1, the Schwarz wall profiles closely follow the M4 reference for all three diffusivities. In contrast, the single-domain wall profiles at D=10−6D = 10^{-6}, shown for the different mesh resolutions in the left panel of Figure 3a, deviate markedly from the reference on the coarse meshes M1 and M2, indicating that the single-domain solver under-resolves the boundary layer at these resolutions. As the boundary layer thins, the Schwarz solver leveraging perturbation theory continues to resolve the near-wall field accurately on a coarse mesh and offers a clear advantage in accuracy over the single-domain solver at the coarser mesh resolution. This qualitative observation is quantified in the center panel of Figure 3c and in Table 2. The center panel compares the relative full-domain L∞L_{\infty} error of both solvers on each mesh with respect to the single-domain reference solution on M4. Since the solution attains its largest values and steepest gradients in the thin boundary layer, this error is sensitive to how well each solver resolves the layer. For every diffusivity, the Schwarz error decreases monotonically with mesh refinement, while the number of Schwarz iterations varies only between 39 and 48, indicating that the convergence of the coupling procedure depends only weakly on the mesh resolution. On every mesh from M1 to M3 and for all diffusivities, the Schwarz L∞L_\infty error is lower than that of the single-domain solver, and the difference widens progressively as DD decreases. At D=10−4D = 10^{-4}, the boundary layer is thick enough to be captured on the coarse single-domain mesh, and the two solvers attain comparable errors. The benefit of the Schwarz solver becomes evident as the diffusivity is reduced. At D=10−6D = 10^{-6}, the single-domain error becomes considerably larger and remains so on all coarser meshes, reaching 32.73%, 10.36%, and 2.28% on M1, M2, and M3, compared with 6.34%, 4.17%, and 1.86% for the Schwarz solver, a fivefold reduction on the coarsest mesh. The relative L2L_2 errors of the wall profile in Table 2 confirm this advantage at the wall itself. On M1, the Schwarz wall error remains between 0.77% and 3.62% for all three diffusivities, and at D=10−6D = 10^{-6} the Schwarz wall errors of 3.62%, 1.81%, and 0.73% on M1, M2, and M3 are three to eight times lower than the corresponding single-domain errors of 29.81%, 10.16%, and 2.17%. The full-domain L2L_2 error, in contrast, is higher for the Schwarz solver in most cases. This metric is dominated by low-level errors over the bulk of the domain, where the concentration itself is close to zero, whereas the non-zero concentration is noticeable only in the thin region adjacent to the wall. The full-domain L2L_2 error is therefore less sensitive to the resolution of the thin boundary layer and is not an appropriate measure of accuracy for thin boundary layer problems, which are the scope of the present work; however, it is reported for completeness.

The computational cost of the Schwarz-coupled solver is presented in the right panel of Figure 3c as its speedup relative to the single-domain solver on M4. On M4 itself, the Schwarz-coupled solver is slower than the single-domain solver, with a speedup of 0.85–0.96, owing to the coupling iterations between the inner and outer subdomain solves. In contrast, on the coarser meshes, speedups of 60–87 on M1, 16.5–25.4 on M2, and 4.3–6.1 on M3 are achieved. Consequently, the Schwarz-coupled solver resolves the near-wall field accurately at a substantially lower cost than the fine-mesh single-domain solution. Nevertheless, on any given mesh, the single-domain solver is faster than the Schwarz-coupled solver, although it does not resolve the wall profile with the same accuracy. For a fair assessment, the two solvers should be compared at equal wall accuracy, by pairing the Schwarz-coupled solver on M1 with the single-domain solver on the coarsest mesh whose wall error does not exceed that of the Schwarz-coupled solver. At D=10−4D = 10^{-4}, this required mesh is M1 itself, since the boundary layer is thick enough for the single-domain solver to resolve it, and the Schwarz-coupled solver is approximately two times slower. As DD decreases, the single-domain solver requires finer meshes to match the wall accuracy, namely M2 at D=10−5D = 10^{-5} and M3 at D=10−6D = 10^{-6}, and the Schwarz-coupled solver becomes approximately two and eleven times faster, respectively. Thus, the advantage of the Schwarz-coupled solver grows with the Péclet number.

Inverse Modeling

Following the verification of the forward solvers, each solver is now employed as the differentiable forward model in an inverse setting. For comparison, the single-domain solver is applied to the same inverse problems, together with the one-way variant, which is included to demonstrate the importance of bidirectional coupling for inverse simulation of a multi-domain problem. Two unknowns of distinct character are considered: diffusivity DD and constant wall flux gg. More complex spatially varying fluxes are considered in the next section.

The observations are taken from three zones, each spanning the full wall length (0≤x≤10 \le x \le1): the inner zone, 0.1δ≤y≤1.95δ0.1\delta\le y \le1.95\delta (0.1≤η≤1.950.1 \le\eta\le1.95), between the wall and the overlap; the outer zone, 2δ≤y≤12\delta\le y \le1, extending from the overlap into the outer wall; and the overlap zone, 2δ≤y≤7δ2\delta\le y \le7\delta (2≤η≤72 \le\eta\le7), used in the overlap strategy introduced below. Observations on the wall and immediately above it, 0≤y<0.1δ0 \le y < 0.1\delta, are excluded. Data in this region would allow flux to be estimated directly, for instance by finite differences, without using the governing equation. The noise-free synthetic data are generated by the single-domain solver on M4 with the true parameter values and interpolated onto the nodes of each solver’s mesh within the respective zone, and the misfit of (7) is evaluated on that mesh. The observation zones are therefore identical for the single-domain, Schwarz-coupled, and one-way solvers, whereas the number of observation nodes depends on the solver and the mesh. In particular, the stretched inner mesh of the Schwarz-coupled solver contains more nodes within the inner zone than the single-domain mesh of the same level. For the single-domain solver, the placement of the data affects only their information content, whereas for the Schwarz-coupled solver it also determines which operations are recorded for the adjoint computation. In all inverse simulations of this section, the parameter is updated by the Adam optimizer, a first-order gradient-based method, applied here with the exact adjoint gradient and a step-decay learning-rate schedule, with an initial learning rate of 10−110^{-1} decayed by a factor of 0.75 every 50 epochs. The epoch budget is increased as DD decreases, since the thinning boundary layer makes the recovery more demanding, and is set to 250, 500, and 750 epochs for D=10−4D = 10^{-4}, 10−510^{-5}, and 10−610^{-6}, respectively. Each forward evaluation of the Schwarz-coupled solver uses a relaxation factor ω=0.5\omega= 0.5, a tolerance ϵ=10−10\epsilon= 10^{-10}, and at most 200 Schwarz iterations. All optimization settings are likewise identical for the three solvers.

The accuracy of the recovered parameter is affected by the discretization error of the forward model, which is

determined by the mesh resolution. For each method and data placement, the mesh is therefore refined progressively, starting from the coarsest level until the recovered parameter meets the target relative error, and the coarsest mesh that meets this target is reported. Consistent with the forward solver comparison of § 3.1.1, the methods are thus compared at equal accuracy rather than on the same mesh, and the procedure identifies the coarsest resolution, and hence the lowest computational cost, at which each method achieves the required accuracy. Furthermore, since the recovered parameter evolves over the epochs and may overshoot or oscillate before settling, meeting the target must be defined precisely, both to decide whether a recovery is successful and to measure its cost. The definition adopted here reflects how an inversion is assessed in practice. With real measurements, the true parameter is unknown, and the only available indication of convergence beyond the data loss is that the estimate ceases to change over the epochs. After an initial transient, the optimizing parameter settles onto a plateau and remains there over many epochs, and this stabilized value is adopted as the final estimate. Since the observations here are synthetic, the accuracy of this plateau can be assessed against the true value. Formally, let θn\theta^n denote the recovered parameter at epoch nn, en=∣θn−θ∣/∣θ∣e^n = \lvert\theta^n - \theta\rvert/\lvert\theta\rvert its relative error with respect to the true value θ\theta, and NN the final epoch. A recovery is successful if eN≤1%e^N \le1\%. For a successful recovery, the epochs to target, ntn_t, are determined by scanning the history backward from NN until the error first exceeds 1%, and ntn_t is taken as the epoch immediately following. By construction, the condition en≤1%e^n \le1\% holds at ntn_t and at every subsequent epoch up to NN, thus ntn_t marks the onset of the final uninterrupted plateau within the target band. A forward criterion, which records the first epoch at which en≤1%e^n \le1\%, would not be reliable, since a trajectory may pass through the true value during the transient and subsequently settle elsewhere (as seen in our results), which can happen due to the inaccurate estimation of data by the solver. For each method and data placement, these values are reported on the coarsest successful mesh.

The convergence behavior of the inverse parameter recovery is illustrated at the representative intermediate diffusivity D=10−5D = 10^{-5}, for both the constant wall flux and the diffusivity, as shown in Figure 4a and Figure 4b, respectively. In each case, the left pair of panels corresponds to inner data and the right pair to outer data, and the misfit and the recovered parameter are plotted against the wall-clock time of the adjoint optimization loop alone. The solver setup, comprising operator assembly and factorization, depends on the mesh and the solver and is therefore excluded, so that the curves compare the optimization cost of all recoveries from a common time origin value. The wall times in Table 4 and Table 3, in contrast, include both the solver setup and the adjoint optimization loop. The recovery of the constant wall flux is examined first, with the initial estimate set to g=−5g = -5 in all experiments. With inner data, the Schwarz-coupled solver meets the target on the coarsest mesh, M0. Its recovered wall flux overshoots to approximately −12-12 during an initial transient before settling onto the true value, while the misfit decreases, with corresponding oscillations. The single-domain solver, in contrast, fails on the same coarse mesh, M0 (dashed curve). Its recovered wall flux crosses the true value and settles at approximately −11.5-11.5. The single-domain solver meets the target only on the considerably finer mesh, M2, on which the recovered wall flux decreases monotonically and settles onto the true value after a longer runtime. Both successful recoveries require nearly the same number of epochs, 93 for the Schwarz-coupled solver on M0 and 91 for the single-domain solver on M2 (Table 3), so that the difference in wall time arises from the cost of each epoch, which is determined by the mesh. Consistent with the forward results, the ability of the Schwarz-coupled solver to resolve the boundary layer on a coarse mesh thus translates directly into a lower cost of the inversion.

Figure 4. Convergence of the inverse recovery at D=10−5D = 10^{-5} for the single-domain and Schwarz-coupled solvers. (a) Recovery of the constant wall flux, with true value g=−10g = -10; (b) recovery of the diffusivity, with true value D=10−5D = 10^{-5}. In each row, the left pair of panels corresponds to observations in the inner domain and the right pair to observations in the outer domain, along with the overlap domain using only the Schwarz-coupled solver. Within each pair, the misfit JJ (left) and the recovered parameter (right) are plotted against the wall-clock time of the adjoint optimization loop only, excluding the solver setup, with each run offset to start at t=1t = 1 s on the logarithmic axis. The wall times in Tables 3 and 4, in contrast, include both the setup and the adjoint optimization. Solid curves: each method on its coarsest mesh attaining the 1% target. Dashed curves: the competing method on the same mesh, failing to attain the target. Black markers: Schwarz-coupled solver with overlap-zone observations. Dashed horizontal line: true value.

Inverse Wall Flux Recovery
MethodData zoneCoarsest meshEpochs to targetWall time (s)Converged value
D=10−4D = 10^{-4}
Single domainInnerM1 (Coarse)91236.72−10.0174-10.0174
OverlapM1 (Coarse)86204.79−10.0675-10.0675
OuterM1 (Coarse)87206.81−10.0493-10.0493
SchwarzInnerM1 (Coarse)65113.37−9.9907-9.9907
OverlapM1 (Coarse)91158.37−10.0784-10.0784
OuterM1 (Coarse)82285.56−9.9222-9.9222
One-wayInnerNot achieved——−11.1426-11.1426
D=10−5D = 10^{-5}
Single domainInnerM2 (Medium)91788.93−10.0524-10.0524
OverlapM1 (Coarse)89174.17−10.0938-10.0938
OuterM1 (Coarse)86167.95−10.0700-10.0700
SchwarzInnerM0 (Very coarse)9329.70−10.0771-10.0771
OverlapM1 (Coarse)9394.44−10.0690-10.0690
OuterM3 (Fine)795914.58−9.9685-9.9685
One-wayInnerNot achieved——−11.1304-11.1304
D=10−6D = 10^{-6}
Single domainInnerM3 (Fine)61529066.16−9.9081-9.9081
OverlapM2 (Medium)4093445.69−9.9732-9.9732
OuterM3 (Fine)934396.51−10.0000-10.0000
SchwarzInnerM1 (Coarse)6856.69−10.0139-10.0139
OverlapM2 (Medium)58156.83−10.0643-10.0643
OuterM3 (Fine)9116318.39−9.9661-9.9661
One-wayInnerNot achieved——−11.7466-11.7466

Table 3. Efficiency and accuracy of the inverse wall flux recovery under constant wall flux, grouped by the diffusivity DD. The data zone indicates the region containing the observations. For each method and data zone, the mesh is refined from M0 until the target is met, and the coarsest successful mesh is reported. On that mesh, the epoch count is the first epoch of the final uninterrupted interval in which the error remains below 1%, and the wall time is the cumulative end-to-end wall-clock time up to that epoch, including, for all methods, operator assembly and factorization, and every forward and adjoint solve, together with, for the decomposed methods, the Schwarz iterations, and all interface transfers. Bold marks the shorter wall time between the single domain and Schwarz methods for the same data zone. The converged value is the final recovered wall flux. A method is marked Not achieved when no tested mesh meets the target, in which case the value from the mesh with the smallest final error is reported.

MethodData zoneCoarsest meshEpochs to targetWall time (s)Converged value
Single domainInnerM1 (Coarse)100274.481.0035×10−41.0035 \times10^{-4}
OverlapM1 (Coarse)136299.611.0006×10−41.0006 \times10^{-4}
OuterM1 (Coarse)131334.281.0025×10−41.0025 \times10^{-4}
SchwarzInnerM1 (Coarse)106337.289.9498×10−59.9498 \times10^{-5}
OverlapM0 (Very coarse)16561.991.0034×10−41.0034 \times10^{-4}
OuterM2 (Medium)1442535.029.9294×10−59.9294 \times10^{-5}
One-wayInnerNot achieved——1.3157×10−41.3157 \times10^{-4}
Single domainInnerM2 (Medium)1081031.479.9203×10−69.9203 \times10^{-6}
OverlapM2 (Medium)1561618.209.9986×10−69.9986 \times10^{-6}
OuterM2 (Medium)1311120.861.0027×10−51.0027 \times10^{-5}
SchwarzInnerM0 (Very coarse)17276.031.0084×10−51.0084 \times10^{-5}
OverlapM0 (Very coarse)13488.891.0052×10−51.0052 \times10^{-5}
OuterM3 (Fine)13911696.109.9377×10−69.9377 \times10^{-6}
One-wayInnerNot achieved——1.2103×10−51.2103 \times10^{-5}
Single domainInnerM3 (Fine)1276767.139.9932×10−79.9932 \times10^{-7}
OverlapM2 (Medium)1992083.829.9075×10−79.9075 \times10^{-7}
OuterM3 (Fine)1256071.571.0003×10−61.0003 \times10^{-6}
SchwarzInnerM1 (Coarse)108127.129.9800×10−79.9800 \times10^{-7}
OverlapM1 (Coarse)149339.601.0003×10−61.0003 \times10^{-6}
OuterM4 (Very fine)10716947.509.9809×10−79.9809 \times10^{-7}
One-wayInnerNot achieved——1.2272×10−61.2272 \times10^{-6}

Table 4. Efficiency and accuracy of the inverse diffusivity recovery, grouped by the true diffusivity DD. The data zone indicates the region containing the observations. The target is a relative error of the recovered diffusivity below 1%. For each method and data zone, the mesh is refined from M0 until the target is met, and the coarsest successful mesh is reported. On that mesh, the epoch count is the first epoch of the final uninterrupted interval in which the error remains below 1%, obtained by scanning the history backward from the final epoch, and the wall time is the cumulative end-to-end wall clock time up to that epoch, including, for all methods, mesh generation, operator assembly and factorization, and every forward and adjoint solve, together with, for the decomposed methods, the Schwarz iterations and all interface transfers. Bold marks the shorter wall time between the single-domain and Schwarz methods for the same data zone. The converged value is the final recovered diffusivity. A method is marked Not achieved when no tested mesh meets the target, in which case the value from the mesh with the smallest final error is reported.

For the outer data, the Schwarz-coupled solver requires a finer mesh than the single-domain solver at D=10−5D = 10^{-5}. The single-domain solver meets the target on M1. On the same mesh, the Schwarz-coupled solver fails (dashed curve), with its recovered wall flux settling at approximately −9.6-9.6, and it meets the target only on M3. The need for this finer mesh is attributed to the interface transfer operator PP. With outer data, the misfit is evaluated on the outer subdomain solution, which receives the influence of the wall flux only through the interface values transferred from the inner solution by PP. Since PP interpolates the inner solution linearly onto the interface nodes of the outer mesh, spatial variations of the inner solution between these nodes may be lost or misrepresented on a coarse outer mesh, so that PP effectively acts as a filter on the information passed from the inner to the outer subdomain. In addition to requiring a finer mesh, the Schwarz-coupled solver incurs a higher cost per epoch with outer data. Since the wall flux enters only the inner subdomain while the misfit is evaluated on the outer subdomain solution, this placement realizes the distinct subdomain regime of § 2.3.2, in which each forward evaluation recorded for the adjoint computation includes the inner solve, the interface transfer, and the outer solve, all of which the adjoint computation traverses in reverse. Both successful recoveries require a similar number of epochs, 79 for the Schwarz-coupled solver on M3 and 86 for the single-domain solver on M1 (Table 3), and the higher wall time of the Schwarz-coupled solver arises from the finer mesh and the larger recorded evaluation per epoch. In principle, this computational cost could be reduced by employing a differentiable higher-order interface transfer operator that preserves variations on a coarser mesh, although the development of such an operator lies beyond the scope of the present work. Instead, a different strategy, in which outer observations in the overlap region are considered but assigned to the inner subdomain, is proposed and pursued below.

Within the present Schwarz-coupled setting, the recovery from outer data can nevertheless be performed efficiently by exploiting the overlap region shared by the two subdomains. Specifically, the overlap region occupies the lower part of the outer zone, and in this strategy, only the outer data located within the overlap region are considered for the inverse simulation. Interestingly, since the inner subdomain also extends over the overlap region, the outer observations within the overlap region can also be assigned to the inner subdomain rather than to the outer subdomain, and the precise domain of the overlap region is also flexible. With the misfit evaluated on the inner subdomain solution, the influence of the wall flux reaches the data without passing through the interface transfer operator PP. Accordingly, with the overlap strategy, shown by the black markers in the right pair of panels of Figure 4a, the Schwarz-coupled solver meets the target on M1 after approximately 10210^{2} s despite fewer data observations, instead of on M3 after approximately 5×1035 \times10^{3} s with the full outer data observation. The Schwarz-coupled solver with overlap data is thus competitive with the single-domain solver with the full outer data, which meets the target after approximately 10210^{2} s. For a fair comparison and completeness, the single-domain solver, which involves no interface transfer, is also applied with the same overlap data. The single-domain solver meets the target on the same mesh, M1, with both the overlap data and the full outer data, and at a comparable wall time (Table 3), which confirms that the improvement of the Schwarz-coupled solver arises from avoiding the interface transfer rather than from the restriction of the observations. Including the solver setup, the Schwarz-coupled solver with overlap data requires 94 s, against 5915 s with the full outer data and 174 s for the single-domain solver with the same data (Table 3).

The complete set of wall flux recoveries, covering all three diffusivities and both data placements together with the overlap strategy, is summarized in Table 3, and the trends observed at D=10−5D = 10^{-5} persist throughout. The one-way variant, in contrast, fails at every diffusivity, converging to wall fluxes biased by 11–18% and to diffusivities biased by 21–32% on every tested mesh (Table 3 and Table 4), which confirms that bidirectional coupling is required for an unbiased recovery.

In the second inverse experiment, the diffusivity is recovered. The boundary layer scale is held fixed at δ=D\delta= \sqrt{D} of the true diffusivity, so that the domain decomposition, the inner mesh, and the observation zones remain unchanged over the epochs, and only DD in Eq. (4) is updated. The convergence of the recovered diffusivity at D=10−5D = 10^{-5} is shown in Figure 4b, where, as in all diffusivity experiments, the initial estimate is set one order of magnitude above the true value, here D0=10−4D_0 = 10^{-4}. With inner data, the Schwarz-coupled solver meets the target on the coarsest mesh, M0. Its recovered diffusivity first undershoots to approximately 5×10−65 \times10^{-6} and then settles onto the true value within approximately 10210^2 s. On the same mesh, however, the single-domain solver under-resolves the boundary layer and converges to approximately 1.2×10−51.2 \times10^{-5}, and it meets the target only once the mesh is refined to M2, after approximately 10310^3 s. As expected from the wall flux recovery, the outcome is reversed with outer data, for which the Schwarz-coupled solver requires a finer mesh than the single-domain solver. The single-domain solver meets the target on M2 within approximately 5×1025 \times10^2 s, whereas the Schwarz-coupled solver fails on M2 (dashed curve) and succeeds only on M3, after approximately 10410^4 s. The overlap strategy restores the efficiency of the Schwarz-coupled solver for the diffusivity as well. When the outer observations within the overlap region are assigned to the inner subdomain, as shown by the black markers, the Schwarz-coupled solver meets the target on M0 within approximately 10210^2 s despite the reduced number of observations. The single-domain solver, in contrast, requires M2 with both the overlap data and the full outer data (Table 4). Table 4 extends the observations made at D=10−5D = 10^{-5} to all three diffusivities.

Language Model Integrated Differentiable Physics Solver for Inverse Modeling

The benchmark inverse problems above compared the forward models with the optimizer held fixed, whereas the efficiency of an inverse recovery can depend on the optimizer. Classical optimizers such as Adam, in particular, follow a fixed update rule, whose hyperparameters, such as the learning rate and its decay schedule, are problem-dependent, selected empirically, and fixed before the optimization begins. Recent advances in large language models (LLMs) and agentic AI have opened a different route, in which the language model acts as the optimizer [52, 68, 69]. At each epoch, the language model selects the optimization method adaptively as the recovery progresses. In this section, we investigate whether this route can accelerate the inverse recovery using two strategies: passive LLM optimization and active agentic optimization. The recovery of the wall flux is considered here with increasing spatial complexity.

Constant flux: a scalar reconstruction

The constant wall flux is recovered with the true value g=−10g=-10 and the initial estimate g0=−5g_0=-5, as in § 3.1.2. For all methods, the Schwarz-coupled solver is used on M1 at D=10−4D=10^{-4} and 10−510^{-5} and on M2 at D=10−6D=10^{-6}, so that the inner and overlap data are treated on a common mesh for each diffusivity. Every method is given the same budget of 150 epochs, which is long enough to show whether the recovered wall flux settles after its initial transient. Success is judged by the criterion of § 3.1.2, which requires the recovered wall flux to remain within the 1% band from the onset of its final plateau until the last epoch.

Since the unknown is a single scalar, the recovery constitutes a one-dimensional optimization problem, and three groups of optimizers are compared. The first group consists of classical methods that use increasing amounts of derivative information, namely Adam and the secant method, which use the adjoint gradient, and the Newton method, which additionally uses the adjoint Hessian. The second and third groups are the passive LLM optimization, based on the language model Qwen3-8B [66] served locally through the Ollama API, and the active agentic AI optimization, based on the agent GPT 5.6 Terra built on Codex. The first LLM input is a prompt that instructs the language model to act as a minimization engine. The second input is the optimization policy, which consists only of gradient-based methods, namely the normalized gradient (G), Adam (A), momentum (M), damped Newton (N), and secant (S) methods, linear regression of the gradient (Rg), a quadratic fit of the objective (Rj), bracketed root finding of the gradient (Bg), and bracketed refinement of the objective (Bj). The third input is the epoch history, which comprises the parameter, the misfit, and the adjoint gradient of the ten most recent epochs for the passive LLM optimization and of all preceding epochs, together with the previously selected methods, for the agent. Based on the prompt and the epoch history, the language model selects one method of the optimization policy, specifies any damping and step controls for the selected method, and logs the reasoning behind the selection. The controller then executes the selected method with the specified controls and returns the updated parameter to the solver for the next epoch. Apart from the underlying model and the length of the epoch history, the active optimization differs from the passive optimization in that the agent is additionally given the inverse code and thereby has access to the problem being solved, which may enable the agent to select a more suitable method at each epoch. Finally, Brent’s method, a derivative-free method that combines golden-section search with parabolic interpolation, is included as a competitive baseline, since it is particularly well suited for the present one-dimensional inverse problem.

The classical methods are deterministic, so that a single run suffices for each case. The optimizers based on language models, in contrast, are probabilistic, since the same history of states can yield different updates across runs, and their robustness must therefore be assessed over repeated runs. The passive LLM optimization could, in principle, be made deterministic, either by setting the sampling temperature of the Ollama API to zero or by fixing its random seed, which controls the randomness of the generated response. To expose its variability, it is instead run 30 times independently with different seeds for each diffusivity and data placement, at a moderate sampling temperature of 0.5, which shows a degree of variability across the runs while keeping the responses focused. The agentic AI approach, by comparison, offers no seed, and its runs differ through its own nondeterminism. Because the proprietary agent is considerably more expensive to run than the open-source model, it is limited to five independent runs for each case, each started in a fresh project. For both optimizers, the results are reported as the median and the interquartile range (IQR) over the runs, together with the number of runs that meet the target.

In Table 5, we report the results of all optimizers. Overall, both optimizations based on language models prove robust and accurate. Newton, secant, and Brent converge to the solution with the fewest epochs. However, this advantage, as discussed next, does not hold when the unknown flux is spatially varying and an Adam optimization is necessary. With inner data, the passive LLM optimization meets the success criterion in 88 of its 90 trials and the agent in all of its 15 trials, and their median converged values deviate from those of the Newton and secant methods by at most 0.001% and 0.11%, respectively. In terms of wall time, Brent’s method is the fastest in all cases with the exception of overlap data at D=10−6D=10^{-6}, where the damped Newton method is faster. The LLM-based optimizers are generally slower than the classical methods for this one-dimensional problem, although they remain faster than the tuned Adam. The only exception is the agent with inner data at D=10−6D=10^{-6}, which, at 50.8 s, outperforms both the damped Newton and the secant methods. With overlap data, the passive LLM optimization remains equally robust and accurate, whereas the agent is less consistent. The passive LLM optimization meets the success criterion in 87 of its 90 trials and again deviates from those of the Newton and secant methods by at most 0.001%. The agent meets the success criterion in 14 of its 15 trials, but its median converged value deviates by up to 0.6% for D=10−5D = 10^{-5}, and for D=10−4D = 10^{-4} and 10−510^{-5} its trials show a considerably larger spread than with inner data. For both inner and overlap data, the difference between the two optimizations based on language models is reflected in the selection mix, that is, the percentage of queries in which each method of the optimization policy is selected. In the passive LLM optimization, the language model selects predominantly the Newton (N) and normalized gradient (G) methods, whose alternation is consistent with the oscillations observed in Figure 5. The agent, in contrast, relies mainly on the secant method (S) and on the regression, quadratic-fit, and bracketing methods (Rg, Rj, Bg, Bj), which draw on several entries of the epoch history and are consistent with its smaller oscillations.

Convergence plots for inner and overlap data

Figure 5. Convergence of the constant wall flux recovery with the Schwarz-coupled solver for (a) inner data and (b) outer data within the overlap region under the overlap strategy, at D=10−4D = 10^{-4}, 10−510^{-5}, and 10−610^{-6} (left to right), on the meshes listed in Table 5. The recovered wall flux is plotted against the epoch, starting from the initial estimate g0=−5g_0 = -5, with the true value g=−10g = -10; only the first 100 of the 150 epochs are shown. Solid black and blue curves show the median runs of the passive LLM optimization and of the active agentic AI optimization, respectively, and the red curve shows the Adam optimizer. Dashed black curves show a failed run of the passive LLM optimization, and the dash-dotted curve with markers shows the single failed run of the active agentic AI optimization, which occurs only for overlap data at D=10−6D = 10^{-6}. At D=10−6D = 10^{-6}, Adam enters its final interval within the 1% band only at epochs 122 and 130 for inner and overlap data, respectively, beyond the range shown.

DataMetricPassive LLMActive agenticAdamNewtonSecantBrent
D=10−4\mathit{D}=10^{-4} (M1 Mesh)
InnerSuccessful trials29/305/51/11/11/11/1
InnerConverged value-9.9908 [0.0006]-9.9798 [0.0036]-9.9892-9.9907-9.9907-9.9758
InnerEpochs to target49 [65]11 [4]74473
InnerWall time (s)177.7 [229.8]23.4 [5.75]202.117.122.714.0
InnerSelection mix (%)N65.4/G34.0/S0.4/Bj0.1G0.6/N6.1/S29.9/Rg16.5 Rj7.9/Bg11.0/Bj28.0––––
OverlapSuccessful trials30/305/51/11/11/11/1
OverlapConverged value-10.0560 [0.0004]-10.0562 [0.0427]-10.0544-10.0561-10.0561-10.0069
OverlapEpochs to target41 [25]39 [17]55473
OverlapWall time (s)153.2 [95.3]61.2 [31.40]154.114.823.213.1
OverlapSelection mix (%)N77.7/G21.9/S0.3/Bj0.1G0.5/A0.5/N2.9/S30.1 Rg23.9/Rj3.3/Bg15.3/Bj23.4––––
D=10−5\mathit{D}=10^{-5} (M1 Mesh)
InnerSuccessful trials30/305/51/11/11/11/1
InnerConverged value-9.9832 [0.0002]-9.9723 [0.0006]-9.9814-9.9832-9.9832-9.9692
InnerEpochs to target33 [24]35 [4]77373
InnerWall time (s)112.9 [81.3]46.8 [4.53]189.812.821.212.8
InnerSelection mix (%)N90.0/G9.7/S0.3/Bj0.1N1.3/S42.0/Rg20.4 Rj5.7/Bg7.0/Bj23.6––––
OverlapSuccessful trials28/305/51/11/11/11/1
OverlapConverged value-10.0507 [0.0002]-9.9897 [0.0661]-10.0489-10.0508-10.0508-9.9752
OverlapEpochs to target31 [24]68 [18]56473
OverlapWall time (s)109.7 [79.3]79.4 [29.91]143.816.220.812.8
OverlapSelection mix (%)N78.6/G20.8/S0.4/Bj0.2N0.9/S29.7/Rg13.8 Rj22.0/Bg12.5/Bj21.1––––
D=10−6\mathit{D}=10^{-6} (M2 Mesh)
InnerSuccessful trials29/305/51/11/11/11/1
InnerConverged value-10.0725 [0.0005]-10.0640 [0.0018]-10.0823-10.0725-10.0725-10.0606
InnerEpochs to target55 [49]9 [1]122463
InnerWall time (s)475.9 [434.7]50.8 [6.29]739.852.865.649.7
InnerSelection mix (%)N77.5/G22.4/Bj0.1N2.1/S37.1/Rg29.3 Bg7.1/Bj24.3––––
OverlapSuccessful trials29/304/51/11/11/11/1
OverlapConverged value-10.0806 [0.0003]-10.0811 [0.0006]-10.0889-10.0807-10.0807-9.9162
OverlapEpochs to target45 [46]43 [8]130467
OverlapWall time (s)338.3 [330.2]180.2 [43.26]769.354.165.478.7
OverlapSelection mix (%)N76.0/G23.3/S0.4/Bj0.3G1.2/N0.6/S20.0/Rg22.3 Rj18.8/Bg17.7/Bj19.4––––

Table 5. Recovery of the constant wall flux (g=−10g=-10, g0=−5g_0=-5, 150 epochs) for inner data and for outer data under the overlap strategy. The passive LLM optimization (30 seeded trials) and the active agentic AI optimization (5 trials, no seed) are reported as median [interquartile range], and the classical methods and Brent’s method, which is not part of the optimization policy, are run once. A trial is successful if the relative error of the recovered wall flux remains below 1% until the final epoch. The converged value is the wall flux at the final epoch, the epochs to target is the first epoch of the final interval within the 1% band, and the wall time is measured up to that epoch. The selection mix is the percentage of optimization policy per trial selecting G (normalized gradient), A (Adam), N (damped Newton), S (secant), Rg (linear regression of the gradient), Rj (quadratic fit of the objective), Bg (bracketed root finding of the gradient), or Bj (bracketed refinement of the objective).

The convergence of the recovered wall flux is presented in Figure 5 for one optimizer of each group, namely Adam from the classical methods, the passive LLM optimization, and the active agentic AI optimization, for inner data and for outer data under the overlap strategy, at the three diffusivities. Despite the clear benefit of other classical optimization methods in this test case, we focus on comparing Adam with the LLM models as Adam becomes necessary for more complex spatially varying test cases presented next. For the passive and the active optimization, the figure shows the median trial and, wherever a failure occurred, one of the failed trials. Adam serves as the reference in the figure, and its hyperparameters were tuned to meet the success criterion in as few epochs as possible, unlike in the benchmarking of § 3.1.2. A single trial of the agent consumes on average 0.55 million input tokens and 16,000 reasoning tokens, whereas a single trial of the passive LLM optimization, in which the language model is queried once per epoch, consumes up to approximately 72,000 input tokens and 10,400 output tokens, that is, approximately one eighth of the input tokens of the agent. With five trials per case for the agent and 30 trials per case for the passive LLM optimization, the six cases comprise 30 and 180 trials, respectively. In total, the agent consumed 16.54 million input tokens and 0.47 million reasoning tokens, and the passive LLM optimization up to approximately 13.0 million input tokens and 1.9 million output tokens.

To validate the LLMs, one successful trial of the passive LLM optimization and one of the agent are selected at random, and at each epoch the method selected by the language model is implemented manually, together with its logged step controls. For both trials, the manually reproduced trajectory of the wall flux is closely aligned with

the trajectory of the trial, although the two are not exactly identical. The prompt and the optimization policy, together with the reasoning, the log, and the actions of the language model at each epoch of the selected trials and the corresponding manual validation, are detailed in Appendix C.1.

Spatially varying wall flux: discrete profile reconstruction

We now turn to the recovery of a spatially varying wall flux g(x)g(x), in which the entire profile along the bottom wall is reconstructed at each spatial nodal point. As a result, the number of unknowns grows with the mesh resolution, namely 257 nodal values on M1, used at D=10−4D = 10^{-4} and 10−510^{-5}, and 513 on M2, used at D=10−6D = 10^{-6}. For each profile, the synthetic data are generated with the single-domain solver on M4. Since every nodal value of the wall flux is recovered as a separate unknown, the result may depend on the initial estimate, and the recovery is therefore started from three initial estimates, namely a flat profile with the constant value −5-5 along the entire wall (Flat), which differs entirely from the true profiles, and the true profile with random nodal perturbations of 10% and 20% of its peak magnitude (P10 and P20). Owing to the high dimensionality of this inverse problem, several optimizers of the preceding experiment are not considered here, even though the Newton, secant, and Brent methods outperformed Adam and the LLM optimizers in the constant-flux recovery. The secant and Brent methods are more suited for univariate problems. The Newton method requires the Hessian with respect to every nodal value, which is memory-intensive, and in our testing converged to an incorrect profile. The passive LLM optimization is likewise excluded as it did not perform well in the multi-dimensional setting. This observation is consistent with [52]. The active agentic optimization is not subject to this limitation, since the language model operates at the workflow level rather than at the parameter level. It receives the current nodal profile of the wall flux and its adjoint gradient, together with the history of the misfit, and selects the update method and its controls, whereas the update of the nodal values is computed by the controller, so that the agent never proposes nodal values directly. Adam and the agentic AI optimization are therefore employed in this experiment.

The discrete reconstruction is challenging, since a large number of nodal values must be recovered from data that are most informative close to the wall (due to the thin boundary layer). To improve the profile reconstruction, the misfit is augmented with a Tikhonov regularization term that penalizes the curvature of g(x)g(x), weighted by the regularization parameter α\alpha. Since the appropriate value of α\alpha is not known in advance, it is determined as a hyperparameter by a sweep over the nine values α∈{10−9,5×10−9,10−8,5×10−8,10−7,5×10−7,10−6,5×10−6,10−5}\alpha\in\{10^{-9}, 5 \times10^{-9}, 10^{-8}, 5 \times10^{-8}, 10^{-7}, 5 \times10^{-7}, 10^{-6}, 5 \times10^{-6}, 10^{-5}\}. For every case, each run of the sweep employs Adam over 2000 epochs with an initial learning rate of 0.1, reduced by a factor of 0.75 every 200 epochs, and the optimal value α∗\alpha^* is selected as the value that minimizes the relative L∞L_{\infty} error of the recovered profile with respect to the true profile. Since this selection uses the true profile, which is unavailable in practice, α∗\alpha^* represents the most favorable regularization for Adam.

For the active agentic optimization, the controller of the preceding experiment is retained, whereas its optimization policy is replaced by methods that update the entire profile at once, namely Adam, normalized gradient descent, momentum gradient descent, the Barzilai–Borwein method, the conjugate gradient method, and projected gradient descent. At each epoch, the controller passes to the agent the prompt, the available methods of the optimization policy, the current nodal profile of the wall flux and its adjoint gradient, and the history of the misfit and of the previously selected methods. The optimal value of the regularization parameter α∗\alpha^*, corresponding to the Schwarz-coupled solver, is used as the reference value αref\alpha_{\mathrm{ref}} for the agent, which is run over 300 epochs in each of five trials per case. Since the reconstruction error depends on both the value of α\alpha and the optimizer, fixing α\alpha ensures that the agent and the Schwarz-coupled solver with Adam solve the same regularized problem.

Figure 6 shows the profiles recovered with inner data for the polynomial profile from the Flat initialization and for all three profiles from the P10 initialization. The single-domain solver with Adam serves as a reference. At D=10−4D = 10^{-4}, all three methods recover the true profile closely for both initializations and all three profiles. At D=10−5D = 10^{-5}, the methods differ for the Flat initialization. Starting from this estimate, Adam fails for both solvers. Since the single-domain and the Schwarz-coupled solver converge to nearly the same incorrect profile, the failure lies with the optimizer rather than with the forward solver. The agent, in contrast, recovers the true profile along the entire wall from the same initialization. This recovery is reproducible across the five trials, with an interquartile range of the relative error of 0.018% (Table 6). For the P10 initialization, all three methods recover the three profiles, with only small deviations at the minima, so that the advantage of the agent at this diffusivity is confined to cases in which the initial estimate is far from the true profile. At D=10−6D = 10^{-6}, the recovery deteriorates for all methods. For the Flat initialization, the Schwarz-coupled solver with Adam remains close to the initial value of −5-5, as does the single-domain solver with Adam. The agent moves toward the true profile and locates its central minimum, although it overestimates its depth and deviates from the true profile near the ends of the wall. For the P10 initialization, all three methods produce nearly identical profiles that remain close to the initial estimate, with minima approximately 10% more negative than those of the true profile.

Discrete reconstruction of the spatially varying wall flux

Figure 6. Discrete reconstruction of the spatially varying wall flux with inner data at (a) D=10−4D = 10^{-4}, (b) D=10−5D = 10^{-5}, and (c) D=10−6D = 10^{-6}. The first column shows the polynomial profile initialized from Flat, and the remaining columns show the polynomial, Fourier, and hybrid profiles initialized from P10. The true profile (black) is compared with the profiles recovered by the single-domain solver with Adam (red) and the Schwarz-coupled solver with Adam (green), both run over 2000 epochs, and by the median trial of the active agentic optimization with the Schwarz-coupled solver (blue), run over 300 epochs.

ProfileInit.Single-domain — Adam α∗\alpha^*Single-domain — Adam Rel. L∞L_\infty (%)Single-domain — Adam Wall time (min)Schwarz — Adam α∗\alpha^*Schwarz — Adam Rel. L∞L_\infty (%)Schwarz — Adam Wall time (min)Schwarz — Agentic αref\alpha_{\mathrm{ref}}Schwarz — Agentic Rel. L∞L_\infty (%)Schwarz — Agentic Wall time (min)
PolynomialFlat5e−75\mathrm{e}{-7}1.61565.3191e−81\mathrm{e}{-8}1.38923.8201e−81\mathrm{e}{-8}1.454 [0.002]59.195 [4.382]
P101e−61\mathrm{e}{-6}1.41266.2855e−75\mathrm{e}{-7}1.66822.2225e−75\mathrm{e}{-7}3.883 [0.001]52.874 [7.483]
P201e−61\mathrm{e}{-6}1.30963.3821e−71\mathrm{e}{-7}1.50919.8311e−71\mathrm{e}{-7}2.075 [0.001]51.684 [5.917]
FourierFlat1e−71\mathrm{e}{-7}3.56149.6895e−85\mathrm{e}{-8}4.33923.2865e−85\mathrm{e}{-8}5.909 [0.375]60.826 [6.264]
P105e−75\mathrm{e}{-7}2.11389.0581e−61\mathrm{e}{-6}2.59525.8031e−61\mathrm{e}{-6}4.836 [0.311]58.655 [4.758]
P201e−71\mathrm{e}{-7}2.79760.7861e−71\mathrm{e}{-7}3.24938.7931e−71\mathrm{e}{-7}4.054 [0.285]51.850 [7.031]
HybridFlat1e−71\mathrm{e}{-7}3.89043.3441e−71\mathrm{e}{-7}4.37628.7961e−71\mathrm{e}{-7}8.023 [1.208]61.855 [5.342]
P101e−61\mathrm{e}{-6}0.88843.4181e−61\mathrm{e}{-6}0.44123.4651e−61\mathrm{e}{-6}2.294 [0.018]59.474 [6.889]
P205e−75\mathrm{e}{-7}1.53145.0645e−75\mathrm{e}{-7}1.31727.0115e−75\mathrm{e}{-7}4.031 [0.061]52.001 [4.519]
D=10−5\mathit{D}=10^{-5} PolynomialFlat1e−91\mathrm{e}{-9}31.15151.4661e−91\mathrm{e}{-9}26.42533.5001e−91\mathrm{e}{-9}2.747 [0.018]57.625 [7.762]
P101e−71\mathrm{e}{-7}4.29451.6771e−71\mathrm{e}{-7}2.62829.4481e−71\mathrm{e}{-7}3.655 [0.122]53.195 [5.684]
P201e−71\mathrm{e}{-7}5.25651.8351e−71\mathrm{e}{-7}4.37730.9021e−71\mathrm{e}{-7}8.082 [2.083]56.052 [6.107]
FourierFlat1e−91\mathrm{e}{-9}43.00551.4021e−91\mathrm{e}{-9}45.58548.6781e−91\mathrm{e}{-9}5.065 [0.055]54.028 [4.293]
P101e−71\mathrm{e}{-7}6.07560.2401e−71\mathrm{e}{-7}2.73927.2931e−71\mathrm{e}{-7}4.173 [0.119]51.562 [7.218]
P201e−71\mathrm{e}{-7}9.86960.3001e−71\mathrm{e}{-7}7.69453.0531e−71\mathrm{e}{-7}8.473 [3.917]54.872 [5.856]
HybridFlat1e−91\mathrm{e}{-9}32.57565.5671e−91\mathrm{e}{-9}32.93355.2501e−91\mathrm{e}{-9}4.203 [1.279]59.708 [6.473]
P101e−71\mathrm{e}{-7}3.61643.1461e−71\mathrm{e}{-7}1.31248.3841e−71\mathrm{e}{-7}2.157 [0.117]57.882 [4.941]
P201e−71\mathrm{e}{-7}5.35964.5971e−71\mathrm{e}{-7}3.67252.0671e−71\mathrm{e}{-7}4.609 [1.881]52.464 [7.594]
D=10−6\mathit{D}=10^{-6} PolynomialFlat1e−91\mathrm{e}{-9}51.246383.6151e−91\mathrm{e}{-9}50.856177.3711e−91\mathrm{e}{-9}33.830 [5.749]72.224 [5.028]
P105e−85\mathrm{e}{-8}9.661219.5265e−85\mathrm{e}{-8}9.580157.6255e−85\mathrm{e}{-8}8.562 [1.082]67.623 [6.738]
P205e−85\mathrm{e}{-8}19.051219.2465e−85\mathrm{e}{-8}19.048168.2405e−85\mathrm{e}{-8}18.209 [3.038]41.827 [4.667]
FourierFlat1e−91\mathrm{e}{-9}54.133223.5911e−91\mathrm{e}{-9}53.86597.5281e−91\mathrm{e}{-9}45.655 [0.220]66.977 [7.146]
P101e−71\mathrm{e}{-7}9.814217.4911e−71\mathrm{e}{-7}9.67190.8351e−71\mathrm{e}{-7}9.933 [2.989]47.737 [5.491]
P201e−71\mathrm{e}{-7}19.567218.1401e−71\mathrm{e}{-7}19.46782.6101e−71\mathrm{e}{-7}19.908 [3.913]39.947 [6.925]
HybridFlat1e−91\mathrm{e}{-9}54.283224.1031e−91\mathrm{e}{-9}54.24589.4241e−91\mathrm{e}{-9}30.104 [0.684]71.931 [4.375]
P101e−71\mathrm{e}{-7}9.766219.0661e−71\mathrm{e}{-7}9.47993.0051e−71\mathrm{e}{-7}7.073 [1.082]67.970 [7.839]
P201e−71\mathrm{e}{-7}19.267219.2521e−71\mathrm{e}{-7}19.02397.6721e−71\mathrm{e}{-7}16.617 [4.074]45.478 [5.763]

Table 6. Discrete reconstruction of the spatially varying wall flux with inner data for the polynomial, Fourier, and hybrid profiles, started from the Flat, P10, and P20 estimates. For the single-domain and Schwarz-coupled solver with Adam (2000 epochs), α∗\alpha^* is the optimal regularization parameter of the sweep. The active agentic AI optimization (300 epochs, five trials) uses αref\alpha_{\mathrm{ref}} of the Schwarz-coupled solver with Adam and is reported as median interquartile range. The relative L∞L_\infty error is the peak error relative to the maximum magnitude of the true profile, and wall time covers all epochs, including the inference of the language model for the agentic.

Table 6 extends the observations from the figure to all profiles and initializations. The advantage of the agent for

the Flat initialization at D=10−5D = 10^{-5} and 10−610^{-6} is not limited to the polynomial profile shown in the figure but holds for all three profiles. At D=10−5D = 10^{-5}, the relative L∞L_{\infty} error of the Schwarz-coupled solver with Adam lies between 26 and 46%, whereas that of the agent lies between 2.7 and 5.1%, and at D=10−6D = 10^{-6}, the agent reduces the error to between 30 and 46%, compared with 51 to 54% for the Schwarz-coupled solver with Adam. In the remaining cases, by contrast, the agent offers no such advantage. At D=10−4D = 10^{-4} for all initializations, and for the P10 and P20 initializations at D=10−5D = 10^{-5}, its errors of 1.5 to 8.5% are larger than those of the Schwarz-coupled solver with Adam in every case, although of the same order. At D=10−6D = 10^{-6}, the errors of all methods remain close to the initial perturbations, between 7.1 and 9.9% for P10 and between 16.6 and 19.9% for P20. The single-domain solver with Adam fails in the same cases as the Schwarz-coupled solver with Adam, with nearly identical errors at D=10−6D = 10^{-6}, which confirms that the difficulty of the recovery is inherent to the discrete reconstruction and is not introduced by the Schwarz coupling.

In terms of wall time, the Schwarz-coupled solver with Adam is faster than the single-domain solver with Adam in all but one of the 27 cases, by a factor of up to 3.5. Despite its considerably smaller budget of 300 epochs, compared with the 2000 epochs of Adam, the agent requires more wall time than the Schwarz-coupled solver with Adam at D=10−4D = 10^{-4} and 10−510^{-5}, namely 52 to 62 min against 20 to 55 min, since each of its epochs includes the inference of the language model, which influences its wall time. Only at D=10−6D = 10^{-6}, where each epoch of the solver is more expensive, does the agent require less wall time, namely 40 to 72 min against 83 to 177 min. In addition, a single trial of the agent consumes approximately 0.85 million input tokens and 0.43 million output tokens, including the reasoning tokens. With five trials for each of the 27 cases, the 135 trials with inner data amount to approximately 115 million input tokens and 58 million output tokens.

The reconstruction was repeated with overlap data, and the results are reported in Table B.8 of Appendix B. As with inner data, the largest improvement of the agent over Adam occurs for the Flat initialization at D=10−5D = 10^{-5}, although the reduction in error is smaller, and in several remaining cases the two optimizers yield comparable errors.

Spatially varying wall flux: functional-basis identification

The preceding discrete reconstruction experiment imposes no functional form on the wall flux, but it requires one control per wall node. The dimension of the inverse problem therefore grows with the mesh resolution, and the reconstruction must be stabilized by Tikhonov regularization, whose optimal hyperparameter α∗\alpha^{*} is not known a priori. As a result, the discrete reconstruction can be expensive and can fail in some cases. A spatially varying wall flux can, however, often be described by a compact analytical expression. We thus consider the functional-basis parametrization of § 2.3.3, in which g(x)g(x) is expanded as a linear combination of a small number of basis functions, where the controls are the linear coefficients and the nonlinear parameters, θ={cj,βj}j=1K\theta= \{c_j,\beta_j\}_{j=1}^{K}. The number of unknowns is now determined by the library rather than by the mesh used for the inverse problem, and it is typically considerably smaller than the number of wall nodes. Both the linear coefficients and the nonlinear parameters are optimized jointly with the adjoint gradients of the differentiable Schwarz-coupled solver.

In the present libraries, the nonlinear parameters βj\beta_j reduce to a single frequency βj\beta_j of each oscillatory basis function, which is optimized jointly with the linear coefficients, similar to the ADAM-SINDy (sparse identification of nonlinear dynamical systems) approach [71]. The identification is examined through four experiments, which differ in the library dictionary D\mathcal{D} of basis functions.

  • Experiment 1 – Ideal library: Adam optimization. For each envelope, the library dictionary contains exactly the basis functions of the true envelope in Eq. (11), together with the corresponding controls,

Dideal={{x,x2},θ={c1,c2},polynomial envelope,{1,cos⁡(πβ1x)},θ={c1,c2,β1},Fourier envelope,{x,x2,xcos⁡(πβ1x),x2cos⁡(πβ2x)},θ={c1,…,c4,β1,β2},hybrid polynomial–Fourier envelope.(12)\mathcal{D}_{\mathrm{ideal}} = \begin{cases} \{x, x^2\}, & \theta= \{c_1,c_2\}, \quad\text{polynomial envelope},\\ \{1, \cos(\pi\beta_1 x)\}, & \theta= \{c_1,c_2,\beta_1\}, \quad\text{Fourier envelope},\\ \{x, x^2, x\cos(\pi\beta_1 x), x^2\cos(\pi\beta_2 x)\}, & \theta= \{c_1,\ldots,c_4,\beta_1,\beta_2\}, \quad\text{hybrid polynomial--Fourier envelope.} \end{cases} \tag*{(12)}

Since the structure of gg is known, only its linear coefficients and frequencies are recovered. All linear coefficients are initialized to cj=10c_j = 10 and all frequencies to βj=2\beta_j = 2, independently of the true envelope. The controls are then updated by Adam over 1200 epochs, with a constant learning rate of 0.1 for both the linear coefficients and the frequencies.

  • Experiment 2 – Common library: Adam optimization. This experiment represents the realistic setting in which the functional form of the wall flux is unknown, and it serves as the baseline for the agentic experiments. A single library dictionary is shared by all three envelopes, comprising constant, polynomial, cosine, and sine

basis functions and their products,

Dcom={1, x, x2, cos⁡(πβ1x), sin⁡(πβ2x), xcos⁡(πβ3x), xsin⁡(πβ4x), x2cos⁡(πβ5x), x2sin⁡(πβ6x)},θ={c1,…,c9, β1,…,β6},(13)\begin{aligned} \mathcal{D}_{\mathrm{com}} &= \{1,\,x,\,x^{2},\,\cos(\pi\beta_{1}x),\,\sin(\pi\beta_{2}x),\,x\cos(\pi\beta_{3}x),\,x\sin(\pi\beta_{4}x),\,x^{2}\cos(\pi\beta_{5}x),\,x^{2}\sin(\pi\beta_{6}x)\},\\ \theta&= \{c_{1},\ldots,c_{9},\,\beta_{1},\ldots,\beta_{6}\}, \tag*{(13)} \end{aligned}

with nine linear coefficients and six frequencies, that is, fifteen controls. The library dictionary contains the ideal library of every envelope as a subset but carries no information on which of its members are active. The controls are initialized as in Experiment 1 and updated by Adam with the same settings. No sparsity-promoting regularization is applied as in SINDy [72], since it did not reduce the error of the recovered profile.

  • Experiment 3 – Common library: Agentic AI optimization. This experiment retains the library dictionary from Experiment 2, and it changes only the update operator, replacing Adam with an AI agent. The optimization policy of the agent comprises Adam, normalized gradient descent, momentum gradient descent, the Barzilai–Borwein method, the conjugate gradient method, Levenberg–Marquardt, and projected gradient descent. At every epoch, the agent receives the current linear coefficients and nonlinear parameters together with their complete history, as well as the misfit and its adjoint gradient, and selects the method expected to provide the best update of θ\theta. The agent has no access to the true envelope and cannot modify the differentiable inverse workflow. It is run over 500 epochs in each of five trials, without early termination.

  • Experiment 4 – Staged library: Agentic AI optimization. This experiment removes the fixed library dictionary, so that the agent grows the library under a prescribed admission policy in addition to updating its controls. The agent starts from a polynomial library of second order, D(0)={1, x, x2}\mathcal{D}^{(0)} = \{1,\,x,\,x^{2}\}, and assigns the initial values of its controls. The library is revised at most once every Δn\Delta n epochs, so that the controls of the present library can adjust before the next revision. At each revision, the agent admits the next family of basis functions if the misfit has reached a plateau with the present library, indicating that the present library cannot reduce the misfit further. No numerical threshold is prescribed for the plateau, and it is identified by the agent from the misfit history. The families are admitted in a fixed order: first the polynomials of third to fifth order, then the Fourier functions, and finally the products of Fourier functions and polynomials. At each admission, the initial values of the controls of the newly admitted basis functions are decided by the agent, in contrast to Experiments 1–3, in which all coefficients and frequencies are initialized to cj=10c_j = 10 and βj=2\beta_j = 2. The admitted basis functions and their initial values are written by the agent into the definition of θ\theta, which parametrizes only the wall flux boundary condition, so that the forward and adjoint computations remain unchanged. Once admitted, a basis function is retained in the library until the end of the optimization, although its linear coefficient may converge to zero. The library dictionary is limited to at most six polynomial, two Fourier, and twelve polynomial–Fourier basis functions. Between revisions, the agent updates the controls at every epoch with the optimization policy of Experiment 3, based on their current values and complete history, the misfit, and its adjoint gradient. In contrast to Experiments 2 and 3, in which the library is fixed, both the members of the library and the dimension of θ\theta grow during the optimization. The procedure is thus loosely related to symbolic regression, in which the structure of an expression is identified together with its parameters, and to recent language-model-driven approaches to equation discovery [68], although here the structure is restricted to prescribed candidate families admitted in a fixed order. It further differs from these approaches in two respects. First, the unknown function is not fitted to observations of itself but enters the problem as a boundary condition, and it is identified only through the PDE constraint and the adjoint optimization. Second, the objective is the recovery of the wall flux profile rather than of its exact analytical expression. In equation discovery for dynamical systems, identifying the true governing terms is the foremost goal, since they carry the physical interpretation of the model. Here, by contrast, any functional representation that best approximates the profile is the primary focus. The agent is run over 75 epochs in each of five trials, without early termination. This budget is smaller than that of Experiment 3, since the admission policy confines the search to a fixed sequence of families, and the admission of families ends once all families in the sequence have been admitted. The revision intervals Δn=5\Delta n = 5, 10, and 15 were explored, all of which led to a successful recovery, and the results are shown for Δn=10\Delta n = 10.

Figure 7 compares the recovered profiles with the true profile for inner data, and Table 7 reports the corresponding relative L∞L_{\infty} errors and wall times for both data placements. With the ideal library, Experiment 1 recovers all three profiles at D=10−4D = 10^{-4}, with errors of 0.4–8.4%. Its accuracy declines as the diffusivity decreases. Since the ideal library contains only the true basis functions, it offers no additional degrees of freedom to reduce the misfit. The common library of Experiment 2 introduces such degrees of freedom, but their effect depends on the diffusivity. At D=10−4D = 10^{-4}, the additional candidates degrade the recovered profile, raising the error. At D=10−6D = 10^{-6}, they improve

Functional basis identification of the spatially varying wall flux

Figure 7. Functional basis identification of the spatially varying wall flux with inner data at (a) D=10−4D = 10^{-4}, (b) D=10−5D = 10^{-5}, and (c) D=10−6D = 10^{-6}, for the polynomial (left), Fourier (center), and hybrid (right) profiles. The true profile (black) is compared with the profiles recovered with the ideal library and Adam (Experiment 1, green) and with the common library and Adam (Experiment 2, blue), both run over 1200 epochs. It is further compared with the profiles of the median trials of the agentic optimization, with the common library (Experiment 3, red), run over 500 epochs, and with the library grown by the agent (Experiment 4, purple), run over 75 epochs with Δn=10\Delta n = 10. The errors with outer data under the overlap strategy are reported in Table 7.

ProfileDataExp. 1: Ideal library — Adam Rel. L∞L_{\infty} (%)Exp. 1: Ideal library — Adam Wall time (min)Exp. 2: Common library — Adam Rel. L∞L_{\infty} (%)Exp. 2: Common library — Adam Wall time (min)Exp. 3: Common library — Agentic Rel. L∞L_{\infty} (%)Exp. 3: Common library — Agentic Wall time (min)Exp. 3: Common library — Agentic TermsExp. 4: Staged library — Agentic Rel. L∞L_{\infty} (%)Exp. 4: Staged library — Agentic Wall time (min)
PolynomialInner, D=10−4D=10^{-4}0.7147.513.02012.97.093 [2.118]358.7 [28.08]2 [0]0.152 [0.080]19.8 [1.72]
PolynomialOverlap, D=10−4D=10^{-4}0.4477.216.79212.43.372 [0.404]340.6 [11.92]2 [0]0.371 [0.117]35.7 [4.29]
FourierInner, D=10−4D=10^{-4}7.1397.912.22111.15.576 [1.733]204.4 [23.87]3 [0]0.919 [0.224]21.3 [3.67]
FourierOverlap, D=10−4D=10^{-4}8.4137.814.09511.45.797 [1.401]204.3 [21.03]3 [0]0.515 [0.310]23.2 [6.72]
HybridInner, D=10−4D=10^{-4}1.18213.25.07512.13.684 [0.834]327.0 [11.51]7 [1]7.193 [2.159]15.7 [1.47]
HybridOverlap, D=10−4D=10^{-4}4.14510.38.81311.26.744 [3.173]338.4 [18.08]8 [1]6.962 [2.498]47.2 [4.90]
PolynomialInner, D=10−5D=10^{-5}1.05313.67.42216.24.242 [1.931]336.8 [5.92]4 [0]0.810 [0.049]69.4 [5.07]
PolynomialOverlap, D=10−5D=10^{-5}2.27113.24.92014.64.062 [2.008]344.6 [8.09]3 [0]0.440 [0.021]65.4 [7.73]
FourierInner, D=10−5D=10^{-5}16.9187.714.89515.010.869 [1.969]331.6 [1.39]5 [1]1.038 [0.510]77.9 [3.19]
FourierOverlap, D=10−5D=10^{-5}17.5677.76.79914.75.244 [1.610]304.1 [9.22]5 [1]1.247 [0.381]74.2 [8.90]
HybridInner, D=10−5D=10^{-5}9.11912.49.29315.05.250 [2.771]223.4 [6.33]7 [0]7.135 [2.638]94.1 [11.04]
HybridOverlap, D=10−5D=10^{-5}16.17812.611.16615.013.729 [4.219]326.7 [16.47]7 [1]7.084 [1.949]114.2 [7.88]
PolynomialInner, D=10−6D=10^{-6}32.23252.015.42573.323.481 [3.880]398.5 [22.09]4 [1]1.680 [0.494]71.9 [4.89]
PolynomialOverlap, D=10−6D=10^{-6}34.69650.817.02871.313.432 [1.791]439.1 [5.16]4 [1]1.332 [0.822]71.6 [5.12]
FourierInner, D=10−6D=10^{-6}60.33046.561.10768.456.876 [4.157]386.8 [9.51]6 [1]4.531 [1.201]59.0 [2.49]
FourierOverlap, D=10−6D=10^{-6}61.42846.162.68599.354.127 [6.388]331.5 [5.80]8 [1]3.687 [0.662]49.0 [2.10]
HybridInner, D=10−6D=10^{-6}21.12651.915.07571.23.739 [2.706]415.3 [31.45]11 [1]4.987 [1.032]52.0 [6.38]
HybridOverlap, D=10−6D=10^{-6}24.84251.418.110106.915.784 [1.462]407.5 [39.27]12 [0]5.603 [2.951]81.1 [13.63]

Table 7. Functional basis identification of the spatially varying wall flux for the polynomial, Fourier, and hybrid profiles, with inner data and outer data under the overlap strategy (Overlap). Experiments 1 and 2 employ Adam over 1200 epochs with the ideal and the common library, respectively, with all linear coefficients initialized to cj=10c_j = 10 and all frequencies to βj=10\beta_j = 10. Experiment 3 employs the agentic optimizer with the revision interval Δn=10\Delta n = 10 and with the initial values of the admitted controls decided by the agent. Both agentic experiments are run in five trials per case, with the median of the trials reported in brackets, for the number of terms, the relative L∞L_{\infty} error, and the wall time. Terms are the number of basis functions that the final expression contains, with the final relative L∞L_{\infty} error reported for the sine-type functions, at a frequency of magnitude ∣βj∣>10−4|\beta_j| > 10^{-4}. The relative L∞L_{\infty} error is the peak error relative to the maximum magnitude of the true profile, and the wall time covers all epochs, including the inference of the language model for the agent.

True envelopes: Polynomial: −40x+40x2-40x + 40x^{2}; Fourier: −5+5cos⁡(6πx)-5 + 5\cos(6\pi x); Hybrid: −20x+20x2+20xcos⁡(6πx)−20x2cos⁡(6πx)-20x + 20x^{2} + 20x\cos(6\pi x) - 20x^{2}\cos(6\pi x)

the reconstruction of the polynomial and hybrid profiles. This compensation is not general, since neither experiment recovers the Fourier profile at D=10−6D = 10^{-6}.

Replacing Adam with the agent while retaining the common library improves the convergence within that library. Experiment 3 is more accurate than Experiment 2 in sixteen of the eighteen cases, by up to a factor of five, and at D=10−6D = 10^{-6} it reaches 3.7% for the hybrid profile with inner data. However, the Fourier profile at D=10−6D = 10^{-6} is still not recovered, where its oscillation is present but displaced, with an error of 54–57%. The improvements in Experiment 3 are costly. Since the language model is queried at every epoch, Experiment 3 requires substantially more wall time compared to Experiment 2. It also consumes about 78 million tokens per inversion, since the complete history of the fifteen controls and their gradients is supplied to the agent at every epoch, so that the token consumption grows approximately quadratically with the number of epochs.

Experiment 4 addresses these limitations by growing the library in stages. Since a new family of basis functions is admitted only when the misfit stagnates with the present library, each family is admitted only after the controls of the present library have adjusted. Experiment 4 attains the smallest error in every polynomial and Fourier case and is the only experiment that recovers the Fourier profile at D=10−6D = 10^{-6}, with errors of 3.7–4.5%. The number of non-negligible terms in the recovered expression increases as the diffusivity decreases. For the polynomial profile at D=10−4D = 10^{-4}, the recovered expression contains exactly the two terms of the true envelope, and at lower diffusivities, one or two additional terms. For the Fourier profile, the number of active terms grows from three to as many as eight. For the hybrid profile, the recovered expression contains higher-order polynomials and Fourier functions beyond those of the true envelope at every diffusivity, with seven to twelve active terms compared with the four terms of the true envelope. Consequently, Experiment 4 is less accurate than Experiment 1 for the hybrid profile at D=10−4D = 10^{-4}, where the ideal library suffices. It should be noted that the objective is the recovery of the flux profile rather than of its exact expression, so that additional terms are acceptable. The token consumption is also reduced to about 3.3 million per inversion, roughly 24 times less than in Experiment 3, owing mainly to its smaller epoch budget of 75 instead of 500 epochs.

Beyond its accuracy, Experiment 4 is also robust across trials and data placements under the present admission policy. Across the five trials, its interquartile ranges remain below 0.9%, 1.3%, and 3.0% for the polynomial, Fourier, and hybrid profiles, whereas those of Experiment 3 reach 6.4% and 4.2% for the Fourier and hybrid profiles. Its errors with inner and outer data differ by less than one percentage point in all cases. For Experiments 1–3, by contrast, the data placement can change the error considerably and without a consistent trend. In terms of wall time, Experiment 4 requires 16–114 min, a factor of 2 to 21 less than Experiment 3. Relative to Experiments 1 and 2, it is up to ten times slower at D≥10−5D \ge10^{-5} but comparable at D=10−6D = 10^{-6}, with 49–81 min against 46–107 min. Finally, a randomly selected successful trial of each of Experiments 3 and 4 was replayed from its logged methods, controls, and library revisions without querying the agent for validation purposes, as detailed in Appendix C.§ 3.

Discussion

In this work, we addressed two aspects of inverse modeling for transport problems with thin boundary layers: the cost of resolving the boundary layer in a forward solve, and the choice of the optimization method for inverse modeling with differentiable physics. With regard to the first aspect, the results show that, at high Péclet numbers, the cost associated with thin boundary layers can be reduced through the formulation of the problem rather than through near-wall mesh refinement. Posing the inner subdomain in the stretched coordinate of perturbation theory together with a two-way Schwarz coupling can relax the need for a high-resolution mesh and retains the interaction between the near-wall and bulk solutions. With regard to the second aspect, the results show that the benefit of language-model-based optimization depends on the complexity of the inverse problem. For the one-dimensional problem, the classical methods remained more efficient, although language-model-based configurations required less wall time than a tuned Adam. For the high-dimensional problems, the active agentic AI optimization recovered the wall flux in cases in which Adam alone did not.

Our results suggest that the convergence of an inverse simulation can be accelerated when the optimization method is selected according to the progress in the problem solution rather than fixed in advance. This observation is relevant to a practical difficulty in inverse modeling. No single optimization method is suitable for all problems, and the performance of any method further depends on hyperparameters that are themselves problem-specific. In PDE-constrained inversion, every epoch can involve a forward and an adjoint solve, so that identifying a suitable method by comparing candidates over repeated inversions is computationally expensive. The method is therefore commonly chosen a priori, on the basis of experience or convention, and retained throughout the optimization, while it might not be suitable for the problem or, more crucially, for a given stage of the convergence. LLM-based optimization provides an alternative to this practice. In this approach, the choice of the optimization method (and possibly its hyperparameters) is revisited at every epoch on the basis of the history of the misfit and the adjoint gradient, and each choice can be accompanied by a logged justification that makes the decision traceable. For the staged library of the functional-basis identification, however, the improvement is more likely associated with the staged admission of basis functions and their initialization choice than with the selection of the optimization method during the inversion.

The assessment of the active agentic optimization is subject to three limitations. First, the agent relies on a proprietary language model accessed under academic pricing with a per-token charge, which restricted the study to five trials per case, compared with thirty trials for the locally served passive optimization. Second, the agentic AI results are not strictly reproducible. The passive optimization employed a fixed seed per trial, whereas the agent was executed without a seed; although some proprietary interfaces now accept a seed parameter, they guarantee deterministic outputs only on a best-effort basis, and the underlying model may change between versions [73]. Third, in the functional basis identification, the candidate families and their order of admission were prescribed, and the agent was just in charge of initialization. A more ambitious approach where the agent itself decides how to grow the basis function remains to be investigated. These limitations suggest two directions for future research. The first concerns the choice of the language model. Since a single model was examined in each configuration, the dependence of the present findings on this choice remains to be established, and a systematic evaluation of several language models, including current state-of-the-art models, within the differentiable physics solver would quantify their ability to accelerate convergence of the inversion. The second concerns access to the agent. Whereas the passive optimization already operates with an open-source model served locally, the active optimization relied on a proprietary agent. The broader adoption of agentic optimization therefore depends on openly available agents that can be served locally, which would eliminate the per-token cost, permit a larger number of trials, and provide full control over the seed and the model version.

In addition, several extensions of the framework itself remain to be explored. Since the agent acts only on the optimization step, the agentic optimization is not expected to be inherently limited to two-dimensional problems or to a small number of trials, although its extension to three-dimensional problems has not been demonstrated in the present work. The present benchmark is two-dimensional and steady, and it involves only the slip-wall scaling of the boundary layer. The application of the Schwarz-coupled solver to no-slip walls with the Léveque scaling formulated in § 2.2.2, to curved walls, and to three-dimensional and unsteady flows remains to be investigated. In the inverse setting, all recoveries in the present study were obtained from noise-free synthetic observations. Although the robustness of the underlying single-domain framework to measurement noise has been examined previously [50], noisy and sparse observations are expected to pose a greater challenge for thin boundary layers.

Finally, the basis admission policy, which was prescribed in the present work, could itself be proposed and revised by the agent, which would extend the agentic construction of the basis library toward data-driven model discovery. In SINDy, the unknown is represented as a combination of candidate functions drawn from a library fixed in advance [72], including variants in which the nonlinear parameters of the candidates are optimized jointly with their coefficients [71], so that a function absent from the library cannot be recovered. Symbolic regression (SR) removes this restriction by searching the space of expressions directly, and language models have recently been employed to guide this search [68, 69], at the cost of a considerably larger search space. These considerations suggest an intermediate between the two approaches, an agentic SINDy, in which the agent decides when and which candidate functions to admit during the identification. It would retain the library-based structure and interpretability of SINDy while removing the bottleneck of a fixed library, without requiring the full search of SR. The present work takes only a first modest step in this direction, since the candidate functions and their order of admission were prescribed.

Conclusion

This study presented a differentiable multidomain Schwarz-coupled solver for the forward and inverse modeling of transport problems with thin boundary layers, in which an inner subdomain posed in stretched coordinates is coupled bidirectionally with an outer subdomain in physical coordinates. At high Péclet numbers, the solver resolves thin boundary layers on relatively coarse meshes. Through the discrete adjoint method, with the physics imposed as hard constraints, it enables efficient inversion from near-wall data and, with the overlap strategy, from data away from the wall. Language models were further integrated into the optimization step and compared to other optimization methods, and their advantage was demonstrated for recovering spatially varying parameters and for growing a basis-function library during the inversion under a prescribed admission policy. These findings suggest that combining physics-based scale separation with language-model-based optimization offers a promising route toward accelerating the inverse modeling of multiscale transport problems.

Conflict of Interest

The authors declare no conflict of interest.

Acknowledgments

This work was supported by NSF Award No. 2247173.

Data Availability

The Schwarz-coupled differentiable FEniCS solver will be made publicly available at https://github.com/siva-viknesh/Differentiable-FEM-Solver following peer review.

Solver algorithms

This appendix summarizes the Schwarz-coupled forward solver and the adjoint-based inverse-recovery procedure developed in Sections 2.2 and 2.3, respectively.

Forward solver

Algorithm 1 summarizes the construction, initialization, and alternating Schwarz iteration used to obtain the coupled inner–outer solution.

Algorithm 1 Schwarz-Coupled Inner–Outer Forward Solver

Input:

Characteristic domain length: LL, boundary layer thickness scale: δ\delta

Physical Cartesian coordinates (x,y)(x,y); stretched coordinates ξ=x/L\xi= x/L, η=y/δ\eta= y/\delta

Wall flux profile: g(x)g(x)

Artificial boundaries: ηinterface\eta_{\mathrm{interface}} (outer bottom), ηtop\eta_{\mathrm{top}} (inner top), with ηinterface<ηtop\eta_{\mathrm{interface}} < \eta_{\mathrm{top}}

Relaxation factor: ω∈(0,1]\omega\in(0,1]

Convergence tolerance: ε\varepsilon, iteration limit: KK

Domain Decomposition:

Inner subdomain Ωin\Omega_{\mathrm{in}}: η∈[0,ηtop]\eta\in[0,\eta_{\mathrm{top}}], stretched coordinates (ξ,η)(\xi,\eta)

Outer subdomain Ωout\Omega_{\mathrm{out}}: y≥δηinterfacey \ge\delta\eta_{\mathrm{interface}}, physical coordinates (x,y)(x,y)

Overlap Ωoverlap=Ωin∩Ωout\Omega_{\mathrm{overlap}} = \Omega_{\mathrm{in}} \cap\Omega_{\mathrm{out}}: ηinterface≤η≤ηtop\eta_{\mathrm{interface}} \le\eta\le\eta_{\mathrm{top}}, i.e. δηinterface≤y≤δηtop\delta\eta_{\mathrm{interface}} \le y \le\delta\eta_{\mathrm{top}}

Solver Construction:

Discretize and factorize each subdomain operator once; reuse across all iterations

Precompute the transfer maps between subdomains via x=Lξx = L\xi, y=δηy = \delta\eta

Initialization:

Overlap field set to the far-field concentration: Coverlap(0)C_{\mathrm{overlap}}^{(0)}

Schwarz Iteration:

for k=1k = 1 to KK do

Step A – Probe inner data:

Evaluate Coverlap(k−1)C_{\mathrm{overlap}}^{(k-1)} at η=ηtop\eta= \eta_{\mathrm{top}}: CoverlaptopC_{\mathrm{overlap}}^{\mathrm{top}}

Step B – Inner solve:

Solve (4) (slip wall) or (5) (no-slip wall) on Ωin\Omega_{\mathrm{in}}

with ∂C/∂η=δg(Lξ)\partial C/\partial\eta= \delta g(L\xi) at η=0\eta= 0 and C=CoverlaptopC = C_{\mathrm{overlap}}^{\mathrm{top}} at η=ηtop\eta= \eta_{\mathrm{top}}

Restrict the inner solution to the overlap: C^overlap\widehat{C}_{\mathrm{overlap}}

Under-relax (Eq. 6): Coverlap←ωC^overlap+(1−ω)Coverlap(k−1)C_{\mathrm{overlap}} \leftarrow\omega\widehat{C}_{\mathrm{overlap}} + (1-\omega)C_{\mathrm{overlap}}^{(k-1)}

Step C – Probe outer data:

Evaluate the updated overlap at η=ηinterface\eta= \eta_{\mathrm{interface}}: CoverlapinterfaceC_{\mathrm{overlap}}^{\mathrm{interface}}

Step D – Outer solve:

Solve the SUPG-stabilized (1) on Ωout\Omega_{\mathrm{out}} with C=CoverlapinterfaceC = C_{\mathrm{overlap}}^{\mathrm{interface}} at y=δηinterfacey = \delta\eta_{\mathrm{interface}}

Restrict the outer solution to the overlap: C^overlap\widehat{C}_{\mathrm{overlap}}

Under-relax (Eq. 6): Coverlap(k)←ωC^overlap+(1−ω)CoverlapC_{\mathrm{overlap}}^{(k)} \leftarrow\omega\widehat{C}_{\mathrm{overlap}} + (1-\omega)C_{\mathrm{overlap}}

Convergence Check:

r←∥Coverlap(k)−Coverlap(k−1)∥Ωoverlapr \leftarrow\lVert C_{\mathrm{overlap}}^{(k)} - C_{\mathrm{overlap}}^{(k-1)} \rVert_{\Omega_{\mathrm{overlap}}}

if k>1k > 1 and r<εr < \varepsilon then break

end for

Output: converged inner and outer solutions on Ωin\Omega_{\mathrm{in}} and Ωout\Omega_{\mathrm{out}}, in agreement on Ωoverlap\Omega_{\mathrm{overlap}} to within ε\varepsilon

One-way method: K=1K = 1, so that the inner solution is transferred to the outer subdomain, but the outer solution is never returned to the inner subdomain

Inverse solver

Algorithm 2 summarizes the adjoint-based optimization procedure built on the converged forward solution.

Algorithm 2 Schwarz-Coupled Adjoint Inverse Recovery

Input: Measurements CobsC_{\mathrm{obs}} on the observation region Ωobs\Omega_{\mathrm{obs}}

Unknown parameter θ\theta, initial guess θ0\theta^{0}; update operator O\mathcal{O} (Methods 1–3); number of epochs NN

Setup:

Assemble and factorize the inner and outer operators

Register θ\theta as the control and JJ (Eq. (7)) as the reduced functional

Optimization Loop:

for n=0n=0 to N−1N-1 do

Step 1 – Forward evaluation:

Advance the Schwarz iteration (Algorithm 1) at θn\theta^{n} to convergence without recording

Freeze the converged interface trace feeding the subdomain containing θ\theta

Record a single directed evaluation of the coupled model with this trace held fixed

Common subdomainDistinct subdomains
Recordthe θ\theta-subdomain solveboth solves, joined by P\mathbf{P}
MisfitJ(θn)J(\theta^{n}) on Ωobs\Omega_{\mathrm{obs}}J(θn)J(\theta^{n}) on Ωobs\Omega_{\mathrm{obs}}
Adjointcloses locally ⇒∇θJ(θn)\Rightarrow\nabla_{\theta}J(\theta^{n})crosses via PT⇒∇θJ(θn)\mathbf{P}^{\mathsf{T}} \Rightarrow\nabla_{\theta}J(\theta^{n})

Steps 2–3 – Misfit and adjoint gradient:

Evaluate J(θn)J(\theta^{n}) (Eq. (7)) and ∇θJ(θn)\nabla_{\theta}J(\theta^{n}) by reverse-mode differentiation (Eq. (8))

Step 4 – Parameter update:

θn+1←O(J,∇θJ,θn)\theta^{n+1} \leftarrow\mathcal{O}(J,\nabla_{\theta}J,\theta^{n})

end for

Output: recovered parameter θN\theta^{N}

Supplementary Results

This section reports the discrete reconstruction of the spatially varying wall flux with overlap data. The relative L∞L_{\infty} error and the wall time of the methods are presented in Table B.8.

Validation of the language-model-based optimizations

The optimizations based on language models are probabilistic. Their validation therefore addresses a single question: does every update of the wall flux result from a method of the optimization policy, executed with the controls returned by the language model, or could the language model have supplied a value of the wall flux directly? This appendix addresses this question for different wall flux recoveries. In each case, one successful trial is selected randomly and replayed. At every epoch of the replay, the update is recomputed from the logged method and controls without querying the language model, and the forward and adjoint problems are solved. The replayed trajectory is then compared with that of the trial, as shown for all three recoveries in Fig. C.8. In all tables of this appendix, the relative error of the recovered wall flux is evaluated offline, after the trial, from the logged controls and the true wall flux. For all selected trials, the replayed trajectory follows that of the trial closely at every epoch shown (Fig. C.8), including the oscillations, transient departures, and library revisions, which confirms that every update results from the logged method and controls rather than from values supplied by the language model.

Constant flux: scalar reconstruction

The constant wall flux gg is recovered with the true value −10-10, the initial estimate −5-5, and the bounds [−20,20][-20,20], over a budget of 150 epochs, on M1 at D=10−4D=10^{-4} and 10−510^{-5} and on M2 at D=10−6D=10^{-6}, with inner data and with outer data under the overlap strategy. In both configurations, the language model is coupled to the Schwarz-coupled solver through a controller that contains the optimization policy and executes the update.

The language model returns a structured response containing one available method, the damping, the step fraction, the history window, and a reasoning of at most 30 words. The damping and the step fraction are limited to [0.02,1][0.02,1], and the history window to between 2 and 10 epochs. The response contains no field for the value of the wall flux, and both prompts instruct the language model explicitly not to propose one. The language model can therefore influence the wall flux only through the selected method and its controls. From these, the controller computes the proposal

ProfileInit.Single-domain — Adam α*Single-domain — Adam Rel. L∞L_\infty (%)Single-domain — Adam Wall time (min)Schwarz — Adam α*Schwarz — Adam Rel. L∞L_\infty (%)Schwarz — Adam Wall time (min)Schwarz — Agentic αref\alpha_{\mathrm{ref}}Schwarz — Agentic Rel. L∞L_\infty (%)Schwarz — Agentic Wall time (min)
PolynomialFlat1e−71\mathrm{e}{-7}2.69148.0361e−81\mathrm{e}{-8}2.29224.4941e−81\mathrm{e}{-8}2.787 [0.556]61.680 [0.330]
PolynomialP101e−61\mathrm{e}{-6}1.48545.9835e−85\mathrm{e}{-8}2.55021.3365e−85\mathrm{e}{-8}3.097 [1.913]63.495 [6.171]
PolynomialP205e−75\mathrm{e}{-7}2.33760.1651e−81\mathrm{e}{-8}2.78519.4991e−81\mathrm{e}{-8}3.003 [0.090]55.248 [0.590]
FourierFlat5e−85\mathrm{e}{-8}16.17949.2771e−81\mathrm{e}{-8}20.90533.1651e−81\mathrm{e}{-8}9.167 [0.751]61.340 [0.817]
FourierP101e−71\mathrm{e}{-7}3.11349.5691e−61\mathrm{e}{-6}2.74027.0171e−61\mathrm{e}{-6}4.024 [0.348]55.892 [1.009]
FourierP201e−71\mathrm{e}{-7}2.88748.8185e−75\mathrm{e}{-7}5.73526.8435e−75\mathrm{e}{-7}8.077 [2.079]53.282 [3.707]
HybridFlat1e−71\mathrm{e}{-7}14.47149.6635e−85\mathrm{e}{-8}16.95530.0175e−85\mathrm{e}{-8}13.157 [0.911]61.061 [1.021]
HybridP101e−61\mathrm{e}{-6}1.02889.2735e−75\mathrm{e}{-7}0.70427.4365e−75\mathrm{e}{-7}3.127 [0.054]54.512 [1.594]
HybridP201e−71\mathrm{e}{-7}2.99659.8831e−71\mathrm{e}{-7}2.94325.9651e−71\mathrm{e}{-7}4.086 [1.092]51.464 [3.220]
\multicolumn{11}{c}{ D=10−5D = 10^{-5} }
PolynomialFlat1e−81\mathrm{e}{-8}47.43050.8921e−81\mathrm{e}{-8}44.74433.3851e−81\mathrm{e}{-8}19.294 [5.307]57.106 [0.959]
PolynomialP101e−71\mathrm{e}{-7}2.54251.1591e−71\mathrm{e}{-7}2.77131.0881e−71\mathrm{e}{-7}3.906 [1.193]51.371 [2.009]
PolynomialP201e−71\mathrm{e}{-7}3.41650.7821e−71\mathrm{e}{-7}4.88032.8571e−71\mathrm{e}{-7}5.753 [1.931]54.347 [1.227]
FourierFlat1e−91\mathrm{e}{-9}48.97451.0361e−91\mathrm{e}{-9}50.89626.7391e−91\mathrm{e}{-9}15.486 [2.877]56.619 [1.794]
FourierP101e−71\mathrm{e}{-7}5.38151.2801e−71\mathrm{e}{-7}3.24950.3271e−71\mathrm{e}{-7}4.057 [0.692]51.728 [0.337]
FourierP201e−71\mathrm{e}{-7}9.01251.4211e−71\mathrm{e}{-7}8.81252.9111e−71\mathrm{e}{-7}8.793 [0.920]58.256 [4.115]
HybridFlat1e−91\mathrm{e}{-9}31.98059.7881e−91\mathrm{e}{-9}33.68732.9621e−91\mathrm{e}{-9}11.205 [0.800]57.626 [3.273]
HybridP101e−71\mathrm{e}{-7}2.53865.9451e−71\mathrm{e}{-7}1.25248.5911e−71\mathrm{e}{-7}2.227 [0.086]49.303 [0.810]
HybridP201e−71\mathrm{e}{-7}4.64271.3611e−71\mathrm{e}{-7}4.16750.8781e−71\mathrm{e}{-7}5.386 [0.937]56.045 [0.616]
\multicolumn{11}{c}{ D=10−6D = 10^{-6} }
PolynomialFlat1e−91\mathrm{e}{-9}51.845378.3161e−91\mathrm{e}{-9}51.571177.3481e−91\mathrm{e}{-9}49.885 [6.864]69.313 [4.802]
PolynomialP105e−85\mathrm{e}{-8}9.275380.6905e−85\mathrm{e}{-8}9.484160.7465e−85\mathrm{e}{-8}8.488 [0.557]52.114 [2.089]
PolynomialP205e−85\mathrm{e}{-8}18.304381.4715e−85\mathrm{e}{-8}18.853171.2275e−85\mathrm{e}{-8}18.141 [0.770]50.404 [0.017]
FourierFlat1e−91\mathrm{e}{-9}54.168219.5231e−91\mathrm{e}{-9}54.37193.1011e−91\mathrm{e}{-9}50.908 [0.287]70.562 [2.256]
FourierP101e−71\mathrm{e}{-7}9.674223.5281e−71\mathrm{e}{-7}9.65995.7431e−71\mathrm{e}{-7}9.930 [1.880]55.268 [2.330]
FourierP201e−71\mathrm{e}{-7}19.260217.9781e−71\mathrm{e}{-7}19.453100.4331e−71\mathrm{e}{-7}18.897 [0.080]55.290 [0.997]
HybridFlat1e−91\mathrm{e}{-9}53.800212.4921e−91\mathrm{e}{-9}54.89284.9741e−91\mathrm{e}{-9}30.392 [0.417]68.286 [1.258]
HybridP101e−71\mathrm{e}{-7}9.563224.1591e−71\mathrm{e}{-7}9.37487.8231e−71\mathrm{e}{-7}6.905 [0.288]65.292 [8.157]
HybridP201e−71\mathrm{e}{-7}18.776223.7891e−71\mathrm{e}{-7}18.845101.2121e−71\mathrm{e}{-7}8.496 [1.163]61.472 [4.679]

Table B.8. Discrete reconstruction of the spatially varying wall flux with overlap data for the polynomial, Fourier, and hybrid profiles, started from the Flat, P10, and P20 initial estimates. For the single-domain and the Schwarz-coupled solver with Adam (2000 epochs), α∗\alpha^* is the optimal regularization parameter of the sweep. The active agentic AI optimization (300 epochs, five trials) uses α∗\alpha^* of the true profile, and the wall time covers all epochs, including the inference of the language model for the agent.

Figure C.8. Replay validation of the selected successful trials. (a) Constant wall flux: recovered wall flux against the epoch for the passive LLM optimization (left; overlap data, D=10−5D = 10^{-5}, M1) and the active agentic optimization (right; overlap data, D=10−6D = 10^{-6}, M2), with the true value g=−10g = -10 (dash-dotted); the first 50 of 150 epochs are shown. (b) Discrete reconstruction of the hybrid profile from the Flat initialization (inner data, D=10−5D = 10^{-5}), at epochs 0, 25, 100, and 300. (c) Functional basis identification of the hybrid profile with inner data, with the common library (Experiment 3, D=10−4D = 10^{-4}), at epochs 2, 25, 100, and 500, and with the library grown by the agent (Experiment 4, D=10−6D = 10^{-6}), at epochs 2, 25, 50, and 75. Red curves show the logged trial, blue markers the replay without querying the language model, and black curves the true profile.

of the selected method, with the step scaled by the product of the damping and the step fraction. It then restricts the proposal to the trust region and to the bounds. The trust radius is half the current magnitude of the wall flux, limited to between 0.25 and 2.5, so that the change of the wall flux in a single update is proportional to its current magnitude. The updated wall flux is returned to the solver for the next forward and adjoint solve.

Each epoch evaluates one value of the wall flux, starting from the initial estimate at epoch 1. The update at epoch 1 is a deterministic step executed by the controller, which yields g=−6.25g = -6.25. It is not a decision of the language model, and it provides the second pair of wall flux and gradient required by the methods that use several entries of the epoch history. The language model therefore selects the updates at epochs 2 to 149, and epoch 150 evaluates the final wall flux.

Optimization policy

The optimization policy consists of nine gradient-based methods, shared by the passive LLM optimization and the active agentic optimization, which fall into two groups. The gradient-step methods move the wall flux downhill by a step scaled with the damping and step fraction returned by the language model. They comprise (a) the normalized gradient method, (b) Adam, and (c) momentum, whose moments and step directions are maintained by the controller, and (d) the damped Newton method. The target-point methods estimate a stationary point of the misfit from the epoch history and move the wall flux toward it. They comprise (e) the secant method, which takes the root of the line through the gradients of the two most recent epochs, (f) the linear regression of the gradient, which takes the root of a least-squares line through the gradients over the selected history window, and (g) the quadratic fit of the misfit, which takes the vertex of the parabola through the misfits of the three most recent epochs. These target points are defined only if the epoch history contains at least two different values of the wall flux for the secant method and the linear regression, and three for the quadratic fit, and if the estimated slope of the gradient or curvature of the misfit is nonzero. The quadratic fit additionally requires a positive curvature, so that its vertex is a minimum rather than a maximum of the misfit. They also comprise (h) the bracketed root finding of the gradient and (i) the bracketed golden-section refinement of the misfit, which require an observed sign change of the gradient or an observed bracket of the minimum of the misfit, respectively. The Hessian of the damped Newton method is computed by the controller only after this method is selected, safeguarded against non-positive and vanishing values, and not passed to the language model. A reference to a Newton step in the logged reasoning therefore does not imply that the language model observed a second derivative.

Passive and active configurations

Within this common framework, the two configurations were kept as similar as possible, so that their results are directly comparable. They differ only in the aspects listed in Table C.9. The synthetic observations are generated separately by the single-domain solver on M4, and the agent can access only the resulting data file, which is required for the misfit computation.

Passive LLM optimizationActive agentic optimization
Language modelQwen3-8B, served locally through OllamaGPT 5.6 Terra, through Codex
SamplingTemperature 0.5, fixed seed per trialNo seed
Trials per case305, each in a fresh project
Access to solverNoneRead access to the inverse and adjoint solvers; write access only to the definition of θ\theta, not exercised in this recovery
System instructionNoneRole as an auditable recovery controller, confined to the optimization step (Table C.10)
Task instructionSelection of a method and its controlsAs for the passive configuration, restricted to the observed epoch history
Epoch historyWall flux, misfit, and adjoint gradient of the 10 most recent epochsWall flux, misfit, adjoint gradient, and the previously selected method, of all preceding epochs

Table C.9. Differences between the passive LLM optimization and the active agentic AI optimization for the constant wall flux recovery. All other aspects are common to both.

Prompts

The prompts of the passive LLM optimization and the active agentic optimization are compared block by block in Table C.10. The prompts differ in three respects. Since the agent has access to the inverse and adjoint solvers, it alone receives a system instruction (block 1), which confines it to the optimization step: it must not modify the solvers or the inverse workflow, and it acts only after the forward and adjoint computations of each epoch are complete. Its task instruction (block 2) restricts its decision to the observed epoch history, and its epoch history (block 3) contains all preceding epochs rather than the 10 most recent ones, together with the column prior_action, which reports the method selected at each preceding epoch. Both configurations therefore select their methods within the same optimization policy and from the same type of epoch history, the agent with access to a longer record.

BlockPassive LLM optimizationActive agentic optimization
1. System instructionNone.You are an auditable controller for a one-dimensional numerical inverse problem. Do not modify the forward solver, the adjoint solver, or the inverse workflow. Act only after the forward and adjoint computations of each epoch are complete, and only on the optimization step. Select exactly one available numerical action and bounded controls from the observed history only. The true parameter is unavailable. Do not invent a parameter value; deterministic code will compute it. Return only the requested JSON object.
2. Task instructionSelect the next controller action for a scalar inverse problem. The supplied objective and gradient are raw physical quantities; do not assume a particular numerical scale. Do not invent a parameter value. Choose one available action and bounded controls that are likely to produce stable objective reduction and a stationary parameter.Control one scalar inverse parameter using only the observed history below. The supplied objective and gradient are raw physical quantities; do not assume a particular numerical scale. Choose one available action and bounded controls that are likely to produce stable objective reduction and a stationary parameter.
3. Epoch historyObserved history, oldest to newest (latest 10 epochs): `epochGJ_rawdJ_dG [...]`Observed history, oldest to newest (all epochs): `epochGJ_rawdJ_dGprior_action [...]`
4. Bounds and trust radiusCommon to both: Current hard bounds: [-20, 20]. Current trust radius: [r_n].Common to both: Current hard bounds: [-20, 20]. Current trust radius: [r_n].
5. Optimization policyCommon to both: Available actions: - normalized_gradient: normalized downhill step of the trust radius - adam: controller Adam moment update - momentum_gradient: normalized downhill step with persistent momentum - damped_newton: controller-computed reduced-Hessian step - secant_gradient_root: two-point root estimate of the gradient - gradient_linear_regression: least-squares fit of gradient vs. G - objective_quadratic: three-point quadratic fit of the objective - bracketed_gradient_root: root inside an observed gradient-sign bracket - objective_bracket_refine: golden-ratio refinement of an objective bracketCommon to both: Available actions: - normalized_gradient: normalized downhill step of the trust radius - adam: controller Adam moment update - momentum_gradient: normalized downhill step with persistent momentum - damped_newton: controller-computed reduced-Hessian step - secant_gradient_root: two-point root estimate of the gradient - gradient_linear_regression: least-squares fit of gradient vs. G - objective_quadratic: three-point quadratic fit of the objective - bracketed_gradient_root: root inside an observed gradient-sign bracket - objective_bracket_refine: golden-ratio refinement of an objective bracket
6. Output schemaCommon to both: Return exactly one JSON object. action must be available. damping and step_fraction must be in [0.02, 1.0]. history_window must be 2 to 10. reasoning must be a concise justification based on observed history, at most 30 words.Common to both: Return exactly one JSON object. action must be available. damping and step_fraction must be in [0.02, 1.0]. history_window must be 2 to 10. reasoning must be a concise justification based on observed history, at most 30 words.

Table C.10. Prompts of the passive LLM optimization and the active agentic optimization for the constant wall flux recovery, compared block by block. Blocks 1–3 differ between the two configurations, and blocks 4–6, spanning both columns, are common to both. The block headings are added for comparison and are not part of the prompts. In the prompts, GG, JrawJ_\mathrm{raw}, and dJdG\mathrm{d}J_\mathrm{d}G denote the wall flux, the misfit, and its adjoint gradient, and “one-dimensional” refers to the single unknown parameter. Fields in brackets are filled by the controller at every epoch. All nine methods of the optimization policy (Section Appendix C.1) are shown; at each epoch, the controller lists only those that are available.

Selected trials

For the passive LLM optimization, one successful trial was drawn at random, namely the trial with overlap data at D=10−5D = 10^{-5} on M1. For the active agentic optimization, the most demanding case was chosen, namely overlap data at D=10−6D = 10^{-6} on M2, and one successful trial was drawn at random from its five trials. Table C.11 lists selected epochs at which each trajectory changes character, namely the first decision, selected switches of method, and the approach to the final interval within the 1% band. For the passive trial, it also lists the last decision. For the active trial, it lists the decision at epoch 55, after which the wall flux remains essentially stationary until the end of the budget.

Passive LLM optimization: The language model selects the normalized gradient method at epochs 2 to 25. This method reduces the relative error from 37.5% after the deterministic first update to 6.5% after epoch 6, but it overshoots the true value, so that the wall flux oscillates about the true value up to epoch 25 (Fig. C.8a, left). Once the epoch history contains repeated sign changes of the gradient, the language model switches to the damped Newton method at epoch 26, with a small damping, and retains it until the last decision. The update at epoch 26 reduces the error to 1.384%, and the update at epoch 30 yields g=−9.90174g=-9.90174, the first value of the final interval within the 1% band, with an error of 0.9826%. The wall flux remains within this band until the final epoch, ending at g=−10.05069g=-10.05069 with a relative error of 0.5069%. The last update changes the wall flux by only 8×10−68 \times10^{-6}, so that the misfit ratio of 1.000 reflects a stationary estimate. Of the 148 decisions, one at each epoch from 2 through 149, the language model thus selects the normalized gradient method in 24 and the damped Newton method in 124, consistent with the selection mix of Table 5.

Epoch nnMethodUpdate gn→gn+1g_n \to g_{n+1}Error εn+1\varepsilon_{n+1} (%)Logged reasoningRatio Jn+1/JnJ_{n+1}/J_n
2Normalized gradient−6.2500→−7.8500-6.2500 \to-7.850021.5000Gradient descent with damping is stable given the recent trend in objective values and gradient magnitude.0.327
6Normalized gradient−10.9500→−9.3500-10.9500 \to-9.35006.5000Gradient descent with damping follows the negative gradient direction to move downhill.0.434
26Damped Newton−9.8500→−9.8616-9.8500 \to-9.86161.3840Recent evaluations show oscillation around a local minimum. Damped Newton with small damping can help stabilize convergence.0.948
30Damped Newton−9.8926→−9.9017-9.8926 \to-9.90170.9826Gradient and objective are improving; Newton step with damping ensures stability.0.968
149Damped Newton−10.0507→−10.0507-10.0507 \to-10.05070.5069Gradient and objective values show consistent decrease, suggesting Newton step is viable with damping for stability.1.000
2Secant−6.2500→−7.1885-6.2500 \to-7.188528.1150Objective fell and the positive gradient decreased across both downhill evaluations; a damped two-point secant root step should continue reduction while limiting extrapolation within the trust radius.0.557
4Damped Newton−8.3857→−9.4771-8.3857 \to-9.47715.2290Objective has decreased monotonically while positive gradients shrink; recent gradient slopes imply locally positive curvature. A damped, trust-limited Newton step should reduce JJ without overshooting the stationary region.0.125
13Linear regression of the gradient−9.8762→−9.9334-9.8762 \to-9.93340.6660Recent gradients decrease smoothly and remain positive as gg decreases, while objective reduction is flattening. A short-window gradient regression gives a stable local root trend; fractional damping avoids overshoot.0.989
42Linear regression of the gradient−10.0853→−10.0852-10.0853 \to-10.08520.8520Recent gradients remain negative but shrink smoothly toward zero as JJ decreases; a short-window gradient fit gives a conservative root-directed update while limiting extrapolation near stationarity.1.000
55Linear regression of the gradient−10.0811→−10.0811-10.0811 \to-10.08110.8105Recent objective values decrease monotonically while the negative gradient shrinks smoothly toward zero; a short local regression estimates the stationary point while minimum trust clipping limits overshoot.1.000

Table C.11. Selected epochs of the selected successful trials of (a) the passive LLM optimization and (b) the active agentic optimization for the constant wall flux recovery. The update policy and its logged controls, εn+1\varepsilon_{n+1} is the relative error of the wall flux, computed after the trial and not available to the language model, and Jn+1/JnJ_{n+1}/J_n is the observed misfit ratio.

Active agentic optimization: In contrast to the passive LLM optimization, the agent relies mainly on methods that combine several entries of the epoch history, namely the secant method and the linear regression of the gradient, consistent with the selection mix of Table 5. The secant and damped Newton steps of epochs 2 to 4 reduce the relative error from 37.5% to 5.229%, and the regression of the gradient brings the error below 1% at epoch 13. The wall flux thus approaches the true value without oscillation (Fig. C.8a, right). This crossing is transient, however. The update at epoch 27 moves the wall flux to g=−10.9180g=-10.9180 and raises the error to 9.18%, which is visible as the jump at epoch 28 in the figure. The agent then corrects its trajectory by selecting bracketed root finding and the regression of the gradient from the optimization policy, and by epoch 42 the wall flux lies within the final interval of the 1% band, with an error of 0.852%. The decision at epoch 55 changes the wall flux by only 5×10−65 \times10^{-6} and yields g=−10.08105g=-10.08105 with a relative error of 0.8105%, after which the wall flux remains essentially stationary until epoch 150.

Spatially varying flux: discrete profile reconstruction

The discrete profile reconstruction recovers the wall flux at every wall node. At each epoch, the agent receives the prompt (Table C.12), the available methods of the optimization policy, the current nodal profile of the wall flux and its adjoint gradient, the history of the misfit, and the previously selected methods. It returns one available method, its controls, and a brief reasoning. The controller then computes the update of the entire profile, with the regularization parameter fixed at αref\alpha_{\mathrm{ref}}. As before, the agent has access neither to the true profile nor to the error of the recovered profile, and it cannot modify the inverse workflow.

Prompt

The prompt is shown in Table C.12 and follows the structure of the active prompt in Table C.10. The task instruction (block 2) refers to the entire discrete profile and specifies the fixed regularization weight, the epoch history (block 3) contains the current nodal profile and its adjoint gradient, together with the history of the misfit, and the optimization policy (block 5) comprises methods that update the entire profile simultaneously.

BlockActive agentic optimization: discrete profile reconstruction
1. System instructionYou are an auditable controller for a discretized numerical inverse problem. Do not modify the forward solver, the adjoint solver, or the inverse workflow. Act only after the forward and adjoint computations of each epoch are complete, and only on the optimization step. Select exactly one available numerical action and bounded controls from the observed history only. The true profile is unavailable. Do not invent nodal values of the profile; deterministic code will compute them. Return only the requested JSON object.
2. Task instructionControl the discrete wall flux profile, consisting of [N] nodal values, using only the observed history below. The supplied objective and gradient are raw physical quantities; do not assume a particular numerical scale. The objective includes a curvature regularization with fixed weight alpha_ref = [alpha_ref]. Choose one available action and bounded controls that are likely to produce stable objective reduction and a stationary profile.
3. Epoch historyCurrent profile: g = [nodal values] Current gradient: dJ_dg = [nodal values] Observed history, oldest to newest (all epochs): epoch | J_raw | prior_action [...]
4. Bounds and trust radiusCurrent hard bounds: [bounds on the nodal values]. Current trust radius: [r_n].
5. Optimization policyAvailable actions: - adam: controller Adam moment update of the profile - normalized_gradient: normalized downhill step of the profile within the trust radius - momentum_gradient: normalized downhill step with persistent momentum - barzilai_borwein: step with the Barzilai–Borwein step length from the two most recent epochs - conjugate_gradient: step along a conjugate direction of the recent gradients - projected_gradient: gradient step projected onto the hard bounds
6. Output schemaReturn exactly one JSON object. action must be available. damping and step_fraction must be in [0.02, 1.0]. reasoning must be a concise justification based on the observed history, at most 30 words.

Table C.12. Prompt of the active agentic optimization for the discrete reconstruction of the spatially varying wall flux. The block headings are added for clarity and are not part of the prompt. Fields in brackets are filled by the controller at every epoch and only available methods are listed.

Selected trial

The trial was drawn at random from the five trials for the hybrid profile initialized from the Flat estimate, with inner data at D=10−5D = 10^{-5} on M1, for which the regularization parameter is αref=10−9\alpha_{\mathrm{ref}} = 10^{-9} (Table 6). This case is among the most demanding of the discrete reconstruction, since the flat initial estimate differs entirely from the true profile and Adam alone does not recover it. Table C.13 lists the first decision, the changes of method, and selected epochs at which the course of the recovery changes, including the epochs shown in Fig. C.8b.

Among the listed epochs, the agent selects four of the six methods of the optimization policy, with the Barzilai–Borwein method selected most often. Following the initial normalized-gradient step, the Barzilai–Borwein method reduces the misfit steadily, but with small updates, so that the error decreases only from 55.2% to 47.9% by epoch 10. At epoch 25, the agent selects the momentum gradient method, which yields the largest update among the listed epochs, reduces the misfit by 25% (misfit ratio 0.749), and initiates the formation of the central minimum of the profile (Fig. C.8b, epoch 25). Between epochs 50 and 75, the reduction of the misfit becomes marginal, with misfit ratios of 0.992 and 0.999, and the error decreases only from 29.0% to 26.9%. By epoch 100, the central minimum is recovered, whereas the outer minima remain too shallow (Fig. C.8b, epoch 100). At epoch 105, the agent selects Adam, whose node-wise scaling of the step resumes the reduction of the misfit, with a misfit ratio of 0.943, and decreases the error to 17.0%. The agent subsequently returns to the Barzilai–Borwein method, under which the outer minima approach those of the true profile, and the trial concludes with an error of 4.295% (Fig. C.8b, epoch 300). This value is consistent with the median of 4.203% over the five trials (Table 6), whereas the Schwarz-coupled solver with Adam alone yields 32.9% for the same case. The trial, therefore, indicates that changing the method when the reduction of the misfit becomes marginal enables the recovery of the profile from a distant initial estimate.

Epoch nnMethodUpdate RMS(Δgn\Delta g_n)Error εn+1\varepsilon_{n+1} (%)Logged ReasoningRatio Jn+1/JnJ_{n+1}/J_n
1Normalized gradient1.245×10−11.245 \times10^{-1}55.192Normalized-gradient probe from the flat profile that establishes the history of iterates and gradients required by the subsequent methods.0.968
5Barzilai–Borwein1.915×10−21.915 \times10^{-2}52.003Pairs of successive iterates and gradients are available, and the objective is decreasing; a damped Barzilai–Borwein step uses the newest pair without destabilizing the profile.0.987
10Barzilai–Borwein2.076×10−22.076 \times10^{-2}47.947Barzilai–Borwein has reduced the objective at every epoch, with declining gradient norms; the step-length estimate remains positive, so a conservative step fraction preserves the stable descent.0.983
25Momentum gradient1.987×10−11.987 \times10^{-1}36.024The objective decreases slowly under small steps; a bounded momentum-gradient step averages the recent descent directions and reduces dependence on the step-length estimate while maintaining directional continuity.0.749
50Barzilai–Borwein5.653×10−35.653 \times10^{-3}29.024The objective and gradient norms decline consistently under Barzilai–Borwein; use the minimum step fraction to limit disruption of the profile as recent improvements diminish.0.992
75Normalized gradient7.014×10−37.014 \times10^{-3}26.923Recent normalized-gradient steps consistently lowered the objective; still-elevated gradients favor a damped step within a small trust radius to preserve stability.0.999
105Adam3.244×10−23.244 \times10^{-2}17.026Gradients are elevated and spatially nonuniform; a small Adam step provides a node-wise scaled update, strictly bounded to avoid amplifying variations of the profile.0.943
200Barzilai–Borwein2.048×10−22.048 \times10^{-2}7.287Barzilai–Borwein has produced a consistent reduction of the objective, with falling gradient norms; a damped step of moderate size preserves this stable trend.0.945
300Barzilai–Borwein1.852×10−31.852 \times10^{-3}4.295Barzilai–Borwein has delivered a monotonic reduction of the objective with falling gradient norms; use a conservative damped step fraction as gradients and improvements diminish.–

Table C.13. Selected epochs of the selected successful trial of the discrete reconstruction. The update is computed by the controller from the selected method of the optimization policy and its logged controls, and its size is the RMS of the nodal update over all 257 nodal values. εn+1\varepsilon_{n+1} is the relative L∞L_\infty error of the recovered profile, computed after the trial (not available to the agent), and Jn+1/JnJ_{n+1}/J_n is the observed misfit ratio.

Spatially varying flux: functional-basis identification

The functional-basis identification represents the wall flux by a linear combination of basis functions, whose linear coefficients and frequencies are the controls (Section 3.2.3). The previously described Experiment 3 and Experiment 4 are validated.

At each epoch, the controller passes the prompt (Table C.14), the optimization policy methods available at that epoch, and the epoch history to the agent. The epoch history comprises the linear coefficients and frequencies of all preceding epochs, the misfit, and its adjoint gradient, together with the method selected at each preceding epoch. The agent returns a structured response containing one available method, its controls, and a brief reasoning. In Experiment 4, the response additionally contains, at each revision, the admission decision and the initial values of the controls of the admitted basis functions, which the agent decides and writes into the definition of θ\theta.

Prompts

The prompts of Experiments 3 and 4 are compared block by block in Table C.14. Both follow the structure of the active prompt in Table C.10 and share the epoch history, the bounds and trust radius, and the optimization policy (blocks 3–5). The prompt of Experiment 4 differs in four respects: its system instruction permits the agent to assign the initial values of newly admitted basis functions (block 1), its task instruction refers to the current rather than a fixed library (block 2), it contains the basis admission policy (block 6), and its output schema includes the admission fields (block 7). The word limit for the reasoning was not enforced by the controller, so that the logged reasoning of Experiment 3 partly exceeds it. In Table C.15, the logged reasoning is therefore condensed.

Selected trials

One trial of each experiment was drawn at random from its five trials for the hybrid profile with inner data: for Experiment 3 at D=10−4D = 10^{-4} on M1, and for Experiment 4 at D=10−6D = 10^{-6} on M2, the lowest diffusivity, at which Experiments 1 and 2 recover the profile only with errors of 15–25% (Table 7). Tables C.15 and C.16 list, for both trials, the first decision, the changes of method or library, and selected epochs at which the surface of the recovery changes, including the epochs shown in Fig. C.8c. For Experiment 4, the recovered wall flux equation is given explicitly, so that the evolution of the library can be followed.

BlockExperiment 3: common libraryExperiment 4: library grown by the agent
1. System instructionYou are an auditable controller for a numerical inverse problem in which the wall flux is represented by a linear combination of basis functions. Do not modify the forward solver, the adjoint solver, or the inverse workflow. Act only after the forward and adjoint computations of each epoch are complete, and only on the optimization step. Select exactly one available numerical action and bounded controls from the observed history only. The true wall flux is unavailable. Do not invent values of the coefficients or frequencies; deterministic code will compute them. Return only the requested JSON object.You are an auditable controller for a numerical inverse problem in which the wall flux is represented by a linear combination of basis functions. Do not modify the forward solver, the adjoint solver, or the inverse workflow. Act only after the forward and adjoint computations of each epoch are complete, and only on the optimization step. Select exactly one available numerical action and bounded controls from the observed history only. The true wall flux is unavailable. Except for the initial values of newly admitted basis functions, do not invent values of the coefficients or frequencies; deterministic code will compute them. Return only the requested JSON object.
2. Task instructionControl the linear coefficients and frequencies of the fixed basis library below, using only the observed history. The supplied objective and gradient are raw physical quantities; do not assume a particular numerical scale. Choose one available action and bounded controls that are likely to produce stable objective reduction and stationary coefficients and frequencies. Library: [the basis functions of the common library].Control the linear coefficients and frequencies of the current basis library below, using only the observed history. The supplied objective and gradient are raw physical quantities; do not assume a particular numerical scale. Choose one available action and bounded controls that are likely to produce stable objective reduction and stationary coefficients and frequencies. Current library: [basis functions admitted so far].
3. Epoch historyCommon to both: Observed history, oldest to newest (all epochs): epoch | coefficients | frequencies | J_raw | dJ_dtheta | prior_action [...]Common to both: Observed history, oldest to newest (all epochs): epoch | coefficients | frequencies | J_raw | dJ_dtheta | prior_action [...]
4. Bounds and trust radiusCommon to both: Current hard bounds: [bounds on coefficients and frequencies]. Current trust radius: [r_n].Common to both: Current hard bounds: [bounds on coefficients and frequencies]. Current trust radius: [r_n].
5. Optimization policyCommon to both: Available actions: - adam: controller Adam moment update of the controls - normalized_gradient: normalized downhill step of the controls within the trust radius - momentum_gradient: normalized downhill step with persistent momentum - barzilai_borwein: step with the Barzilai–Borwein step length from the two most recent epochs - levenberg_marquardt: damped Gauss–Newton step of the controls - conjugate_gradient: step along a conjugate direction of the recent gradients - projected_gradient: gradient step projected onto the hard boundsCommon to both: Available actions: - adam: controller Adam moment update of the controls - normalized_gradient: normalized downhill step of the controls within the trust radius - momentum_gradient: normalized downhill step with persistent momentum - barzilai_borwein: step with the Barzilai–Borwein step length from the two most recent epochs - levenberg_marquardt: damped Gauss–Newton step of the controls - conjugate_gradient: step along a conjugate direction of the recent gradients - projected_gradient: gradient step projected onto the hard bounds
6. Basis admission policyNone.The library starts from [1,x,x2][1, x, x^2] and may be revised at most once every [Δt][\Delta t] epochs. If the objective has reached a plateau over the last [Δt][\Delta t] epochs, admit the next family of basis functions in the order: polynomials of order 3 to 5; Fourier functions; products of Fourier functions and polynomials. Admitted functions are retained. For each admitted function, decide the initial values of its coefficient and frequency, and write the admitted functions and their initial values into the definition of θ\theta.
7. Output schemaReturn exactly one JSON object. action must be available. damping and step_fraction must be in [0.02, 1.0]. reasoning must be a concise justification based on the observed history, at most 30 words.Return exactly one JSON object. action must be available. damping and step_fraction must be in [0.02, 1.0]. reasoning must be a concise justification based on the observed history, at most 30 words. At a revision epoch, also return admit (true or false); if admit is true, return admitted_functions and initial_values for their coefficients and frequencies.

Table C.14. Prompts of the active agentic optimization for the functional-basis identification of the spatially varying wall flux in Experiment 3, where the agent updates the controls of the fixed common library, and in Experiment 4, where the agent also grows the library. The controls are the linear coefficients and frequencies of the basis functions, and both experiments share the complete epoch history, the bounds on the controls, and the optimization policy. Experiment 4 adds the basis admission policy, under which the library grows from [1,x,x2][1, x, x^2] by admitting the next family of basis functions at a revision epoch if the misfit has reached a plateau. For each admitted function, the agent decides the initial values of its coefficient and frequency, returns them in the admission fields of the output schema, and writes them into the definition of θ\theta. Since θ\theta parametrizes only the wall flux boundary condition, this edit does not modify the forward solver, the adjoint solver, or the inverse workflow referred to in block 1.

Experiment 3: The trial ends with an error of 3.684%, which equals the median over the five trials (Table 7). At epoch 2, the recovered profile oscillates with an incorrect frequency and exhibits two minima instead of three (Fig. C.8c, Experiment 3), with an error close to 100%. The agent first selects Adam and then changes to the Barzilai–Borwein method at epoch 5, which reduces the error to 56.8% by epoch 10. The full Barzilai–Borwein step at epoch 10, however, increases the misfit by a factor of three, after which the agent changes to the Levenberg–Marquardt method. Under this method, the three minima of the true profile form, and the error decreases to 20.9% at epoch 25 and to 15.2% at epoch 100. At this stage, the central minimum is nearly recovered, whereas the right minimum is too deep and the profile does not return to zero at the right end of the wall. The agent subsequently changes to the normalized gradient method, whose step at epoch 250 increases the misfit by a factor of about nine. The agent then continues with damped normalized-gradient steps that return the controls toward the region of low misfit, and the error decreases from 12.7% at epoch 250 to 3.684% at epoch 500, at which the recovered profile agrees closely with the true profile.

Epoch nnMethodError εn+1\varepsilon_{n+1} (%)Logged ReasoningRatio Jn+1/JnJ_{n+1}/J_n
1Adam99.391Only one epoch is available; Adam suits the highly anisotropic scaled gradient, whose grouped cosine-frequency component is much smaller than the coefficient components. Use a conservative first step.0.977
5Barzilai–Borwein72.823Adam steps reduced the objective, but the latest produced sign reversals in the dominant gradient components; a safeguarded Barzilai–Borwein step with conservative damping limits overshoot.0.821
10Barzilai–Borwein56.807All Barzilai–Borwein steps were accepted, the objective decreased monotonically, and the gradient norm contracted; continue with moderate damping to limit oscillation while preserving progress.3.021
25Levenberg–Marquardt20.926Levenberg–Marquardt has reduced the objective at every epoch since epoch 19; the coefficient gradients reversed after the large step at epoch 23, so take a damped half step.0.855
50Levenberg–Marquardt15.242Levenberg–Marquardt has consistently reduced the objective; continue it with moderate damping and a cautious step after the recent successful steps.0.990
100Levenberg–Marquardt15.167Levenberg–Marquardt has produced the strongest sustained decrease of the objective, while recent full steps oscillate mildly; retain it with modest regularization and a half step.0.982
250Normalized gradient12.683The current objective is the lowest observed, and the latest normalized-gradient step reduced it, whereas recent Levenberg–Marquardt steps were volatile; take a conservative gradient step.8.913
500Normalized gradient3.684Recent larger Levenberg–Marquardt steps overshot, and the gradient points back toward the earlier low-misfit region; a damped normalized-gradient step recovers it and clears stale curvature memory.–

Table C.15. Selected epochs of the selected successful trial of Experiment 3. The update is computed by the controller from the selected method of the optimization policy and its logged controls. εn+1\varepsilon_{n+1} is the relative L∞L_\infty error of the recovered profile, evaluated offline after the trial and not available to the agent, and Jn+1/JnJ_{n+1}/J_n is the observed misfit ratio. The library is the common library of Eq. (13), fixed throughout the trial; since no sparsity-promoting (ℓ1\ell_1 norm) penalty is applied, all of its basis functions remain active, and the recovered expression is therefore not listed.

Experiment 4: The agent selects the normalized gradient method at every listed epoch, so that the course of the recovery is determined by the evolution of the library. With Δn=10\Delta n = 10, the library passes through four stages:

D(0)={1, x, x2},1≤n<10,D(1)=D(0)∪{x3, x4, x5},10≤n<20,D(2)=D(1)∪{cos⁡(β1πx), sin⁡(β2πx)},20≤n<30,D(3)=D(2)∪{xcos⁡(β3πx), xcos⁡(β4πx), x2cos⁡(β5πx),xsin⁡(β6πx), x2sin⁡(β7πx)},30≤n≤75.\begin{aligned} \mathcal{D}^{(0)} &= \{1,\ x,\ x^2\}, && 1 \le n < 10, \\ \mathcal{D}^{(1)} &= \mathcal{D}^{(0)} \cup\{x^3,\ x^4,\ x^5\}, && 10 \le n < 20, \\ \mathcal{D}^{(2)} &= \mathcal{D}^{(1)} \cup\{\cos(\beta_1 \pi x),\ \sin(\beta_2 \pi x)\}, && 20 \le n < 30, \\ \mathcal{D}^{(3)} &= \mathcal{D}^{(2)} \cup\{x\cos(\beta_3 \pi x),\ x\cos(\beta_4 \pi x),\ x^2\cos(\beta_5 \pi x), \\ &\qquad x\sin(\beta_6 \pi x),\ x^2\sin(\beta_7 \pi x)\}, && 30 \le n \le75. \end{aligned}

where β1,…,β7\beta_1,\ldots,\beta_7 are the frequencies of the individual Fourier and polynomial–Fourier basis functions. Within each revision interval, the misfit flattened in the epochs preceding the next revision, with misfit ratios of 0.994, 0.988, and 1.008 at epochs 9, 19, and 29, respectively. The agent therefore identified a plateau at each of these epochs and decided to admit the next family, which entered the library at epochs 10, 20, and 30. After epoch 30, when no family remains, the library is no longer changed. Since no sparsity-promoting (ℓ1\ell_1 norm) penalty is applied, every basis function remains in the expression, and its contribution is set by its linear coefficient and, for the Fourier and polynomial–Fourier functions, also by its frequency. A basis function therefore vanishes if its linear coefficient converges to zero or, for the sine-type functions, if its frequency converges to zero. The recovered wall flux at the selected epochs is listed in Table C.16. The objective is a recovered profile that best approximates the true profile, rather than the identification of the basis functions of the true envelope. Each stage of the library is therefore assessed by the shape and the relative L∞L_\infty error of the recovered profile that it can represent.

With D(0)\mathcal{D}^{(0)}, the recovered profile is a single parabolic trough (Fig. 8c, Experiment 4, epoch 2). It reproduces the trough of the true profile with a smaller depth but none of its three minima, with an error of 69.7% after epoch 1, 56.2% after epoch 5, and 53.0% after epoch 9, at which the misfit has stagnated. With D(1)\mathcal{D}^{(1)}, the higher-order polynomials deepen the trough and reduce the error to 46.6% after epoch 15, after which the misfit stagnates again, and the error remains at 46.5% after epoch 19. A polynomial library of this order can, however, represent only a non-oscillatory profile, and not the three minima of the true profile, which limits the attainable error.

Epoch nnMethodRecovered wall flux gn+1(x)g_{n+1}(x)Error εn+1\varepsilon_{n+1} (%)Logged reasoningRatio Jn+1/JnJ_{n+1}/J_n
1Normalized gradient−0.005−12.139x+12.139x2-0.005 - 12.139x + 12.139x^269.653Initial epoch has nonzero coefficient gradient; use the required full normalized coefficient step.0.164
5Normalized gradient−2.282−10.674x+12.956x2-2.282 - 10.674x + 12.956x^256.210JJ has decreased every epoch under normalized coupled gradients; retain the established step scales and damping.0.744
9Normalized gradient−4.390−6.927x+12.584x2-4.390 - 6.927x + 12.584x^253.014JJ not decreased over recent epochs under normalized coupled gradients; retain the established step scales and damping; admitting the next family.0.994
15Normalized gradient−1.604−9.603x−2.678x2+9.298x3+9.001x4+0.241x5-1.604 - 9.603x - 2.678x^2 + 9.298x^3 + 9.001x^4 + 0.241x^546.598JJ has decreased monotonically through the recent normalized-gradient updates; retain the established coupled step scales.0.847
19Normalized gradient−1.342−10.598x−2.223x2+10.300x3+9.270x4−0.759x5-1.342 - 10.598x - 2.223x^2 + 10.300x^3 + 9.270x^4 - 0.759x^546.461JJ is not decreasing appreciably through the recent normalized-gradient updates; deciding to admit the next family.0.988
25Normalized gradient−1.276−13.119x+14.395x2+0.002x3+0.001x4+0.001x5+1.276cos⁡(4.054πx)+0.005sin⁡(4.002πx)-1.276 - 13.119x + 14.395x^2 + 0.002x^3 + 0.001x^4 + 0.001x^5 + 1.276\cos(4.054\pi x) + 0.005\sin(4.002\pi x)70.346JJ has increased recently at every observed epoch under normalized-gradient updates; retain the established coupled step. Current frequency gradients are nonzero but small, supporting the reduced recent frequency rate.1.171
29Normalized gradient−0.068−11.829x+10.642x2−0.002x3+0.004x4−0.001x5−0.679cos⁡(3.976πx)−0.006sin⁡(4.005πx)-0.068 - 11.829x + 10.642x^2 - 0.002x^3 + 0.004x^4 - 0.001x^5 - 0.679\cos(3.976\pi x) - 0.006\sin(4.005\pi x)60.005JJ has decreased over recent epoch, but not significantly, under normalized-gradient updates; retain the established coupled step; decide to append the next family.1.008
35Normalized gradient−0.056−19.388x+19.444x2+0.001x4−0.001x5+0.060cos⁡(4.070πx)−0.052xcos⁡(4.058πx)+16.450xcos⁡(5.994πx)−16.640xcos⁡(5.974πx)+0.002sin⁡(4.010πx)−0.001xsin⁡(3.994πx)+0.001x2sin⁡(4.018πx)-0.056 - 19.388x + 19.444x^2 + 0.001x^4 - 0.001x^5 + 0.060\cos(4.070\pi x) - 0.052x\cos(4.058\pi x) + 16.450x\cos(5.994\pi x) - 16.640x\cos(5.974\pi x) + 0.002\sin(4.010\pi x) - 0.001x\sin(3.994\pi x) + 0.001x^2\sin(4.018\pi x)10.822JJ has decreased monotonically through the recent normalized-gradient updates; retain the established coupled step scales. Current active coefficient and frequency gradients remain material.0.915
50Normalized gradient0.095−20.963x+20.868x2+0.001x4−0.001x5−0.095cos⁡(4.090πx)+0.095xcos⁡(4.084πx)+17.480xcos⁡(5.994πx)−17.484xcos⁡(5.984πx)+0.002sin⁡(4.010πx)−0.001xsin⁡(3.994πx)+0.001x2sin⁡(4.018πx)0.095 - 20.963x + 20.868x^2 + 0.001x^4 - 0.001x^5 - 0.095\cos(4.090\pi x) + 0.095x\cos(4.084\pi x) + 17.480x\cos(5.994\pi x) - 17.484x\cos(5.984\pi x) + 0.002\sin(4.010\pi x) - 0.001x\sin(3.994\pi x) + 0.001x^2\sin(4.018\pi x)6.988JJ has decreased for three consecutive epochs under the current reduced normalized-gradient schedule; retain it without a behavioral reset.0.962
75Normalized gradient0.258−21.985x+21.727x2+0.001x4−0.001x5−0.258cos⁡(4.098πx)+0.257xcos⁡(4.094πx)+19.440xcos⁡(5.996πx)−19.560x2cos⁡(5.990πx)+0.002sin⁡(4.010πx)−0.001xsin⁡(3.994πx)+0.001x2sin⁡(4.018πx)0.258 - 21.985x + 21.727x^2 + 0.001x^4 - 0.001x^5 - 0.258\cos(4.098\pi x) + 0.257x\cos(4.094\pi x) + 19.440x\cos(5.996\pi x) - 19.560x^2\cos(5.990\pi x) + 0.002\sin(4.010\pi x) - 0.001x\sin(3.994\pi x) + 0.001x^2\sin(4.018\pi x)4.160JJ increased at the current state and both observed gradients are zero; retain the established normalized-gradient schedule with a reduced step fraction.–

Table C.16. Selected epochs of the selected successful trial of Experiment 4, including the epochs immediately preceding each revision of the library (epochs 9, 19, and 29). The recovered wall flux gn+1g_{n+1} is given with the logged coefficients and frequencies of the active basis functions after the update, rounded to three decimals. εn+1\varepsilon_{n+1} is the relative L∞L_\infty error of the recovered profile, evaluated offline after the trial (not available to the agent), and Jn+1/JnJ_{n+1}/J_n is the observed misfit ratio. The logged reasoning is reproduced as recorded and refers to the recent misfit history, which may differ from the ratio of the current epoch.

The extension to D(2)\mathcal{D}^{(2)} admits the first oscillatory basis functions. After epoch 25, the linear coefficients of x3x^3, x4x^4, and x5x^5 have become negligible, and the recovered wall flux is dominated by the basis function cos⁡(β1πx)\cos(\beta_1\pi x) with β1≈4.05\beta_1 \approx4.05. This basis function produces two minima and a maximum at the center of the wall, where the true profile has its deepest minimum. At this epoch, the misfit increases, with a misfit ratio of 1.171, and the error rises to 70.3%, since the controls of the newly admitted Fourier functions have not yet adjusted. By epoch 29, the coefficient of cos⁡(β1πx)\cos(\beta_1\pi x) has changed sign, the error has decreased to 60.0%, and the misfit has stagnated again, with a misfit ratio of 1.008, which indicates that the Fourier functions alone cannot represent the three minima of the true profile.

The extension to D(3)\mathcal{D}^{(3)} admits the polynomial–Fourier basis functions, with which the library can represent an oscillation whose amplitude varies along the wall. After epoch 35, the recovered profile reproduces the three minima of the true profile, and the error decreases to 10.8%. The recovered wall flux is now dominated by the basis functions xx, x2x^{2}, xcos⁡(β4πx)x\cos(\beta_{4}\pi x), and x2cos⁡(β5πx)x^{2}\cos(\beta_{5}\pi x), with β4≈5.99\beta_{4}\approx5.99 and β5≈5.97\beta_{5}\approx5.97, which closely resemble those of the true envelope, whereas the linear coefficient of cos⁡(β1πx)\cos(\beta_{1}\pi x) has become small. During the subsequent epochs, the depths of the minima are refined, and the error decreases to 7.0% after epoch 50 and to 4.160% after epoch 75, which is below the median of 4.987% over the five trials (Table 7). The remaining basis functions are retained with smaller linear coefficients, so that the recovered wall flux contains more basis functions than the true envelope, which is acceptable here, since only the approximation of the true profile is of interest.

References

  1. [1]J. M. Tarbell, Mass transport in arteries and the localization of atherosclerosis, Annual Review of Biomedical Engineering 5 (2003) 79–118. doi:10.1146/annurev.bioeng.5.040202.121529.DOI
  2. [2]A. Farghadan, A. Arzani, The combined effect of wall shear stress topology and magnitude on cardiovascular mass transport, International Journal of Heat and Mass Transfer 131 (2019) 252–260.DOI
  3. [3]M. Mahmoudi, A. Farghadan, D. R. McConnell, A. J. Barker, J. J. Wentzel, M. J. Budoff, A. Arzani, The story of wall shear stress in coronary artery atherosclerosis: biochemical transport and mechanotransduction, Journal of Biomechanical Engineering 143 (4) (2021) 041002.DOI
  4. [4]K. B. Hansen, A. Arzani, S. C. Shadden, Finite element modeling of near-wall mass transport in cardiovascular flows, International Journal for Numerical Methods in Biomedical Engineering 35 (1) (2019) e3148.DOI
  5. [5]T. Linß, Layer-Adapted Meshes for Reaction-Convection-Diffusion Problems, Vol. 1985 of Lecture Notes in Mathematics, Springer, Berlin, 2010. doi:10.1007/978-3-642-05134-0.DOI
  6. [6]M. Van Dyke, Perturbation Methods in Fluid Mechanics, Parabolic Press, Stanford, CA, 1975.
  7. [7]C. M. Bender, S. A. Orszag, Advanced Mathematical Methods for Scientists and Engineers: Asymptotic Methods and Perturbation Theory, Vol. 1, Springer, 1999.
  8. [8]M. H. Holmes, Introduction to Perturbation Methods, 2nd Edition, Vol. 20 of Texts in Applied Mathematics, Springer, New York, 2013.
  9. [9]A. Acrivos, J. D. Goddard, Asymptotic expansions for laminar forced-convection heat and mass transfer. Part 1. Low speed flows, Journal of Fluid Mechanics 23 (2) (1965) 273–291.
  10. [10]H. A. Stone, Heat/mass transfer from surface films to shear flows at arbitrary Peclet numbers, Physics of Fluids A: Fluid Dynamics 1 (1989) 1112–1122.DOI
  11. [11]J. Choi, D. Margetis, T. M. Squires, M. Z. Bazant, Steady advection–diffusion around finite absorbers in two-dimensional potential flows, Journal of Fluid Mechanics 536 (2005) 155–184.DOI
  12. [12]J. M. Lawson, Mass transfer to freely suspended particles at high Péclet number, Journal of Fluid Mechanics 913 (2021) A32. doi:10.1017/jfm.2020.1177.DOI
  13. [13]A. Arzani, K. W. Cassel, R. M. D’Souza, Theory-guided physics-informed neural networks for boundary layer problems with singular perturbation, Journal of Computational Physics 473 (2023) 111768. doi:10.1016/j.jcp.2022.111768.DOI
  14. [14]F. Cao, F. Gao, D. Yuan, J. Liu, Multistep asymptotic pre-training strategy based on PINNs for solving steep boundary singular perturbation problems, Computer Methods in Applied Mechanics and Engineering 431 (2024) 117222.DOI
  15. [15]Z. Shen, L. Ju, L. Zhu, Matched asymptotic expansions-based transferable neural networks for singular perturbation problems, International Journal for Numerical Methods in Engineering 127 (6) (2026) e70307.DOI
  16. [16]G.-M. Gie, Y. Hong, C.-Y. Jung, D. Lee, Singular layer physics-informed neural network method for convection-dominated boundary layer problems in two dimensions, Journal of Computational and Applied Mathematics 474 (2026) 116918. doi:10.1016/j.cam.2025.116918.DOI
  17. [17]H. A. Schwarz, Über einen Grenzübergang durch alternierendes Verfahren, Vierteljahrsschrift der Naturforschenden Gesellschaft in Zürich 15 (1870) 272–286.
  18. [18]P.-L. Lions, On the Schwarz alternating method. In: R. Glowinski, G. H. Golub, G. A. Meurant, J. Périaux (Eds.), First International Symposium on Domain Decomposition Methods for Partial Differential Equations, SIAM, Philadelphia, PA, 1988, pp. 1–42.
  19. [19]M. J. Gander, Schwarz methods over the course of time, Electronic Transactions on Numerical Analysis 31 (2008) 228–255.
  20. [20]A. Quarteroni, A. Valli, Domain Decomposition Methods for Partial Differential Equations, Numerical Mathematics and Scientific Computation, Oxford University Press, Oxford, 1999.DOI
  21. [21]A. Toselli, O. Widlund, Domain Decomposition Methods – Algorithms and Theory, Vol. 34 of Springer Series in Computational Mathematics, Springer, Berlin, 2005.DOI
  22. [22]A. Mota, I. Tezaur, C. Alleman, The Schwarz alternating method in solid mechanics, Computer Methods in Applied Mechanics and Engineering 319 (2017) 19–51. doi:10.1016/j.cma.2017.02.006.DOI
  23. [23]A. Mota, I. Tezaur, G. Phlipot, The Schwarz alternating method for transient solid dynamics, International Journal for Numerical Methods in Engineering 123 (21) (2022) 5036–5071. doi:10.1002/nme.6982.DOI
  24. [24]R. C. Y. Chin, G. W. Hedstrom, J. R. McGraw, F. A. Howes, Parallel computation of multiple scale problems, in: A. Wouk (Ed.), New Computing Environments: Parallel, Vector and Systolic, SIAM, Philadelphia, PA, 1986, pp. 136–153.
  25. [25]G. W. Hedstrom, F. A. Howes, Domain decomposition for a boundary-value problem with a shock layer, in: T. F. Chan, R. Glowinski, J. Périaux, O. B. Widlund (Eds.), Third International Symposium on Domain Decomposition Methods for Partial Differential Equations, SIAM, Philadelphia, PA, 1990, pp. 130–140.
  26. [26]D. L. Brown, R. C. Y. Chin, G. W. Hedstrom, T. A. Manteuffel, Layer tracking, asymptotics, and domain decomposition, in: A. L. Perkins, J. S. Scroggs (Eds.), Proceedings for the ICASE Workshop on Heterogeneous Boundary Conditions, NASA Contractor Report 187630 (ICASE Interim Report 19), NASA Langley Research Center, Hampton, VA, 1991, pp. 28–43.
  27. [27]J. S. Scroggs, Interface conditions for domain decomposition with radical grid refinement, in: A. L. Perkins, J. S. Scroggs (Eds.), Proceedings for the ICASE Workshop on Heterogeneous Boundary Conditions, NASA Contractor Report 187630 (ICASE Interim Report 19), NASA Langley Research Center, Hampton, VA, 1991, pp. 44–54.
  28. [28]G. Rodrigue, E. Reiter, A domain decomposition method for boundary layer problems, in: T. F. Chan, R. Glowinski, J. Périaux, O. B. Widlund (Eds.), Domain Decomposition Methods (Second International Symposium on Domain Decomposition Methods for Partial Differential Equations), SIAM, Philadelphia, PA, 1989, pp. 226–234.
  29. [29]G. W. Hedstrom, F. A. Howes, A domain decomposition method for a convection diffusion equation with turning point, in: T. F. Chan, R. Glowinski, J. Périaux, O. B. Widlund (Eds.), Domain Decomposition Methods (Second International Symposium on Domain Decomposition Methods for Partial Differential Equations), SIAM, Philadelphia, PA, 1989, pp. 38–46.
  30. [30]M. Garbey, A Schwarz alternating procedure for singular perturbation problems, SIAM Journal on Scientific Computing 17 (5) (1996) 1175–1201. doi:10.1137/S1064827593258437.
  31. [31]M. Garbey, H. G. Kaper, Heterogeneous domain decomposition for singularly perturbed elliptic boundary value problems, SIAM Journal on Numerical Analysis 34 (4) (1997) 1513–1544. doi:10.1137/S0036142995285587.
  32. [32]H. MacMullen, E. O’Riordan, G. I. Shishkin, The convergence of classical Schwarz methods applied to convection–diffusion problems with regular boundary layers, Applied Numerical Mathematics 43 (3) (2002) 297–313. doi:10.1016/S0168-9274(01)00177-5.
  33. [33]I. Boglaev, V. Duoba, Domain decomposition for an advection–diffusion problem with parabolic layers, Applied Mathematics and Computation 146 (2003) 27–53. doi:10.1016/S0096-3003(02)00514–3.
  34. [34]I. Moore, A. Gruber, C. R. Wentland, I. Tezaur, Domain decomposition-based coupling of high-fidelity finite element and reduced order operator inference models using the Schwarz alternating method, arXiv preprint arXiv:2510.05350 (2025).
  35. [35]W. Snyder, I. Tezaur, C. Wentland, Domain decomposition-based coupling of physics-informed neural networks via the Schwarz alternating method, in: Computer Science Research Institute Summer Proceedings 2023, 2023, pp. 390–411, technical Report SAND2023-13916R, Sandia National Laboratories; arXiv:2311.00224.arxiv.org/abs/2311.00224
  36. [36]G. Chumbipuma, I. Tezaur, A. Diaz, B. Rivière, Hybrid coupling with numerics-informed neural networks and the overlapping Schwarz alternating method, arXiv preprint arXiv:2609.17841 (2026).arxiv.org/abs/2609.17841
  37. [37]T. P. Mathew, Uniform convergence of the Schwarz alternating method for solving singularly perturbed advection–diffusion equations, SIAM Journal on Numerical Analysis 35 (4) (1998) 1663–1683. doi:10.1137/S0036142995296485.DOI
  38. [38]A. F. Hegarty, J. J. H. Miller, E. O’Riordan, G. I. Shishkin, Special meshes for finite difference approximations to an advection–diffusion equation with parabolic layers, Journal of Computational Physics 117 (1995) 47–54.DOI
  39. [39]A. F. Hegarty, E. O’Riordan, A numerical method for singularly perturbed convection-diffusion problems posed on smooth domains, Journal of Scientific Computing 92 (2022) 84. doi:10.1007/s10915-022-01896-7.DOI
  40. [40]K. B. Hansen, S. C. Shadden, A reduced-dimensional model for near-wall transport in cardiovascular flows, Biomechanics and Modeling in Mechanobiology 15 (3) (2016) 713–722. doi:10.1007/s10237-015-00719-4.DOI
  41. [41]F. Gastaldi, A. Quarteroni, G. Sacchi Landriani, Coupling of two-dimensional hyperbolic and elliptic equations, Computer Methods in Applied Mechanics and Engineering 80 (1–3) (1990) 347–354. doi:10.1016/0045-7825(90)90039-0.DOI
  42. [42]M. J. Gander, L. Halpern, V. Martin, A new algorithm based on factorization for heterogeneous domain decomposition, Numerical Algorithms 73 (1) (2016) 167–195. doi:10.1007/s11075-015-0091-6.DOI
  43. [43]A. Logg, K.-A. Mardal, G. N. Wells (Eds.), Automated Solution of Differential Equations by the Finite Element Method: The FEniCS Book, Vol. 84 of Lecture Notes in Computational Science and Engineering, Springer, 2012.DOI
  44. [44]P. E. Farrell, D. A. Ham, S. W. Funke, M. E. Rognes, Automated derivation of the adjoint of high-level transient finite element programs, SIAM Journal on Scientific Computing 35 (4) (2013) C369–C393.arxiv.org/abs/1204.5577
  45. [45]S. K. Mitusch, S. W. Funke, J. S. Dokken, dolfin-adjoint 2018.1: automated adjoints for FEniCS and Firedrake, Journal of Open Source Software 4 (38) (2019) 1292. doi:10.21105/joss.01292.DOI
  46. [46]M. B. Giles, N. A. Pierce, An introduction to the adjoint approach to design, Flow, Turbulence and Combustion 65 (3–4) (2000) 393–415.
  47. [47]R. E. Plessix, A review of the adjoint-state method for computing the gradient of a functional with geophysical applications, Geophysical Journal International 167 (2) (2006) 495–503. doi:10.1111/j.1365-246X.2006.02978.x.DOI
  48. [48]M. Raissi, P. Perdikaris, G. E. Karniadakis, Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, Journal of Computational Physics 378 (2019) 686–707. doi:10.1016/j.jcp.2018.10.045.DOI
  49. [49]G. E. Karniadakis, I. G. Kevrekidis, L. Lu, P. Perdikaris, S. Wang, L. Yang, Physics-informed machine learning, Nature Reviews Physics 3 (6) (2021) 422–440. doi:10.1038/s42254-021-00314-5.DOI
  50. [50]M. Elhadidy, S. Viknesh, R. M. D’Souza, A. Arzani, Wall shear stress reconstruction from concentration: Differentiable physics and physics-informed neural networks, Physics of Fluids 38 (8) (2026) 081908.arxiv.org/abs/2606.06313
  51. [51]P. Ma, T.-H. Wang, M. Guo, Z. Sun, J. B. Tenenbaum, D. Rus, C. Gan, W. Matusik, LLM and simulation as bilevel optimizers: A new paradigm to advance physical scientific discovery, in: Proceedings of the 41st International Conference on Machine Learning, Vol. 235 of Proceedings of Machine Learning Research, 2024, pp. 33940–33962.arxiv.org/abs/2405.09783
  52. [52]C. Yang, X. Wang, Y. Lu, H. Liu, Q. V. Le, D. Zhou, X. Chen, Large language models as optimizers, in: International Conference on Learning Representations, 2024.arxiv.org/abs/2309.03409
  53. [53]T. Liu, N. Astorga, N. Seedat, M. van der Schaar, Large language models to enhance Bayesian optimization, in: International Conference on Learning Representations, 2024.arxiv.org/abs/2402.03921
  54. [54]S. Brahmachary, S. M. Joshi, A. Panda, K. Koneripalli, A. K. Sagotra, H. Patel, A. Sharma, A. D. Jagtap, K. Kalyanaraman, Large language model-based evolutionary optimizer: Reasoning with elitism, Neurocomputing 622 (2025) 129272.arxiv.org/abs/2403.02054
  55. [55]X. Zhang, Z. Xu, G. Zhu, C. M. J. Tay, Y. Cui, B. C. Khoo, L. Zhu, Using large language models for parametric shape optimization, arXiv preprint arXiv:2412.08072 (2024).arxiv.org/abs/2412.08072
  56. [56]S. Pandey, R. Xu, W. Wang, X. Chu, OpenFOAMGPT: A retrieval-augmented large language model (LLM) agent for OpenFOAM-based computational fluid dynamics, Physics of Fluids 37 (3) (2025) 035120.
  57. [57]Y. Chen, L. Zhang, X. Zhu, H. Zhou, Z. Ren, OptMetaOpenFOAM: Large language model driven chain of thought for sensitivity analysis and parameter optimization based on CFD, arXiv preprint arXiv:2503.01273 (2025).
  58. [58]Z. Xu, L. Wang, C. Wang, Y. Chen, Q. Luo, H.-D. Yao, S. Wang, G. He, CFDagent: A language-guided, zero-shot multi-agent system for complex flow simulation, Physics of Fluids 37 (11) (2025) 117124. doi:10.1063/5.0294696.DOI
  59. [59]R. Deotale, A. Srinivasan, M. Golestanian, Y. Tian, T. Zhang, P. Vlachos, H. Gomez, ALL-FEM: Agentic large language models fine-tuned for finite element methods, Computer Methods in Applied Mechanics and Engineering 457 (2026) 118985. doi:10.1016/j.cma.2026.118985.
  60. [60]J. Guo, C. Park, D. Qian, T. J. R. Hughes, W. K. Liu, Large language model-empowered next-generation computer-aided engineering, Computer Methods in Applied Mechanics and Engineering 450 (2026) 118591.arxiv.org/abs/2509.11447
  61. [61]F. Ma, J. Chen, Z. Dai, F. Cai, Y. Hu, Autonomous inverse modeling of complex groundwater systems via a physics-integrated large language model multi-agent framework, Water Research 299 (2026) 125886. doi:10.1016/j.watres.2026.125886.
  62. [62]M. Du, Z. Wang, Y. Chen, L. Nie, D. Zhang, Large language models for automatic equation discovery of nonlinear dynamics, Physics of Fluids 36 (9) (2024) 097121.DOI
  63. [63]P. Shojaee, K. Meidani, S. Gupta, A. B. Farimani, C. K. Reddy, LLM-SR: Scientific equation discovery via programming with large language models, in: International Conference on Learning Representations, 2025.arxiv.org/abs/2404.18400
  64. [64]Q. Jiang, G. E. Karniadakis, AgenticSciML: collaborative multi-agent systems for emergent discovery in scientific machine learning, npj Artificial Intelligence 2 (2026) 57. doi:10.1038/s44387-026-00102-5.
  65. [65]B. Huang, X. Wu, Y. Zhou, J. Wu, L. Feng, R. Cheng, K. C. Tan, Exploring the true potential: Evaluating the black-box optimization capability of large language models, arXiv preprint arXiv:2404.06290 (2024).arxiv.org/abs/2404.06290
  66. [66]A. Yang, A. Li, B. Yang, et al., Qwen3 technical report, arXiv preprint arXiv:2505.09388 (2025).arxiv.org/abs/2505.09388
  67. [67]OpenAI, Codex: A cloud-based software engineering agent, https://openai.com/index/introducing-codex/ (2025).
  68. [68]X. Pang, Z. Zhou, X. Li, F. Lv, S. Wei, S. Cui, B. Han, C. Zhang, Deliberate evolution: Agentic reasoning for sample-efficient symbolic regression with LLMs, arXiv preprint arXiv:2606.04360 (2026).arxiv.org/abs/2606.04360
  69. [69]T. Islam, D. Wadekar, T. Venumadhav, M. Zaldarriaga, A. K. Mehta, J. Roulet, B. Zackay, Discovery of interpretable surrogates via agentic AI: Application to gravitational waves, arXiv preprint arXiv:2605.11280 (2026).arxiv.org/abs/2605.11280
  70. [70]M. S. Alnæs, A. Logg, K. B. Ølgaard, M. E. Rognes, G. N. Wells, Unified form language: a domain-specific language for weak formulations of partial differential equations, ACM Transactions on Mathematical Software 40 (2) (2014) 9:1–9:37. doi:10.1145/2566630.DOI
  71. [71]S. Viknesh, Y. Tatari, C. Christenson, A. Arzani, ADAM-SINDy: An efficient optimization framework for parameterized nonlinear dynamical system identification, Physical Review Research 8 (1) (2026) 013040.
  72. [72]S. L. Brunton, J. L. Proctor, J. N. Kutz, Discovering governing equations from data by sparse identification of nonlinear dynamical systems, Proceedings of the National Academy of Sciences 113 (15) (2016) 3932–3937.DOI
  73. [73]OpenAI, How to make your completions outputs reproducible with the new seed parameter, OpenAI Cookbook (2023). URL https://developers.openai.com/cookbook/examples/reproducible_outputs_with_the_seed_parameter

Paper details

vlnc:W_cybbs2ag
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 2

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents