-
Notifications
You must be signed in to change notification settings - Fork 244
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
[Core] Incorrect AMGCLSolver::mBlockSize #11853
Comments
Wow, that's very interesting (as much as concerning...). I had the same idea about what is the Block size and seems that this piece of code is not workling as expected... I pinned @ddemidov and @RiccardoRossi to be sure about this |
I am not familiar with Kratos internals well enough to understand what is the problem here, sorry. |
for (aggregation) AMG to work correctly you need blocks of dofs to be repeated for every node. if we have dx_1 dy_1 dz_1 dx_2 dy_2 dz_2 dx_3 dy_3 dz_3 than all of the nodes 1 2 and 3 have the same anount of dofs. 3 in this case. however if you have for example dx_1 dy_1 dz_1 dx_2 dy_2 dx_3 dy_3 dz_3 that is, for example if 2 does not have "dz" in the system, BlockSize will be detected as 1 as it is the only multiplier we have the "BlockBuilderAndSolver" ensures that this property is kept. The Eliminiation builder and solver does not ... to be clear, if you have a multidimensional problem (like structures) and the BlockSize==1 aggregation multigrid will NOT work correctly. You could still use RugenStuben for example, but aggregation based amg will not work properly |
Do we have documentation regarding solvers in Kratos? Documentation or a wiki page that explains the parameters of the solvers for instance? |
no
El vie., 1 dic. 2023 16:21, Deniz Tanyildiz ***@***.***>
escribió:
… Do we have documentation regarding solvers in Kratos? Documentation or a
wiki page that explains the parameters of the solvers for instance?
—
Reply to this email directly, view it on GitHub
<#11853 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5PWEI72VQZSO57KURT6RLYHHYX3AVCNFSM6AAAAAA72GF36GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGI4TOMBQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Judging by how it's calculated, I'm assuming
AMGCLSolver::mBlockSize
should represent the number of DoFs per variable (or node, I'm not sure), but it seems to me that the current implementation is broken.Can someone explain what exactly is
mBlockSize
supposed to be equal to on the Kratos side?I'm running a linear structural mechanics case with quadratic elements and some MPCs. For this kind of model, the number of DoFs in a variable should be 3 (x, y, z displacement or rotation components). However,
AMGCLSolver
ends up with anmBlockSize
of 1, which completely derails the solver to the point it doesn't even converge (hardcoding it to 3 results in convergence).Here's how
mBlockSize
is calculated:Kratos/kratos/linear_solvers/amgcl_solver.h
Lines 525 to 547 in 86d7a1f
It appears to me that this piece of code is supposed to count how many DoFs share the same ID, and makes 2 assumptions:
rDofSet
The first assumption seems reasonable to me, but the second does not.
rDofSet
is aPointerVectorSet<Dof<double>>
, which means that it's sorted by the values of rawDof
pointers. I don't see how this would guarantee consecutive IDs.Am I missing something or is this a bug?
P.S.: the solver does actually converge with a block size of 1, but more than 500% slower (for my specific model).
The text was updated successfully, but these errors were encountered: