Definition at line 9 of file coupling_matrix_test.C.
◆ CPPUNIT_TEST() [1/2]
◆ CPPUNIT_TEST() [2/2]
◆ CPPUNIT_TEST_SUITE_END()
CouplingMatrixTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ LIBMESH_CPPUNIT_TEST_SUITE()
◆ setUp()
void CouplingMatrixTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
void CouplingMatrixTest::tearDown |
( |
| ) |
|
|
inline |
◆ testIteratorAPI()
void CouplingMatrixTest::testIteratorAPI |
( |
| ) |
|
|
inlineprivate |
Definition at line 119 of file coupling_matrix_test.C.
References libMesh::ConstCouplingRow::begin(), libMesh::ConstCouplingRow::end(), int, and libMesh::pi.
126 for (
unsigned i=6; i>0; --i)
128 const unsigned int pi = i + (i > 4);
129 for (
unsigned j=0; j<6; ++j)
131 const unsigned int pj = j + (j > 3);
140 for (
unsigned k=0; k<8; ++k)
148 const unsigned int ivals[] = {1,2,4,6,7};
149 const unsigned int non_ivals[] = {0,3,5};
150 const unsigned int jvals[] = {1,2,3,5,6};
153 const unsigned int isize =
sizeof(
unsigned int);
155 for (
unsigned int pi = 0;
pi !=
sizeof(non_ivals)/isize; ++
pi)
157 unsigned int i = non_ivals[
pi];
159 CPPUNIT_ASSERT(ccr.begin() == ccr.end());
162 for (
unsigned int pi = 0;
pi !=
sizeof(ivals)/isize; ++
pi)
164 unsigned int i = ivals[
pi];
169 for (
unsigned int pj = 0; pj !=
sizeof(jvals)/isize; ++pj)
171 CPPUNIT_ASSERT(ccr_it != ccr.end());
172 CPPUNIT_ASSERT_EQUAL(static_cast<unsigned int>(*ccr_it), jvals[pj]);
176 CPPUNIT_ASSERT(ccr_it == ccr.end());
This proxy class acts like a container of indices from a single coupling row.
void ErrorVector unsigned int
This class defines a coupling matrix.
◆ testSimpleAPI()
void CouplingMatrixTest::testSimpleAPI |
( |
| ) |
|
|
inlineprivate |
Definition at line 26 of file coupling_matrix_test.C.
References libMesh::pi, and libMesh::CouplingMatrix::resize().
39 CPPUNIT_ASSERT_EQUAL(cm01,
true);
43 for (
unsigned i=0; i<2; ++i)
44 for (
unsigned j=0; j<2; ++j)
47 bool cmrij = cmr(i,j);
48 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
49 CPPUNIT_ASSERT_EQUAL(cmij, (i != j));
54 for (
unsigned i=0; i<8; ++i)
55 for (
unsigned j=0; j<8; ++j)
58 bool cmrij = cmr(i,j);
59 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
60 CPPUNIT_ASSERT_EQUAL(cmij,
false);
64 for (
unsigned i=6; i>0; --i)
66 const unsigned int pi = i + (i > 4);
67 for (
unsigned j=0; j<6; ++j)
69 const unsigned int pj = j + (j > 3);
76 for (
unsigned i=0; i<8; ++i)
77 for (
unsigned j=0; j<8; ++j)
80 bool cmrij = cmr(i,j);
81 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
82 if ((i != 0) && (i != 5) && (j != 4) && (j != 7))
84 CPPUNIT_ASSERT_EQUAL(cmij,
true);
88 CPPUNIT_ASSERT_EQUAL(cmij,
false);
93 for (
unsigned k=0; k<8; ++k)
101 for (
unsigned i=0; i<8; ++i)
102 for (
unsigned j=0; j<8; ++j)
105 bool cmrij = cmr(i,j);
106 CPPUNIT_ASSERT_EQUAL(cmij, cmrij);
107 if ((i != 0) && (i != 3) && (i != 5) &&
108 (j != 0) && (j != 4) && (j != 7))
110 CPPUNIT_ASSERT_EQUAL(cmij,
true);
114 CPPUNIT_ASSERT_EQUAL(cmij,
false);
This class defines a coupling matrix.
The documentation for this class was generated from the following file: