Definition at line 10 of file laspack_vector_test.C.
◆ LaspackVectorTest()
LaspackVectorTest::LaspackVectorTest |
( |
| ) |
|
|
inline |
◆ CPPUNIT_TEST_SUITE()
◆ CPPUNIT_TEST_SUITE_END()
NUMERICVECTORTEST LaspackVectorTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ Localize()
Definition at line 245 of file numeric_vector_test.h.
255 first = v.first_local_index(),
256 last = v.last_local_index();
259 v.set (n, static_cast<libMesh::Number>(n));
262 v.add (n, static_cast<libMesh::Number>(n));
268 v.localize_to_one(l,root_pid);
273 LIBMESH_ASSERT_NUMBERS_EQUAL
279 v.insert (&
value, std::vector<libMesh::numeric_index_type>({n}));
286 v.localize_to_one(l,root_pid);
291 LIBMESH_ASSERT_NUMBERS_EQUAL
static constexpr Real TOLERANCE
processor_id_type rank() const
uint8_t processor_id_type
libMesh::Parallel::Communicator * my_comm
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
◆ LocalizeIndices()
Definition at line 298 of file numeric_vector_test.h.
306 std::vector<libMesh::dof_id_type> indices;
310 first = v.first_local_index(),
311 last = v.last_local_index();
314 v.set (n, static_cast<libMesh::Number>(n));
321 for (
unsigned int j = 0; j !=
block_size; ++j)
322 indices.push_back(end_index-j-1);
325 v.localize(values, indices);
331 for (
unsigned int j = 0; j !=
block_size; ++j)
332 LIBMESH_ASSERT_NUMBERS_EQUAL
static constexpr Real TOLERANCE
uint8_t processor_id_type
processor_id_type size() const
libMesh::Parallel::Communicator * my_comm
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
◆ Norms()
Definition at line 191 of file numeric_vector_test.h.
197 first = v.first_local_index(),
198 last = v.last_local_index();
201 v.set (n, -static_cast<libMesh::Number>(n));
204 v.add (n, -static_cast<libMesh::Number>(n));
213 LIBMESH_ASSERT_NUMBERS_EQUAL(v.sum(), -exact_l1,
215 LIBMESH_ASSERT_FP_EQUAL(v.l1_norm(), exact_l1,
217 LIBMESH_ASSERT_FP_EQUAL(v.l2_norm(), exact_l2,
225 u.set (n, -static_cast<libMesh::Number>(n * n));
229 Base & diff = diff_derived;
237 const auto diff_norm = diff.l2_norm();
238 const auto norm_diff = u.l2_norm_diff(v);
239 LIBMESH_ASSERT_FP_EQUAL(diff_norm, norm_diff,
240 (std::abs(diff_norm)+std::abs(norm_diff)) *
static constexpr Real TOLERANCE
libMesh::Parallel::Communicator * my_comm
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
◆ Operations()
Definition at line 64 of file numeric_vector_test.h.
70 first = v.first_local_index(),
71 last = v.last_local_index();
74 v.set (n, static_cast<libMesh::Number>(n+1));
77 auto v_clone = v.clone();
78 auto & vorig = *v_clone;
87 LIBMESH_ASSERT_NUMBERS_EQUAL
94 LIBMESH_ASSERT_NUMBERS_EQUAL
101 LIBMESH_ASSERT_NUMBERS_EQUAL
108 LIBMESH_ASSERT_NUMBERS_EQUAL
114 LIBMESH_ASSERT_NUMBERS_EQUAL
120 LIBMESH_ASSERT_NUMBERS_EQUAL
126 LIBMESH_ASSERT_NUMBERS_EQUAL
132 LIBMESH_ASSERT_NUMBERS_EQUAL
138 LIBMESH_ASSERT_NUMBERS_EQUAL
144 LIBMESH_ASSERT_NUMBERS_EQUAL
148 LIBMESH_ASSERT_NUMBERS_EQUAL
static constexpr Real TOLERANCE
libMesh::Parallel::Communicator * my_comm
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool relative_fuzzy_equals(const T &var1, const T2 &var2, const Real tol=TOLERANCE *TOLERANCE)
Function to check whether two variables are equal within a relative tolerance.
◆ setUp()
void LaspackVectorTest::setUp |
( |
| ) |
|
|
inline |
Definition at line 19 of file laspack_vector_test.C.
libMesh::Parallel::Communicator * my_comm
std::unique_ptr< Parallel::Communicator > _managed_comm
◆ tearDown()
void LaspackVectorTest::tearDown |
( |
| ) |
|
|
inline |
◆ testLocalize()
◆ testLocalizeBase()
Definition at line 346 of file numeric_vector_test.h.
350 Localize<libMesh::NumericVector<libMesh::Number>,DerivedClass>();
◆ testLocalizeIndices()
◆ testLocalizeIndicesBase()
Definition at line 374 of file numeric_vector_test.h.
378 LocalizeIndices<libMesh::NumericVector<libMesh::Number>,DerivedClass>();
◆ testLocalizeToOne()
◆ testLocalizeToOneBase()
Definition at line 360 of file numeric_vector_test.h.
364 Localize<libMesh::NumericVector<libMesh::Number>,DerivedClass>(
true);
◆ testNorms()
◆ testNormsBase()
Definition at line 388 of file numeric_vector_test.h.
392 Norms<libMesh::NumericVector<libMesh::Number>,DerivedClass>();
◆ testOperations()
◆ testOperationsBase()
Definition at line 402 of file numeric_vector_test.h.
406 Operations<libMesh::NumericVector<libMesh::Number>,DerivedClass>();
◆ testWriteAndRead()
◆ testWriteAndReadBase()
Definition at line 416 of file numeric_vector_test.h.
420 WriteAndRead<libMesh::NumericVector<libMesh::Number>,DerivedClass>();
◆ WriteAndRead()
Definition at line 154 of file numeric_vector_test.h.
160 first = v.first_local_index(),
161 last = v.last_local_index();
164 v.set (n, static_cast<libMesh::Number>(n+1));
175 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 181 Base & v_new = *v_new_ptr;
187 CPPUNIT_ASSERT_EQUAL(v.l1_norm_diff(v_new),
libMesh::Real(0));
libMesh::Parallel::Communicator * TestCommWorld
libMesh::Parallel::Communicator * my_comm
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::string libmesh_suite_name
◆ _managed_comm
◆ block_size
◆ global_size
◆ libmesh_suite_name
◆ local_size
◆ my_comm
The documentation for this class was generated from the following file: