Description
In the default Trilinos ML options, the "number of equations" is hardcoded to 4 (Trilinos_impl.cpp, line 767), causing struct simulations to throw an error. Users can currently avoid this by including a custom Trilinos options file, but I think a more permanent default solution would be preferable.
Changing the "number of equations" parameter value to the number of degrees of freedom fixes this problem:
mueluParams.set("number of equations", 4); // dof
should be
mueluParams.set("number of equations", dof);
This is a simple one-line fix, which I implemented and tested in this branch.
I think it would also be a good idea to include a struct Trilinos ML test case to catch this bug (and potentially others) in the future. The branch I linked includes one that is a variant of LV_HolzapfelOgden_active.
Reproduction
Running a sufficiently large struct simulation (above coarse: max_size = 2000) with the default Trilinos ML settings results in the following error:
std::length_error from vector::_M_fill_insert
Expected behavior
Struct simulations should run without error when using the default Trilinos ML settings.
Additional context
No response
Code of Conduct
Description
In the default Trilinos ML options, the "number of equations" is hardcoded to 4 (Trilinos_impl.cpp, line 767), causing struct simulations to throw an error. Users can currently avoid this by including a custom Trilinos options file, but I think a more permanent default solution would be preferable.
Changing the "number of equations" parameter value to the number of degrees of freedom fixes this problem:
should be
This is a simple one-line fix, which I implemented and tested in this branch.
I think it would also be a good idea to include a struct Trilinos ML test case to catch this bug (and potentially others) in the future. The branch I linked includes one that is a variant of LV_HolzapfelOgden_active.
Reproduction
Running a sufficiently large struct simulation (above coarse: max_size = 2000) with the default Trilinos ML settings results in the following error:
Expected behavior
Struct simulations should run without error when using the default Trilinos ML settings.
Additional context
No response
Code of Conduct