Skip to content
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

Crash caused by invalid object dimensions #121

Open
giraldeau opened this issue Jan 10, 2025 · 0 comments
Open

Crash caused by invalid object dimensions #121

giraldeau opened this issue Jan 10, 2025 · 0 comments

Comments

@giraldeau
Copy link

giraldeau commented Jan 10, 2025

The test tribol/MfemCommonPlaneTest.common_plane/0 is crashing because of this failed assertion:

void SparseMatrix::AddMult(const Vector &x, Vector &y, const real_t a) const
{
   MFEM_ASSERT(width == x.Size(), "Input vector size (" << x.Size()
               << ") must match matrix width (" << width << ")");
...

The x vector is of size 1, while the width is equal to vdof 3 * 250 = 750. The reason is that the object construction in TestUtils.cpp:1747 is done using initializer list:

mfem::Vector ones{ fespace.GetVSize() };

This actually creates a vector of size 1 with the value 750. I think we would like to use the regular constructor to create a vector of size 750.

mfem::Vector ones( fespace.GetVSize() );

This error occurs at multiple places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant