Solutions of second-order elliptic PDE problems on nonconvex or cracked domains with mixed Dirichlet-Neumann conditions typically lie outside H2(Ω). Near re-entrant corners, crack tips and points where the boundary condition changes type, the gradient grows like rλ−1 with λ<1. We study residual-based adaptive refinement in hybrid variational-collocation PINNs. A multiscale Fourier-feature network is trained on a composite loss. The loss combines a variational residual tested against Legendre bubble functions, a strong-form collocation term and penalties for the Dirichlet and Neumann data. The variational term needs only first derivatives of the network, whereas the collocation term requires second derivatives and provides a residual that can be evaluated at any point. After each training stage, candidate points selected by this residual are added to the collocation set. The method is tested on five two dimensional benchmarks, namely a Mode~III crack, a cross-shaped domain with four re-entrant corners with unequal amplitude, a reaction-diffusion problem with four localized peaks, a monotone semilinear problem with a boundary layer and the Motz problem. Compared with uniform point insertion under the same collocation and iteration budget, residual-based refinement reduced the relative L2 error by up to a factor of 32, the relative L∞ error by up to a factor of 38 and the relative H1 semi-norm error by up to a factor of 15.
Figures & tables
Problem
Points of S that govern λ
Rays
ω
λ1
Crack (§ 5.1 )
crack tip
(N,N)
2π
1/2
Cross (§ 5.2 )
four re-entrant corners
(N,N)
3π/2
2/3
Reaction-diffusion (§ 5.3 )
vertices
(N,N)
π/2
2
Semilinear (§ 5.4 )
re-entrant corner
(D,D)
3π/2
2/3
Motz (§ 5.5 )
junction at (0,0)
(N,D)
π
1/2
Table 1: Leading singular exponents from ( 2.9 ). In the cross problem the corner singularity enters through the flux data h , the exponent is the same for (D,D) and (N,N).
Problem
Ψ(x)
nin
Crack (§ 5.1 )
(x,y,r1/2cos2θ,r1/2sin2θ)
4
Cross (§ 5.2 )
(x,y,r12/3,r22/3,r32/3,r42/3)
6
Reaction-diffusion (§ 5.3 )
(x,y)
2
Semilinear (§ 5.4 )
(x,y,r2/3)
3
Motz (§ 5.5 )
(x,y,r1/2cos2θ)
3
Table 2: The enrichment map Ψ of ( 3.1 ). Here ri is the distance to the i -th re-entrant corner. For the crack, (r,θ) are polar coordinates centered at the tip, with θ∈(0,2π) and the branch cut on the slit. For the Motz problem, (r,θ) are centered at the Dirichlet-Neumann junction, with θ∈[0,π] . In the semilinear row, r is the distance to the re-entrant corner at the origin. Every radius is evaluated through ( 3.2 ).
Figure 1: Architecture of the proposed framework. A multiscale Fourier-feature embedding γ , whose frequency matrices are drawn once and held fixed, acts on the enriched coordinate z=Ψ(x) and feeds a residual tanh network whose output, scaled by cu , is the trial function u^(x;θ) , Ψ appends the leading singular mode where the corner behavior is known and is the identity otherwise. One application of automatic differentiation supplies ∇u^ for the variational residual Rije , assembled on the fixed quadrature set TQ against the Legendre bubble test functions vije , a second, nested application supplies Δu^ for the strong-form residual R(u^) on the collocation set Tf . As every vije vanishes on ∂Ωe , the natural boundary functional Bije vanishes identically and the Neumann data reach the loss only through the penalty LN . The composite loss is the weighted sum of the variational residual, the collocation term and the two boundary penalties. The RAR loop branches from the strong-form residual, the only loss component that can be evaluated at an arbitrary interior point. It scores a candidate pool C , discards candidates inside the guard radius rg , inserts the m highest ranked points into Tf and continues training from the current parameters. The element partition, the number K of test functions per direction and the quadrature set TQ are fixed throughout, so the scheme performs neither h - nor p -refinement, adaptivity acts on Tf alone.
Metric
VC-PINNs (uniform)
VC-PINNs-RAR
Relative L2 error
0.4138
0.3545
Relative L∞ error
2.462
1.889
Relative H1 semi-norm error
2.374
1.442
Table 3: Crack problem on the slit square (Mode III). All errors are reported in percent (%) and bold marks the more accurate arm in each row. Both arms use the same collocation schedule ( ∣Tf∣=1500→3900 ), 150,000 Adam iterations and thirteen L-BFGS stages, one training run per arm. Errors are evaluated on a uniform 301×301 grid on [−1,1]2 . The relative L∞ error is max∣u−u^∣/max∣u∣ over the grid, where max∣u∣=21/4cos(π/8)≈1.099 is attained at the corners (1,±1) , the H1 semi-norm excludes grid points with r≤10−3 .
Figure 2: Crack problem on the slit square (Mode III). (A-C) Exact solution, VC-PINNs (uniform) prediction and pointwise absolute error. (D-F) Domain with boundary conditions and element partition, uniform collocation set and adaptive collocation set after twelve rounds, ∣Tf∣=1500→3900 . (G-I) Exact solution, VC-PINNs-RAR prediction and pointwise absolute error; panels C and I have separate color scales. (J-K) Adam loss components for the uniform and the RAR arm.
Metric
VC-PINNs (uniform)
VC-PINNs-RAR
Relative L2 error
5.078
0.1601
Relative L∞ error
13.85
1.283
Relative H1 semi-norm error
32.36
2.248
Table 4: Cross problem. All errors are reported in percent (%) and bold marks the more accurate arm in each row. Both arms use the same collocation schedule ( ∣Tf∣=8000→10,400 ), 150,000 Adam iterations and thirteen L-BFGS stages; one training run per arm. Errors are evaluated at the points of a uniform 301×301 grid on [−1,1]2 that lie in Ω . The relative L∞ error is max∣u−u^∣/max∣u∣ over these points, where max∣u∣≈3.577 ; the H1 semi-norm uses the network gradient from automatic differentiation and excludes points within 10−3 of a corner.
Figure 3: Cross problem: Laplace equation on the cross-shaped domain. (A–C) Exact solution, VC-PINNs (uniform) prediction and pointwise absolute error. (D-F) Domain with boundary conditions and element partition, uniform collocation set and adaptive collocation set after twelve rounds, ∣Tf∣=8000→10,400 . (G-I) Exact solution, VC-PINNs-RAR prediction and pointwise absolute error; panels C and I have separate color scales. (J-K) Adam loss components for the uniform and the RAR arm.
Metric
VC-PINNs (uniform)
VC-PINNs-RAR
Relative L2 error
16.00
1.015
Relative L∞ error
26.50
0.6986
Relative H1 semi-norm error
64.46
4.738
Table 5: Reaction-diffusion problem. All errors are reported in percent (%) and bold marks the more accurate arm in each row. The RAR arm grows its collocation set from 10,000 to 13,000 points over ten rounds of 300 insertions, with 140,000 Adam iterations and eleven L-BFGS stages. The uniform arm is trained on a fixed set of uniformly drawn collocation points without insertion rounds. One training run per arm. Errors are evaluated on a uniform 401×401 grid on [−1,1]2 and the H1 semi-norm is computed with central differences on the same grid. As max∣u∣=1 , the relative L∞ error equals the absolute one.
Figure 4: Reaction-diffusion problem with four localized peaks. (A-C) Exact solution, VC-PINNs (uniform) prediction and pointwise absolute error. (D-F) Domain with the four peak centers and element partition, uniform collocation set and adaptive collocation set after ten rounds, ∣Tf∣=10,000→13,000 . (G-I) Exact solution, VC-PINNs-RAR prediction and pointwise absolute error. (J-K) Adam loss components for the uniform and the RAR arm.
Metric
VC-PINNs (uniform)
VC-PINNs-RAR
Relative L2 error
2.403
0.1904
Relative L∞ error
55.85
3.546
Relative H1 semi-norm error
39.00
3.366
Table 6: Semilinear problem. All errors are reported in percent (%) and bold marks the more accurate arm in each row. Both arms use the same collocation schedule ( ∣Tf∣=4000→7600 ), 150,000 Adam iterations and thirteen L-BFGS stages, with no interior anchors; one training run per arm. Errors are measured against the finite element reference on its 601×601 grid and the H1 semi-norm excludes grid points within 10−3 of the corner. As 0≤u≤1 with maxu=1 , the relative L∞ error equals the absolute one.
Figure 5: Semilinear problem on the L-shaped domain. (A-C) Finite element reference, VC-PINNs (uniform) prediction and pointwise absolute error against the reference. (D-F) Domain with boundary conditions and element partition, uniform collocation set and adaptive collocation set after twelve rounds, ∣Tf∣=4000→7600 . (G-I) Finite element reference, VC-PINNs-RAR prediction and pointwise absolute error. (J-K) Adam loss components for the uniform and the RAR arm.
Metric
VC-PINNs (uniform)
VC-PINNs-RAR
Relative L2 error
0.2407
0.2096
Relative L∞ error
0.7872
0.4458
Relative H1 semi-norm error
1.666
0.9920
Leading coefficient a0
399.92050
400.15007
Table 7: Motz problem. The first three rows are relative errors in percent (%), the last row is the leading coefficient a0 . Bold marks the more accurate arm in each row. Both arms use the same collocation schedule ( ∣Tf∣=1500→3900 ), 150,000 Adam iterations and thirteen L-BFGS stages, one training run per arm. Errors are measured against the quadratic ( P2 ) finite element reference, whose own error floor is 0.000079% . As 0≤u≤500 with maxu=500 , the relative L∞ error is the absolute error divided by 500 . The leading coefficient is extracted by ( 5.12 ) at r0=0.5 , its reference value is a0=401.16191 .
Figure 6: The Motz problem. (A-C) Finite element reference solution, VC-PINNs (uniform) prediction and pointwise absolute error against the reference. (D-F) Domain with the mixed boundary conditions and element partition, uniform collocation set and adaptive collocation set after twelve rounds, ∣Tf∣=1500→3900 . (G-I) Finite element reference solution, VC-PINNs-RAR prediction and pointwise absolute error. (J-K) Adam loss components for the uniform and the RAR arm.
Classical finite-difference solvers remain reliable tools for partial differential equations, but their efficiency depends on where mesh resolution is placed. Uniform refinement can waste degrees of freedom when solution difficulty is localised near sharp gradients, fronts, oscillations, or constraint-sensitive regions. This paper studies a hybrid strategy in which a physics-informed neural network (PINN) is used not as the final solver, but as an off-grid residual probe for adaptive mesh refinement. The PINN residual is sampled over the domain, converted into cellwise indicators, and used to guide refinement before the final approximation is computed by a finite-difference solver. The method is evaluated on three benchmarks. The main full-solver validation uses the one-dimensional viscous Burgers equation with a nonuniform finite-difference solve on the adapted meshes. PINN-threshold refinement attains final relative L2 error 0.021067 with 60 degrees of freedom, compared with 0.022617 for uniform refinement with 192 degrees of freedom. At matched mesh size, PINN-threshold reduces the error by about 67.5%. PINN-Dörfler refinement gives similar performance, with error 0.021264 using 58 degrees of freedom. A gradient indicator remains slightly more accurate, so the result supports usefulness rather than universal superiority. Manufactured 2D and 3D proxy tests, based on a nonlinear Schrödinger equation and an incompressible Navier--Stokes system, show that PINN residuals can organise structured refinement and improve over random refinement, although they do not consistently outperform gradient or uniform baselines. The results support PINN-guided AMR as a residual-indicator strategy for transferring physics-informed diagnostic information into finite-difference mesh adaptation while preserving the classical solver as the final approximation engine.
Henry Kasumba, Ronald Katende
Department of Mathematics · Makerere University · 7062, Kampala, Uganda +2
Physics-Informed Neural Networks (PINNs) have been recognized as a mesh-free alternative to solve partial differential equations where physics information is incorporated. However, in dealing with problems characterized by high stiffness or shock-dominated dynamics, traditional PINNs have been found to have limitations, including unbalanced training and inaccuracy in solution, even with small physics residuals. In this research, we seek to address these limitations using the viscous Burgers' equation with low viscosity and the Allen-Cahn equation as test problems. In addressing unbalanced training, we have developed a new adaptive loss balancing scheme using smoothed gradient norms to ensure satisfaction of initial and boundary conditions. Further, to address inaccuracy in the solution, we have developed an adaptive residual-based collocation scheme to improve the accuracy of solutions in the regions with high physics residuals. The proposed new approach significantly improves solution accuracy with consistent satisfaction of physics residuals. For instance, in the case of Burgers' equation, the relative L2 error is reduced by about 44 percent compared to traditional PINNs, while for the Allen-Cahn equation, the relative L2 error is reduced by approximately 70 percent. Additionally, we show the trustworthy solution comparison of the proposed method using a robust finite difference solver.
Physics-informed neural networks (PINNs) are often selected by a single scalar loss even when the quantity of interest is more specific. We study a hybrid design in which the governing PDE residual remains automatic-differentiation (AD) based, while finite differences (FD) appear only in a weak auxiliary term that penalizes gradients of the sampled residual field. The FD term regularizes the residual field without replacing the PDE residual itself. We examine this idea in two stages. Stage 1 is a controlled Poisson benchmark comparing a baseline PINN, the FD residual-gradient regularizer, and a matched AD residual-gradient baseline. Stage 2 transfers the same logic to a three-dimensional annular heat-conduction benchmark (PINN3D), where baseline errors concentrate near a wavy outer wall and the auxiliary grid is implemented as a body-fitted shell adjacent to the wall. In Stage 1, the FD regularizer reproduces the main effect of residual-gradient control while exposing a trade-off between field accuracy and residual cleanliness. In Stage 2, the shell regularizer improves the application-facing quantities, namely outer-wall flux and boundary-condition behavior. Across seeds 0-5 and 100k epochs, the most reliable tested configuration is a fixed shell weight of 5e-4 under the Kourkoutas-beta optimizer regime: relative to a matched run without the shell term, it reduces the mean outer-wall BC RMSE from 1.22e-2 to 9.29e-4 and the mean wall-flux RMSE from 9.21e-3 to 9.63e-4. Adam with beta2=0.999 becomes usable when the initial learning rate is reduced to 1e-3, although its shell benefit is less robust than under Kourkoutas-beta. Overall, the results support a targeted view of hybrid PINNs: an auxiliary-only FD regularizer is most valuable when it is aligned with the physical quantity of interest, here the outer-wall flux.
Stavros Kassinos
Computational Sciences Laboratory, Department of Mechanical Engineering, University of Cyprus, 1 University Avenue, Aglantzia, 2109, Nicosia, Cyprus