-
Notifications
You must be signed in to change notification settings - Fork 94
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
How to do with renumber! if I want to mix the dofs of different fields? #892
Comments
The |
@KnutAM Since the global degrees of freedom with order [u1x, u1y, p1, u2x, u2y, p2, . . . ,unx, uny, pn] is more faster than the order [u1x, u1y, u2x, u2y, . . . ,unx, uny,p1, p2, . . . , pn]. In Matab the former is about 2 times faster than the latter one.
|
Are you talking about the speed for the linear solve? In that case, for the global dof vector you can renumber by calling If the benchmarks on such a "hack" can show that there is a potential for speed improvements, it could be worth implementing such a general method. If not, the Metis extension can improve the structure of the lu decomposition, not sure what speedups it gives. This requires |
Yes, I agree that the reordering permuation implementation is really not super-easy. But I think reorder is worthing, beacuse the global order with [u1x, u1y, p1, u2x, u2y, p2, . . . ,unx, uny, pn] will affect the sparsity of the sparse matrix, that is, the bandwidth of the sparse matrix is smaller than the order [u1x, u1y, p1, u2x, u2y, p2, . . . ,unx, uny, pn].
|
I cannot say I see way that ordering would be beneficial. But if you try, note that you must explicitly ask to remove some cross-field couplings when calling |
Re-reading this, just to clarify: The current numbering,
This comment was wrong, it will make some small differences! |
for the following codes,
grid = generate_grid(Triangle, (3, 3)); dh = DofHandler(grid); add!(dh, :u, 2); add!(dh, :p, 1); close!(dh);
the dofs range of :u field is 1 : 6 and the dofs range of :p field is 7 : 9
dof_range(dh, :u); dof_range(dh, :p);
I want the dofs range of :u field is [1,2,4,5,7,8] and and the dofs range of :p field is [3,6,9]. how should I do with the function renumber!
The text was updated successfully, but these errors were encountered: