|
libMesh::Parallel::Communicator * | my_comm |
|
Definition at line 8 of file distributed_vector_test.C.
◆ CPPUNIT_TEST_SUITE()
◆ CPPUNIT_TEST_SUITE_END()
NUMERICVECTORTEST DistributedVectorTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ Localize()
void NumericVectorTest< DistributedVector< Number > >::Localize |
( |
bool |
to_one = false | ) |
|
|
inlineinherited |
Definition at line 45 of file numeric_vector_test.h.
48 unsigned int block_size = 10;
51 unsigned int local_size = block_size +
52 static_cast<unsigned int>(
my_comm->rank());
53 unsigned int global_size = 0;
56 global_size += (block_size + static_cast<unsigned int>(p));
59 auto v_ptr = libmesh_make_unique<Derived>(*
my_comm, global_size, local_size);
61 std::vector<libMesh::Number> l(global_size);
64 first = v.first_local_index(),
65 last = v.last_local_index();
68 v.set (n, static_cast<libMesh::Number>(n));
74 v.localize_to_one(l,root_pid);
76 if (!to_one ||
my_comm->rank() == root_pid)
◆ LocalizeIndices()
Definition at line 87 of file numeric_vector_test.h.
89 unsigned int block_size = 10;
92 unsigned int local_size = block_size +
93 static_cast<unsigned int>(
my_comm->rank());
94 unsigned int global_size = 0;
97 global_size += (block_size + static_cast<unsigned int>(p));
100 auto v_ptr = libmesh_make_unique<Derived>(*
my_comm, global_size, local_size);
104 std::vector<libMesh::Number> values(block_size *
my_comm->size());
105 std::vector<libMesh::dof_id_type> indices;
106 indices.reserve(block_size *
my_comm->size());
109 first = v.first_local_index(),
110 last = v.last_local_index();
113 v.set (n, static_cast<libMesh::Number>(n));
119 end_index += block_size + p;
120 for (
unsigned int j = 0; j != block_size; ++j)
121 indices.push_back(end_index-j-1);
124 v.localize(values, indices);
129 end_index += block_size + p;
130 for (
unsigned int j = 0; j != block_size; ++j)
◆ setUp()
◆ tearDown()
◆ testLocalize()
◆ testLocalizeBase()
Definition at line 143 of file numeric_vector_test.h.
145 Localize<libMesh::NumericVector<libMesh::Number>,DerivedClass>();
◆ testLocalizeIndices()
◆ testLocalizeIndicesBase()
Definition at line 163 of file numeric_vector_test.h.
165 LocalizeIndices<libMesh::NumericVector<libMesh::Number>,DerivedClass>();
◆ testLocalizeToOne()
◆ testLocalizeToOneBase()
Definition at line 153 of file numeric_vector_test.h.
155 Localize<libMesh::NumericVector<libMesh::Number>,DerivedClass>(
true);
◆ my_comm
libMesh::Parallel::Communicator* NumericVectorTest< DistributedVector< Number > >::my_comm |
|
protectedinherited |
The documentation for this class was generated from the following file: