libMesh
Loading...
Searching...
No Matches
eigen_sparse_vector_test.C
Go to the documentation of this file.
1#include <libmesh/eigen_sparse_vector.h>
2
3#ifdef LIBMESH_HAVE_EIGEN
4
6
7
8using namespace libMesh;
9
10class EigenSparseVectorTest : public NumericVectorTest<EigenSparseVector<Number>> {
11private:
12 // This class manages the memory for the communicator it uses,
13 // providing a dumb pointer to the managed resource for the base
14 // class.
15 std::unique_ptr<Parallel::Communicator> _managed_comm;
16
17public:
18 void setUp()
19 {
20 // Eigen doesn't support distributed parallel vectors, but we can
21 // build a serial vector on each processor
22 _managed_comm = std::make_unique<Parallel::Communicator>();
23
24 // Base class communicator points to our managed communicator
26
28 }
29
30 void tearDown() {}
31
35 this->libmesh_suite_name = "NumericVectorTest";
36 else
37 this->libmesh_suite_name = "EigenSparseVectorTest";
38 }
39
41
42 NUMERICVECTORTEST
45
47};
48
50
51#endif // #ifdef LIBMESH_HAVE_EIGEN
CPPUNIT_TEST_SUITE(EigenSparseVectorTest)
CPPUNIT_TEST(testSubvectorsBase)
std::unique_ptr< Parallel::Communicator > _managed_comm
NUMERICVECTORTEST CPPUNIT_TEST(testSubvectors)
This class provides a nice interface to the Eigen C++-based data structures for serial vectors.
bool summarized_logs_enabled()
Definition perf_log.h:210
libMesh::PerfLog * unitlog
Definition driver.C:220
CPPUNIT_TEST_SUITE_REGISTRATION(EigenSparseVectorTest)
The libMesh namespace provides an interface to certain functionality in the library.