Modifying adaptive LB to handle case when neither refine nor greedy does good lb
authorHarshitha <gplkrsh2@illinois.edu>
Sun, 1 Apr 2012 23:06:35 +0000 (18:06 -0500)
committerHarshitha <gplkrsh2@illinois.edu>
Sun, 1 Apr 2012 23:06:35 +0000 (18:06 -0500)
src/ck-ldb/LBDatabase.C

index 5f070ad2dfc7177ba6c4bb469cc2a17692b6c993..4f6c1fec1fcadf93baec1270293d7d096bf1a71c 100644 (file)
@@ -998,6 +998,14 @@ void LBDatabase::GetPrevLBData(int& lb_type, double& lb_max_avg_ratio) {
   }
 }
 
+void LBDatabase::GetLBDataForLB(int lb_type, double& lb_max_avg_ratio) {
+  if (lb_type == 0) {
+    lb_max_avg_ratio = adaptive_struct.greedy_info.max_avg_ratio;
+  } else if (lb_type == 1) {
+    lb_max_avg_ratio = adaptive_struct.refine_info.max_avg_ratio;
+  }
+}
+
 /*
   callable from user's code
 */