---
title: 'FlowSlider: CFD & Generative Methods'
url: https://www.emergentmind.com/topics/flowslider
type: topic
---

# FlowSlider: CFD & Generative Methods

FlowSlider is a term that appears in two distinct technical contexts in the arXiv literature. In computational fluid dynamics, it denotes a high-order, mortar-based sliding-mesh interface for DGSEM, introduced as an efficient implementation for discontinuous Galerkin compressible Navier–Stokes solvers and demonstrated in large-scale turbomachinery LES [2008.04356]. In generative modeling, it denotes a training-free method for continuous image editing in Rectified Flow, based on a fidelity-steering decomposition of FlowEdit’s update that enables slider-style control without post-training [2604.02088]. The shared name therefore refers not to a single framework, but to two domain-specific constructions with different mathematical objects, implementation constraints, and evaluation criteria.

## 1. Name, scope, and disciplinary usage

In the current literature represented here, “FlowSlider” names two separate methods.

| Usage | Domain | Core characterization |
|---|---|---|
| FlowSlider | Computational fluid dynamics | High-order, mortar-based sliding-mesh interface for DGSEM |
| FlowSlider | Generative modeling | Training-free continuous image editing via fidelity-steering decomposition |

The CFD usage is embedded in the theory and implementation of sliding meshes for deformed domains, where different parts of the domain are in relative motion. Its primary concerns are non-conforming interface coupling, conservation, free-stream preservation, and efficient MPI communication in a dynamically changing mesh topology. The image-editing usage is embedded in Rectified Flow-based prompt-pair editing on real images, where the central problem is continuous edit-strength control under fidelity constraints.

A recurrent source of ambiguity is therefore terminological rather than methodological. The two methods share a label but operate on different state spaces: DG face and mortar representations in one case, and latent ODE trajectories and guided velocity fields in the other.

## 2. Mortar-based sliding interfaces for DGSEM

In the CFD setting, FlowSlider is defined as a high-order, mortar-based sliding-mesh interface for DGSEM with minimal overhead in both computation and MPI communication [2008.04356]. At each non-conforming interface between a static and a moving sub-domain, a layer of 2D mortar elements is introduced, and each DG face $\Omega$ is split into two mortars $\Xi_1,\Xi_2$. The coupling consists of three operations: projecting the DG solution, and its gradients for viscous terms, from the face onto the mortars; computing a unique numerical flux via a Riemann solver on each mortar; and projecting that flux back onto the two faces.

For the projection $\Omega \to \Xi$, with $\ell_i$ denoting the 1D Lagrange basis on $[-1,1]$ at the Gauss–Lobatto nodes, the face representation is written as
$$
U^k(\xi) \simeq \sum_{i=0}^N \hat U_i^k\,\ell_i(\xi).
$$
On the mortar $\Xi$, a local coordinate $z \in [-1,1]$ is introduced, with a linear mapping $\xi=\xi(z)$ depending on the hanging-node position $\sigma$. The un-weighted $L^2$ projection onto $\Xi$ yields
$$
\hat Q_i^{\Xi,L/R}
= (M^{-1}S^{\Omega\to\Xi})_{ij}\,\hat U_j
\equiv P^{\Omega\to\Xi}_{ij}\,\hat U_j,
$$
where
$$
M_{ij} = \int_{-1}^1 \ell_i(z)\,\ell_j(z)\,dz,\qquad
S^{\Omega\to\Xi}_{ij} = \int_{-1}^1 \ell_i(\xi(z))\,\ell_j(z)\,dz.
$$
The operator $P^{\Omega\to\Xi}$ depends only on $\sigma$ and $N$ and can be precomputed for planar interfaces or assembled on the fly for curved ones.

For the back-projection $\Xi \to \Omega$, after computing a unique flux $\mathfrak{F}^{\Xi,L/R}(z)$ on the mortar, FlowSlider enforces
$$
\int_{\Omega} \bigl(\mathfrak{F}^{\Omega}(\xi)-\mathfrak{F}^{\Xi}(z(\xi))\bigr)\,\ell_j(\xi)\,d\xi = 0,
$$
which yields
$$
\hat{\mathfrak{F}}^\Omega = P^{\Xi\to\Omega}\,\hat{\mathfrak{F}}^\Xi
= \Bigl(\frac{1-\sigma}{2}M^{-1}S^{\Xi_1\to\Omega}
+\frac{1+\sigma}{2}M^{-1}S^{\Xi_2\to\Omega}\Bigr)\,\hat{\mathfrak{F}}^{\Xi}.
$$

