Definition at line 9 of file coupling_matrix_test.C.
◆ CPPUNIT_TEST() [1/2]
◆ CPPUNIT_TEST() [2/2]
◆ CPPUNIT_TEST_SUITE()
◆ CPPUNIT_TEST_SUITE_END()
CouplingMatrixTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ setUp()
void CouplingMatrixTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
void CouplingMatrixTest::tearDown |
( |
| ) |
|
|
inline |
◆ testIteratorAPI()
void CouplingMatrixTest::testIteratorAPI |
( |
| ) |
|
|
inlineprivate |
Definition at line 117 of file coupling_matrix_test.C.
122 for (
unsigned i=6; i>0; --i)
124 const unsigned int pi = i + (i > 4);
125 for (
unsigned j=0; j<6; ++j)
127 const unsigned int pj = j + (j > 3);
136 for (
unsigned k=0; k<8; ++k)
144 const unsigned int ivals[] = {1,2,4,6,7};
145 const unsigned int non_ivals[] = {0,3,5};
146 const unsigned int jvals[] = {1,2,3,5,6};
149 const unsigned int isize =
sizeof(
unsigned int);
151 for (
unsigned int pi = 0;
pi !=
sizeof(non_ivals)/isize; ++
pi)
153 unsigned int i = non_ivals[
pi];
155 CPPUNIT_ASSERT(ccr.begin() == ccr.end());
158 for (
unsigned int pi = 0;
pi !=
sizeof(ivals)/isize; ++
pi)
160 unsigned int i = ivals[
pi];
165 for (
unsigned int pj = 0; pj !=
sizeof(jvals)/isize; ++pj)
167 CPPUNIT_ASSERT(ccr_it != ccr.end());
168 CPPUNIT_ASSERT_EQUAL(*ccr_it, jvals[pj]);
172 CPPUNIT_ASSERT(ccr_it == ccr.end());
References libMesh::ConstCouplingRow::begin(), libMesh::ConstCouplingRow::end(), int, and libMesh::pi.
◆ testSimpleAPI()
void CouplingMatrixTest::testSimpleAPI |
( |
| ) |
|
|
inlineprivate |
Definition at line 26 of file coupling_matrix_test.C.
37 CPPUNIT_ASSERT_EQUAL(cm01,
true);
41 for (
unsigned i=0; i<2; ++i)
42 for (
unsigned j=0; j<2; ++j)
45 bool cmrij = cmr(i,j);
46 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
47 CPPUNIT_ASSERT_EQUAL(cmij, (i != j));
52 for (
unsigned i=0; i<8; ++i)
53 for (
unsigned j=0; j<8; ++j)
56 bool cmrij = cmr(i,j);
57 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
58 CPPUNIT_ASSERT_EQUAL(cmij,
false);
62 for (
unsigned i=6; i>0; --i)
64 const unsigned int pi = i + (i > 4);
65 for (
unsigned j=0; j<6; ++j)
67 const unsigned int pj = j + (j > 3);
74 for (
unsigned i=0; i<8; ++i)
75 for (
unsigned j=0; j<8; ++j)
78 bool cmrij = cmr(i,j);
79 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
80 if ((i != 0) && (i != 5) && (j != 4) && (j != 7))
82 CPPUNIT_ASSERT_EQUAL(cmij,
true);
86 CPPUNIT_ASSERT_EQUAL(cmij,
false);
91 for (
unsigned k=0; k<8; ++k)
99 for (
unsigned i=0; i<8; ++i)
100 for (
unsigned j=0; j<8; ++j)
103 bool cmrij = cmr(i,j);
104 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
105 if ((i != 0) && (i != 3) && (i != 5) &&
106 (j != 0) && (j != 4) && (j != 7))
108 CPPUNIT_ASSERT_EQUAL(cmij,
true);
112 CPPUNIT_ASSERT_EQUAL(cmij,
false);
References libMesh::pi, and libMesh::CouplingMatrix::resize().
The documentation for this class was generated from the following file: