Research Article
A Cost-Effective Smoothed Multigrid with Modified Neighborhood-Based Aggregation for Markov Chains
Algorithm 4
Modified Neighborhood-Based aggregation,
.
Input: | : scaled problem matrix, | : tolerance. | Output: | : aggregation matrix. | 1st process: generate the initial aggregates | (1) Set and . | (2) for do | (3) compute based on (25). | (4) end for | (5) Reorder by increasing values: | (6) new reordered . | (7) for do | (8) construct strong neighborhoods based on (19) | (9) if then | (10) . | (11) . | (12) . | (13) end if | (14) end for | 2nd process: connect the remaining nodes to their most connected aggregates | (15) while do | (16) Pick and set according to (26) | (17) | (18) Set . | (19) if then | (20) . | (21) and . | (22) else | (23) and . | (24) | (25) end if | (26) end while | 3rd process: construct the aggregation matrix | (27) for do | (28) if then | (29) . | (30) else | (31) . | (32) end if | (33) end for | (34) return ; |
|