-
-
Notifications
You must be signed in to change notification settings - Fork 3
Implement high-precision conjugate gradient solver for improved WebGPU performance #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/webGPU
Are you sure you want to change the base?
Implement high-precision conjugate gradient solver for improved WebGPU performance #38
Conversation
Co-authored-by: sridhar-mani <165501918+sridhar-mani@users.noreply.github.com>
Co-authored-by: sridhar-mani <165501918+sridhar-mani@users.noreply.github.com>
@sridhar-mani could you please review this pull request? Also, I have performed some major updates to the core (see #40). I really appreciate your effort! One small request though: for major tasks (like implementing an entire issue), could you please avoid relying entirely on AI copilots? I’d like the codebase to retain a more “human” touch, as I believe human-written code can often be more efficient. This applies to the other two pull requests as well.. |
Yeah that is my intention too. I was just excited to see how much the model is able to handle vague and niche prompt and i was just testing. Didn't hope it would alarm you. ;-) |
Thanks for your reply @sridhar-mani ! No worries — I understand you were experimenting with what the model could do. It did produce some interesting results though. When you have time, feel free to merge what you think fits into the In the future, I propose to follow the branch-naming rules that are described here https://github.com/FEAScript/FEAScript-core/blob/main/CONTRIBUTING.md (e.g. Now in order to update the branch name in your local environment you should (according to github):
And do also the corresponding commands for Please let me know once you’ve finished so I can delete the pull requests created by Copilot. |
No issues i am aware of the instructions but still thank you. |
This PR addresses the precision issues in the WebGPU implementation by introducing a comprehensive linear system solver framework with a high-precision conjugate gradient method.
Problem
The existing solver implementation lacked precision for conjugate gradient operations, particularly affecting WebGPU-accelerated computations in finite element analysis scenarios.
Solution
Implemented a centralized linear system solver architecture with multiple high-precision algorithms:
Key Components Added
1. Centralized Linear System Solver (
linearSystemSolverScript.js
)lusolve
,jacobi
, andcg
/conjugate
methods2. High-Precision Conjugate Gradient Solver (
conjugateGradientSolverScript.js
)3. Enhanced Jacobi Solver (
jacobiSolverScript.js
)4. Helper Utilities (
helperFunctionsScript.js
)Integration Improvements
FEAScript.js
to use the new centralized solver systemnewtonRaphsonScript.js
to leverage improved linear system solvingPerformance Benefits
The conjugate gradient implementation provides superior precision through:
Testing
"cg"
and"conjugate"
method namesExample Usage
This implementation provides a solid foundation for high-precision numerical computations in WebGPU-accelerated finite element analysis while maintaining full backward compatibility with existing solver methods.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.