libMesh
laspack_vector_test.C
Go to the documentation of this file.
1 #include <libmesh/laspack_vector.h>
2 
3 #ifdef LIBMESH_HAVE_LASPACK
4 
5 #include "numeric_vector_test.h"
6 
7 
8 using namespace libMesh;
9 
10 class LaspackVectorTest : public NumericVectorTest<LaspackVector<Number>>
11 {
12 private:
13  // This class manages the memory for the communicator it uses,
14  // providing a dumb pointer to the managed resource for the base
15  // class.
16  std::unique_ptr<Parallel::Communicator> _managed_comm;
17 
18 public:
19  void setUp()
20  {
21  // Laspack doesn't support distributed parallel vectors, but we
22  // can build a serial vector on each processor
23  _managed_comm = std::make_unique<Parallel::Communicator>();
24 
25  // Base class communicator points to our managed communicator
26  my_comm = _managed_comm.get();
27 
29  }
30 
31  void tearDown() {}
32 
36  this->libmesh_suite_name = "NumericVectorTest";
37  else
38  this->libmesh_suite_name = "LaspackVectorTest";
39  }
40 
41  CPPUNIT_TEST_SUITE( LaspackVectorTest );
42 
43  NUMERICVECTORTEST
44 
45  CPPUNIT_TEST_SUITE_END();
46 };
47 
49 
50 #endif // #ifdef LIBMESH_HAVE_LASPACK
51 
CPPUNIT_TEST_SUITE_REGISTRATION(LaspackVectorTest)
The libMesh namespace provides an interface to certain functionality in the library.
bool summarized_logs_enabled()
Definition: perf_log.h:202
std::unique_ptr< Parallel::Communicator > _managed_comm
This class provides a nice interface to the Laspack C-based data structures for serial vectors...
libMesh::PerfLog * unitlog
Definition: driver.C:173