For straight faces, conservation follows because $S$ and $M$ are exact for polynomials of degree $\le N$, so that
$$
\sum_{\text{mortars}}\int_{\Xi}\ell_i(z)\,dz
=
\int_{\Omega}\ell_i(\xi)\,d\xi.
$$
The free-stream test is also exact: for $U(\xi)=\mathrm{const}$, one has $\hat U_j = U^\ast$ for all $j$, and therefore
$$
\hat Q_i = (M^{-1}S)_{ij}\,U^\ast
= U^\ast\sum_j(M^{-1}M)_{ij}
= U^\ast,
$$
with back-projection again returning $U^\ast$. This establishes constant-state preservation on plane interfaces.

## 3. Three-dimensional algorithmics, MPI workflow, and scaling

For the general curved-interface case, FlowSlider represents surface mortars as 2D curved patches. In DGSEM, each mortar is represented by tensor-product polynomials of degree $N$ in both mortar directions, and the 2D projections decompose into two successive 1D operations along each coordinate line [2008.04356]. In the planar-interface specialization, interfaces are Cartesian in one movement-parallel direction and possibly curved in the other two. If the movement is pure rotation about a fixed axis or pure translation, hanging-node positions $\sigma$ are identical for all faces at a given time, so $P^{\Omega\to\Xi}$ and $P^{\Xi\to\Omega}$ are shared.

The implementation uses explicit connectivity and storage structures. Each static face is indexed by $(i_{\parallel}, i_{\perp})$, and each mortar has a sub-index $\mathrm{sub}\in\{0,1\}$. A one-to-one map $\mathrm{mortarID}=m(i_{\parallel}, i_{\perp}, \mathrm{sub})$ stores process-local ordering. The principal arrays are
$U_{\mathrm{primary}}^{sm}[\mathrm{mortarID}, (N+1)\times \mathrm{vars}]$,
$U_{\mathrm{replica}}^{sm}[\dots]$,
$F_{\mathrm{primary}}^{sm}[\dots]$,
and
$F_{\mathrm{replica}}^{sm}[\dots]$.
The parameter $\sigma$ is updated every stage or time-step; if $\sigma$ crosses $\pm 1$, hanging indices $i_{\parallel}$ shift by one and the sorting is recomputed only then.

Parallelization emphasizes a priori communication partner determination. During initialization, for each static face $(i_{\parallel}, i_{\perp})$, the MPI rank $r_{\mathrm{move}}(i_{\parallel}, i_{\perp})$ of the adjacent moving-subdomain process is looked up and broadcast, and the moving side stores $r_{\mathrm{stat}}(i_{\parallel}, i_{\perp})$. This global exchange is performed once. To satisfy the conditions that partners and message size are known a priori, data are contiguous, and ordering is identical on send and receive, a local index array $A$ of tuples $(\mathrm{rank\_partner}, i_{\parallel}, i_{\perp}, \mathrm{sub}, \mathrm{localFaceID})$ is built and sorted lexicographically by $(\mathrm{rank\_partner}, i_{\parallel}, i_{\perp}, \mathrm{sub})$. The sorted column index is $\mathrm{mortarID}$, which defines both packing of $U_{\mathrm{replica}}^{sm}$ before `MPI_Isend` and unpacking of incoming $U_{\mathrm{primary}}^{sm}$ after `MPI_Irecv`. The inverse map $m(\mathrm{localFaceID}, \mathrm{sub})=\mathrm{mortarID}$ is retained for fast packing and unpacking during projection.

The per-stage or per-time-step workflow computes local $\sigma$; checks whether $\lfloor \sigma \rfloor$ has changed and, if so, recomputes $A$ and the sorting; interpolates $U_{\mathrm{face}}\to U_{\mathrm{replica}}^{sm}$ using $m(\,)$; exchanges replica and primary data by nonblocking MPI; overlaps the exchange with local DG interior work; waits for the arrival of $U_{\mathrm{primary}}^{sm}$; computes the mortar flux $F_{\mathrm{primary}}^{sm}$ on the static side via a Riemann solver; exchanges flux data; and finally projects $F_{\mathrm{replica}}^{sm}\to F_{\mathrm{face}}$ on the moving side and $F_{\mathrm{primary}}^{sm}\to F_{\mathrm{face}}$ on the static side.

Performance data were reported on Hazel Hen, a Cray XC40 with 24 cores per node, at DG order $N=5$. Strong scaling up to 12 288 cores achieved efficiency $>80\%$ for $\ge 10\,000$ DOF/core. Weak scaling from 36 to 288 elements/core achieved efficiency $\gtrsim 90\%$. Relative to static DGSEM, PID degrades by approximately $15\%$ due to ALE flux and mortar operations. Additional memory scales as $O(\#\mathrm{mortars}\times (N+1)\times \mathrm{vars})$, and for a typical rotor-stator partition it adds approximately $5$–$8\%$ to total memory.

## 4. Validation and turbomachinery application

The CFD FlowSlider was validated by both analytical and application-oriented studies [2008.04356]. In a 2D isentropic vortex crossing a curved interface, $L_2$ errors of $\rho$ at $t=4.0$ showed rates approximately $N+1$ for $N=2\ldots 5$. In a 3D manufactured sine wave with a planar sliding interface, $L_2$ errors at $t=1.0$ recovered full order. These results support the stated high-order accuracy of the mortar-based interface treatment.

A large-scale practical application was a wall-resolved implicit LES of the 1½-stage Aachen turbine. The mesh comprised 966 288 hexahedral elements, 24 layers in span, 5th-order curved geometry, and approximately 208 M DOF with sixth-order polynomials. Sliding interfaces were placed between stator–rotor and rotor–stator, with periodicity in pitch. Boundary conditions were measured inflow $(\rho,p,v)$ at the stator inlet, pressure outflow with sponge, and adiabatic no-slip walls. Time integration used a 4-stage low-storage RK scheme with $\mu=1.8\mathrm{e}{-5}\,\mathrm{kg}/\mathrm{m\,s}$, $R=287\,\mathrm{J}/\mathrm{kg\,K}$, $\gamma=1.4$, and $\mathrm{Pr}=0.72$.

The reported compute cost was approximately 27 000 CPU h per rotor period on 4800 cores, with $\mathrm{PID}\approx 1.3\,\mu\mathrm{s}/\mathrm{DOF}/\mathrm{stage}$. Phase-averaged surface pressure on stator 1, rotor, and stator 2 matched URANS and experiments at trailing edges. Instantaneous $\lambda_2$-isosurfaces revealed transition on the stator suction side, wake–rotor interaction, and vortex shedding. Rotor blade lift versus phase showed maxima and minima when the stator wake impinged on the pressure side and suction side, and the lift spectrum exhibited a dominant 3rd harmonic of the blade-passing frequency and peaks near stator-wake shedding frequency.

Taken together, these results support the concluding characterization that the mortar approach achieves high-order accuracy $O(\Delta x^{N+1})$ across moving interfaces, provable conservation and free-stream preservation, excellent strong and weak scaling with only approximately $15\%$ overhead, and practical utility in expensive LES of turbomachinery.

## 5. Continuous image editing in Rectified Flow

In the generative-modeling setting, FlowSlider is a training-free method for continuous image editing in Rectified Flow that requires no post-training [2604.02088]. Rectified Flow models define a learnable ODE via the straight-line interpolation
$$
z_t = (1-t)\cdot z_1 + t\cdot z_0,\qquad t\in[0,1],
$$
with learned velocity $V_t(z_t)\simeq dz_t/dt$. Conditioning by classifier-free guidance is written as
$$
V_{\mathrm{cfg}}(z_t,t,c)
=
V(z_t,t,\varnothing)
+
\omega\cdot [V(z_t,t,c)-V(z_t,t,\varnothing)],
$$
where $\omega\ge 0$ is the guidance scale.

The immediate precursor is FlowEdit, which extends Rectified Flow from single-prompt generation to prompt-pair editing $(c_{\mathrm{src}}\to c_{\mathrm{tar}})$ on real images without inversion. At each integration time $t$, FlowEdit forms a noisy source state
$$
z_t^{\mathrm{src}} = (1-t)x_{\mathrm{src}} + t\epsilon,
$$
maintains an edit trajectory $z_t^{\mathrm{edit}}$ initialized to $z_{n_{\max}}^{\mathrm{src}}$ at the chosen edit-start step, anchors a target state
$$
z_t^{\mathrm{tar}} = z_t^{\mathrm{edit}} + (z_t^{\mathrm{src}} - x_{\mathrm{src}}),
$$
computes the difference update
$$
V^\Delta(t) = V(z_t^{\mathrm{tar}}, t, c_{\mathrm{tar}}) - V(z_t^{\mathrm{src}}, t, c_{\mathrm{src}}),
$$
and advances $z_t^{\mathrm{edit}}$ by $dz/dt = V^\Delta(t)$.

The motivation for FlowSlider is that FlowEdit, at its default strength $s=1$, produces high-fidelity edits, but naively scaling $V^\Delta$ by $s>1$ amplifies both semantic change and residual noise, leading to artifacts and drift, including ringing and structural collapse. FlowSlider addresses this by introducing an additional term $V(z_t^{\mathrm{tar}}, t, c_{\mathrm{src}})$ and decomposing
$$
V^\Delta(t)
=
\bigl[V(z_t^{\mathrm{tar}}, t, c_{\mathrm{tar}})-V(z_t^{\mathrm{tar}}, t, c_{\mathrm{src}})\bigr]
+
\bigl[V(z_t^{\mathrm{tar}}, t, c_{\mathrm{src}})-V(z_t^{\mathrm{src}}, t, c_{\mathrm{src}})\bigr]
\equiv V_{\mathrm{steer}}(t)+V_{\mathrm{fid}}(t).
$$
In compact form,
$$
\Delta x = V^\Delta(t) = F(x,x_0,t)+S(x,t),
$$
with
$$
S(x,t)\equiv V_{\mathrm{steer}}(t)
=
V(z_t^{\mathrm{tar}}, t, c_{\mathrm{tar}})
-
V(z_t^{\mathrm{tar}}, t, c_{\mathrm{src}})
$$
and
$$
F(x,x_0,t)\equiv V_{\mathrm{fid}}(t)
=
V(z_t^{\mathrm{tar}}, t, c_{\mathrm{src}})
-
V(z_t^{\mathrm{src}}, t, c_{\mathrm{src}}).
$$

Within this formulation, the fidelity term $F$ acts as a source-conditioned stabilizer because both velocities use the same prompt $c_{\mathrm{src}}$ and differ only in state, while the steering term $S$ isolates the cross-prompt velocity difference at the same state $z_t^{\mathrm{tar}}$. The strength-parameterized update is then defined as
$$
V_s^\Delta(t) = F(x,x_0,t) + s\cdot S(x,t),
$$
or, in shorthand,
$$
\Delta x(s)=F+s\,S.
$$
This recovers FlowEdit exactly at $s=1$ and permits attenuated edits for $s<1$ and amplified edits for $s>1$ without retraining.

## 6. Fidelity-steering geometry, inference-time procedure, and empirical behavior

A central claim of the image-editing FlowSlider is geometric: the instantaneous angle $\theta(t)$ between $V_{\mathrm{fid}}(t)$ and $V_{\mathrm{steer}}(t)$ is measured by
$$
\cos \theta(t)
=
\frac{\langle V_{\mathrm{fid}}(t),V_{\mathrm{steer}}(t)\rangle}
{\|V_{\mathrm{fid}}(t)\|\cdot \|V_{\mathrm{steer}}(t)\|},
$$
and empirically clusters near $90^\circ$ [2604.02088]. Under the scaled update $V_s^\Delta = F+s\cdot S$, the squared norm becomes
$$
\|V_s^\Delta\|^2
=
\|F\|^2 + s^2\|S\|^2 + 2s\,\|F\|\,\|S\|\cos\theta.
$$
When $\cos\theta \approx 0$, varying $s$ changes the steering magnitude almost independently of the fidelity component. The reported projections are
$$
p_{\mathrm{fid}}(s,t) = \langle V_s^\Delta,\hat F\rangle
= \|F\| + s\|S\| \cos\theta \approx \|F\|,
$$
and
$$
p_{\mathrm{steer}}(s,t) = \langle V_s^\Delta,\hat S\rangle
= s\|S\|,
$$
which formalize the claim that steering grows linearly in $s$ while fidelity remains stable.

Implementation is entirely at inference time. At each solver step, three guided velocity fields are evaluated: $V(z_t^{\mathrm{tar}}, t, c_{\mathrm{tar}})$, $V(z_t^{\mathrm{tar}}, t, c_{\mathrm{src}})$, and $V(z_t^{\mathrm{src}}, t, c_{\mathrm{src}})$. Relative to FlowEdit’s two calls, this adds one extra network call but introduces no new weights and no training. With $T=28$ ODE steps, as in the experiments, and one RK2 or Euler step per $t$, the velocity evaluations are the only stated overhead. The operational loop initializes $z^{\mathrm{src}}$ and $z^{\mathrm{edit}}$ at $t_{n_{\max}}$; for $i=n_{\max}\to 1$, recomputes $z^{\mathrm{src}}_{(i)}$, forms $z^{\mathrm{tar}}_{(i)} = z^{\mathrm{edit}}_{(i)} + (z^{\mathrm{src}}_{(i)}-x_{\mathrm{src}})$, computes $S$ and $F$, forms $V^\Delta_{(s)} \leftarrow F+s\cdot S$, and updates $z^{\mathrm{edit}}_{(i-1)} \leftarrow z^{\mathrm{edit}}_{(i)} + \Delta t \cdot V^\Delta_{(s)}$ before returning $x^{\mathrm{edit}} = z^{\mathrm{edit}}_{(0)}$.

The experiments used FLUX.1-dev and Stable Diffusion 3 Medium as Rectified Flow backbones. Evaluation included a 250-image continuous-editing benchmark spanning season, weather, decay, style, and portrait attributes, together with PIE-Bench general editing for out-of-distribution evaluation. Edit quality was measured by CLIP-dir and DreamSim, while slider behavior was measured by Monotonicity, defined as the fraction of consecutive $s$ steps where CLIP-T$\uparrow$ and DreamSim$\uparrow$, and by Smoothness, defined as the worst-case normalized triangle deficit over LPIPS distances. Baselines included learning-based sliders, namely Kontinuous Kontext and SliderEdit, as well as heuristic alternatives such as CFG-scale tuning, edit-window tuning $(n_{\max})$, naive $V^\Delta$ scaling, and linear interpolation of velocities.

On the FLUX.1 backbone, averaged over $s\in\{1\ldots 5\}$, FlowSlider achieved the highest $\mathrm{Mono}\approx 0.83$ and lowest $\mathrm{Smooth}\approx 0.01$, together with top-tier edit quality at $\mathrm{DreamSim}\approx 0.09$ and $\mathrm{CLIP\text{-}dir}\approx 0.40$. Qualitatively, it yielded artifact-free, smoothly intensifying edits across the stated tasks. The paper identifies several advantages: no fine-tuning, no extra data, plug-in compatibility with Rectified Flow editors, exact recovery of FlowEdit at $s=1$, and bidirectional editing by $s<0$. It also states clear limitations: at very large $s \gg 5$, orthogonality breaks down and structure can collapse, so practical $s\in[0,5]$ is recommended; and discrete concept changes such as “rabbit $\to$ cat” saturate at $s\approx 1$, after which further scaling yields artifacts. The stated future directions are adaptive step-size or higher-order integrators, combination with learned inversion or latent-space adapters, and extension to multi-instruction editing by decomposing additional steering axes in a similar fidelity-steering subspace.

Source: https://www.emergentmind.com/topics/flowslider