Skip to content

Commit

Permalink
Test prepare_for_use() with constraint matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
roystgnr committed Apr 26, 2024
1 parent 0ce1ef5 commit 783dbf3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/systems/constraint_operator_test.C
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <libmesh/mesh.h>
#include <libmesh/mesh_generation.h>
#include <libmesh/mesh_function.h>
#include <libmesh/mesh_tools.h>
#include <libmesh/numeric_vector.h>
#include <libmesh/parallel.h>
#include <libmesh/quadrature.h>
Expand Down Expand Up @@ -178,6 +179,13 @@ public:

mesh.copy_constraint_rows(*matrix);

// We should be prepared at this point
CPPUNIT_ASSERT(mesh.is_prepared());
CPPUNIT_ASSERT(MeshTools::valid_is_prepared(mesh));

// Do a redundant prepare-for-use to catch any issues there
mesh.prepare_for_use();

es.init ();
sys.solve();

Expand Down Expand Up @@ -244,6 +252,8 @@ public:

mesh.read(meshfile);

CPPUNIT_ASSERT(mesh.is_prepared());

// For these matrices Coreform has been experimenting with PETSc
// solvers which take the transpose of what we expect, so we'll
// un-transpose here.
Expand All @@ -253,6 +263,13 @@ public:

mesh.copy_constraint_rows(*matrix);

// We should be prepared at this point
CPPUNIT_ASSERT(mesh.is_prepared());
CPPUNIT_ASSERT(MeshTools::valid_is_prepared(mesh));

// Do a redundant prepare-for-use to catch any issues there
mesh.prepare_for_use();

es.init ();
sys.solve();

Expand Down Expand Up @@ -316,6 +333,13 @@ public:

mesh.copy_constraint_rows(*matrix);

// We should be prepared at this point
CPPUNIT_ASSERT(mesh.is_prepared());
CPPUNIT_ASSERT(MeshTools::valid_is_prepared(mesh));

// Do a redundant prepare-for-use to catch any issues there
mesh.prepare_for_use();

es.init ();
sys.solve();

Expand Down

0 comments on commit 783dbf3

Please sign in to comment.