85 {
86
87
88
89
90 const std::vector<Real> gold_vector = {-1, 3, 10,
91 0, 1, 12,
92 2, 0, 14,
93 0, 1.5, 11,
94 0.5, 1, 13,
95 0.5, 1.5, 12,
96 3, 4, 16,
97 3, 1.5, 15,
98 0.5, 4, 13};
99
100
101
102
103
104
105 const std::vector<dof_id_type>
106 node_reordering({0, 3, 1, 8, 5, 4, 6, 7, 2});
107
110 for (const auto & node : read_mesh.node_ptr_range())
111 {
113 continue;
114
115
116
117#ifdef LIBMESH_USE_COMPLEX_NUMBERS
118 const unsigned int v2 = 3;
119#else
120 const unsigned int v2 = 1;
121#endif
122 CPPUNIT_ASSERT_EQUAL(node->n_vars(0), 3*v2);
123
124
125
126
127 const auto grid_index =
128 cast_int<dof_id_type>(std::lround((*node)(0)) + 1 +
129 3*(std::lround((*node)(1)) + 1));
130
131 CPPUNIT_ASSERT_LESS(node_reordering.size(), std::size_t(grid_index));
132 const dof_id_type gold_i_ux = node_reordering[grid_index] * 3;
135 CPPUNIT_ASSERT_LESS(gold_vector.size(), std::size_t(gold_i_v));
136
137 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,0,0)),
138 gold_vector[gold_i_ux], tol);
139 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,v2,0)),
140 gold_vector[gold_i_uy], tol);
141 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,2*v2,0)),
142 gold_vector[gold_i_v], tol);
143
144
145#ifdef LIBMESH_USE_COMPLEX_NUMBERS
146 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,1,0)),
147 0.0, tol);
148 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,2,0)),
149 std::abs(gold_vector[gold_i_ux]), tol);
150 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,4,0)),
151 0.0, tol);
152 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,5,0)),
153 std::abs(gold_vector[gold_i_uy]), tol);
154 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,7,0)),
155 0.0, tol);
156 LIBMESH_ASSERT_NUMBERS_EQUAL(sys2_soln(node->dof_number(0,8,0)),
157 std::abs(gold_vector[gold_i_v]), tol);
158#endif
159 }
160 }
processor_id_type processor_id() const