33 {
34 LOG_UNIT_TEST;
35
36 std::vector<std::vector<unsigned int>> index_sets(4);
37 index_sets[0].resize(2);
38 index_sets[0][0] = 3;
39 index_sets[0][1] = 4;
40 index_sets[1].resize(3);
41 index_sets[1][0] = 0;
42 index_sets[1][1] = 1;
43 index_sets[1][2] = 2;
44 index_sets[2].resize(3);
45 index_sets[2][0] = 0;
46 index_sets[2][1] = 2;
47 index_sets[2][2] = 4;
48 index_sets[3].resize(5);
49 index_sets[3][0] = 5;
50 index_sets[3][1] = 1;
51 index_sets[3][2] = 3;
52 index_sets[3][3] = 6;
53 index_sets[3][4] = 7;
54
56
57 {
59
60
64
65
69
71 (composite_inner, index_sets[3]);
72
74
75 composite_inner(
Point(0), 0, test_one);
76
77 LIBMESH_ASSERT_FP_EQUAL(2, test_one(0), 1.e-12);
78 LIBMESH_ASSERT_FP_EQUAL(2, test_one(1), 1.e-12);
79 LIBMESH_ASSERT_FP_EQUAL(2, test_one(2), 1.e-12);
80 LIBMESH_ASSERT_FP_EQUAL(1, test_one(3), 1.e-12);
81 LIBMESH_ASSERT_FP_EQUAL(1, test_one(4), 1.e-12);
82 }
83
87 cf_three_copy_assign = cf_three;
88 cf_three_move_assign = std::move(cf_three_copy_assign);
90
91
92
94
95
96
98 composite_outer_copy2 = std::move(composite_outer_copy1);
99
101 composite_outer_copy2(
Point(0), 0, test_two);
102
103 LIBMESH_ASSERT_FP_EQUAL(3, test_two(0), 1.e-12);
104 LIBMESH_ASSERT_FP_EQUAL(3, test_two(2), 1.e-12);
105 LIBMESH_ASSERT_FP_EQUAL(3, test_two(4), 1.e-12);
106 LIBMESH_ASSERT_FP_EQUAL(2, test_two(5), 1.e-12);
107 LIBMESH_ASSERT_FP_EQUAL(2, test_two(1), 1.e-12);
108 LIBMESH_ASSERT_FP_EQUAL(2, test_two(3), 1.e-12);
109 LIBMESH_ASSERT_FP_EQUAL(1, test_two(6), 1.e-12);
110 LIBMESH_ASSERT_FP_EQUAL(1, test_two(7), 1.e-12);
111 }
A function that returns a vector whose components are defined by multiple functions.
void attach_subfunction(const FunctionBase< Output > &f, std::vector< unsigned int > index_map)
Attach a new subfunction, along with a map from the indices of the attached subfunction to the indice...
Function that returns a single value that never changes.
Defines a dense vector for use in Finite Element-type computations.
A Point defines a location in LIBMESH_DIM dimensional Real space.