43 #include "Euclid_dh.h" 
   45 #include "Factor_dh.h" 
   46 #include "Parser_dh.h" 
   47 #include "TimeLog_dh.h" 
   48 #include "SubdomainGraph_dh.h" 
   51 static void scale_rhs_private (
Euclid_dh ctx, 
double *rhs);
 
   52 static void permute_vec_n2o_private (
Euclid_dh ctx, 
double *xIN,
 
   54 static void permute_vec_o2n_private (
Euclid_dh ctx, 
double *xIN,
 
   58 #define __FUNC__ "Euclid_dhApply" 
   60 Euclid_dhApply (
Euclid_dh ctx, 
double *rhs, 
double *lhs)
 
   62   START_FUNC_DH 
double *rhs_, *lhs_;
 
   72   if (!strcmp (ctx->algo_ilu, 
"none") || !strcmp (ctx->algo_par, 
"none"))
 
   75       for (i = 0; i < m; ++i)
 
   87       permute_vec_n2o_private (ctx, rhs, lhs);
 
  102       scale_rhs_private (ctx, rhs_);
 
  115   if (np_dh == 1 || !strcmp (ctx->algo_par, 
"bj"))
 
  117       Factor_dhSolveSeq (rhs_, lhs_, ctx);
 
  125       Factor_dhSolve (rhs_, lhs_, ctx);
 
  135       permute_vec_o2n_private (ctx, lhs_, lhs);
 
  143   ctx->timing[TRI_SOLVE_T] += (t2 - t1);
 
  149   ctx->timing[TOTAL_SOLVE_TEMP_T] = t2 - ctx->timing[SOLVE_START_T];
 
  159 #define __FUNC__ "scale_rhs_private" 
  161 scale_rhs_private (
Euclid_dh ctx, 
double *rhs)
 
  163   START_FUNC_DH 
int i, m = ctx->m;
 
  164   REAL_DH *scale = ctx->scale;
 
  169       for (i = 0; i < m; ++i)
 
  178 #define __FUNC__ "permute_vec_o2n_private" 
  180 permute_vec_o2n_private (
Euclid_dh ctx, 
double *xIN, 
double *xOUT)
 
  182   START_FUNC_DH 
int i, m = ctx->m;
 
  183   int *o2n = ctx->sg->o2n_col;
 
  184   for (i = 0; i < m; ++i)
 
  185     xOUT[i] = xIN[o2n[i]];
 
  190 #define __FUNC__ "permute_vec_n2o_private" 
  192 permute_vec_n2o_private (
Euclid_dh ctx, 
double *xIN, 
double *xOUT)
 
  194   START_FUNC_DH 
int i, m = ctx->m;
 
  195   int *n2o = ctx->sg->n2o_row;
 
  196   for (i = 0; i < m; ++i)
 
  197     xOUT[i] = xIN[n2o[i]];