FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <test_Factory.hpp>
Public Member Functions | |
test_Factory (MPI_Comm comm) | |
virtual | ~test_Factory () |
const char * | getName () |
int | runtests () |
void | factory_test1 (fei::SharedPtr< fei::Factory > factory) |
Public Member Functions inherited from tester | |
tester (MPI_Comm comm) | |
virtual | ~tester () |
void | setPath (const std::string &path) |
Additional Inherited Members | |
Protected Attributes inherited from tester | |
MPI_Comm | comm_ |
int | numProcs_ |
int | localProc_ |
std::string | path_ |
Tester for fei::Factory. The runtests() method constructs and tests a couple of factory implementations that are contained in the fei source distribution. This class can also be used to test an arbitrary fei::Factory implementation as follows:
construct your specialized fei::Factory: fei::Factory* factory = new my_special_factory(...);
construct the test_Factory class: test_Factory factory_tester(comm);
run the test method: try { factory_tester.factory_test1(factory); } catch(std::runtime_error& exc) { std::cout << "factory test failed, exception: " << exc.what() <<std::endl; }
The factory_test1 method will print a small amount of information to cout, describing the tests that it is performing.
Definition at line 44 of file test_Factory.hpp.
test_Factory::test_Factory | ( | MPI_Comm | comm | ) |
Definition at line 34 of file test_Factory.cpp.
|
virtual |
Definition at line 39 of file test_Factory.cpp.
|
inlinevirtual |
|
virtual |
Implements tester.
Definition at line 43 of file test_Factory.cpp.
References fei::Factory::clone(), tester::comm_, factory_test1(), FEI_COUT, FEI_ENDL, and tester::localProc_.
void test_Factory::factory_test1 | ( | fei::SharedPtr< fei::Factory > | factory | ) |
Definition at line 90 of file test_Factory.cpp.
References tester::comm_, fei::Factory::createFEI(), fei::VectorSpace::Factory::createVectorSpace(), fei::VectorSpace::defineFields(), FEI_COUT, FEI_ENDL, fei::SharedPtr< T >::get(), FEI::getFieldSize(), fei::VectorSpace::getNumFields(), FEI::initFields(), and tester::localProc_.
Referenced by main(), and runtests().