Skip to content

Trilinos MueLu default number of equations is incorrect for struct #601

Description

@dseyler

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

  • I agree to follow this project's Code of Conduct and Contributing Guidelines

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions