Skip to content

Conversation

@sridhar-mani
Copy link
Collaborator

Implemented worker based webgpu calculations. This can be used for future solvers to be useful.

SridharNCI and others added 9 commits May 21, 2025 19:08
…pdate package.json and package-lock.json to include taichi.js dependency
- Implemented WebGPUComputeWorker for various linear algebra operations including vector addition, matrix-vector multiplication, dot product, normalization, and more.
- Created WebGPUJacobiWorker for solving linear systems using the Jacobi method.
- Developed a test HTML page to validate the functionality of the compute engine with multiple test cases for each operation.
- Included error handling and success messages for better user feedback during tests.
- Ensured compatibility with Comlink for worker communication.
…pdate package.json and package-lock.json to include taichi.js dependency
- Implemented WebGPUComputeWorker for various linear algebra operations including vector addition, matrix-vector multiplication, dot product, normalization, and more.
- Created WebGPUJacobiWorker for solving linear systems using the Jacobi method.
- Developed a test HTML page to validate the functionality of the compute engine with multiple test cases for each operation.
- Included error handling and success messages for better user feedback during tests.
- Ensured compatibility with Comlink for worker communication.
…ethod conflict by keeping remote worker-based version
- Updated mesh configuration in HeatConduction2DFinCG.html to reduce the number of elements for better performance.
- Enhanced FEAScript.js to prepare the mesh and extract node coordinates before matrix assembly.
- Modified jacobiMethodScript.js documentation to clarify return object structure.
- Rewrote jacobiSolverScript.js to implement a CPU synchronous version of the Jacobi method, removing the WebGPU dependency.
- Adjusted convergence check in webgpuJacobiWorker.js to use absolute differences.
- Removed testWebGPU.html as it is no longer needed.
@sridhar-mani sridhar-mani linked an issue Oct 23, 2025 that may be closed by this pull request
@nikoscham nikoscham self-assigned this Oct 23, 2025
@nikoscham nikoscham added the enhancement New feature or request label Oct 23, 2025
@nikoscham
Copy link
Member

Thanks for the PR @sridhar-mani. That's nice work. I will do some modifications before merging.

@sridhar-mani
Copy link
Collaborator Author

Sure. Try out the sample html file. But bigger meshes don't work for now. I'm thinking on implementing chunking for loading and unloading the mesh.

@nikoscham nikoscham merged commit f3e90f1 into main Oct 30, 2025
2 checks passed
@nikoscham
Copy link
Member

This is the WebGPU example: https://feascript.com/tutorials/heat-conduction-2d-fin-webgpu.html
I haven't mentioned it in the website yet since there is still some work to be done to the WebGPU solver.
Thanks @sridhar-mani!

@sridhar-mani
Copy link
Collaborator Author

sridhar-mani commented Oct 30, 2025

Yup, Happy to help. We should really pivot towards VOF is possible at this point. As have implemented solvers to run from workers utilizing the gpu it might be possible. I'm still exploring on using and managing multiple workers for a solver to be able to utilize the full capability.

@nikoscham
Copy link
Member

nikoscham commented Oct 31, 2025

We should really pivot towards VOF is possible at this point

@sridhar-mani VOF is indeed a great idea and very useful. However, I believe it won’t be easy to get there. First, we need to implement the Navier–Stokes model. After that we should test the code against some standard CFD benchmarks..
I know development at this phase might seem slow, but I believe maintaining code consistency, having proper integration between components and performance optimization are of great importance. That’s why I prefer taking small but steady steps.
Nevertheless, feel free to open an issue for the VOF implementation so we can track progress there.

@sridhar-mani
Copy link
Collaborator Author

sridhar-mani commented Nov 3, 2025

we can delete all the branches except webGPU as all others are related to the same task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increasing the usage

4 participants