@@ -74,7 +74,7 @@ export function solveLinearSystem(solverMethod, jacobianMatrix, residualVector,
7474
7575// Helper to lazily create a default WebGPU compute engine (Comlink + worker)
7676async function createDefaultComputeEngine ( ) {
77- const worker = new Worker ( new URL ( "../workers/webgpuComputeWorker .js" , import . meta. url ) , {
77+ const worker = new Worker ( new URL ( "../workers/webgpuWorkerScript .js" , import . meta. url ) , {
7878 type : "module" ,
7979 } ) ;
8080 const computeEngine = Comlink . wrap ( worker ) ;
@@ -108,11 +108,11 @@ export async function solveLinearSystemAsync(solverMethod, jacobianMatrix, resid
108108 const x0 = new Array ( b . length ) . fill ( 0 ) ;
109109 let result ;
110110
111- if ( computeEngine && typeof computeEngine . jacobiSolve === "function" ) {
112- result = await computeEngine . jacobiSolve ( A , b , x0 , maxIterations , tolerance ) ;
111+ if ( computeEngine && typeof computeEngine . webgpuJacobiSolver === "function" ) {
112+ result = await computeEngine . webgpuJacobiSolver ( A , b , x0 , maxIterations , tolerance ) ;
113113 } else {
114114 // Fallback to CPU Jacobi
115- warnLog ( "Falling back to CPU Jacobi: computeEngine.jacobiSolve not available" ) ;
115+ warnLog ( "Falling back to CPU Jacobi: computeEngine.webgpuJacobiSolver not available" ) ;
116116 const cpu = jacobiSolver ( A , b , x0 , { maxIterations, tolerance } ) ;
117117 result = { x : cpu . solutionVector , converged : cpu . converged , iterations : cpu . iterations } ;
118118 }
0 commit comments