コード例 #1
0
static int resweb(realtype tt, N_Vector cc, N_Vector cp, 
                  N_Vector res,  void *user_data)
{
  int flag;
  UserData webdata;
  
  webdata = (UserData)user_data;
  
  /* Call rescomm to do inter-processor communication. */
  flag = rescomm(cc, cp, webdata);
  
  /* Call reslocal to calculate the local portion of residual vector. */
  flag = reslocal(tt, cc, cp, res, webdata);

  return(0);
 
}
コード例 #2
0
static int heatres(realtype tres, N_Vector uu, N_Vector up, 
                   N_Vector res, void *user_data)
{
  int retval;
  UserData data;
  long int Nlocal;
  
  data = (UserData) user_data;
  
  Nlocal = data->n_local;

  /* Call rescomm to do inter-processor communication. */
  retval = rescomm(Nlocal, tres, uu, up, data);
  
  /* Call reslocal to calculate res. */
  retval = reslocal(Nlocal, tres, uu, up, res, data);
  
  return(0);
  
}
コード例 #3
0
static int resweb(realtype tt, 
                  N_Vector cc, N_Vector cp, N_Vector rr, 
                  void *user_data)
{
  int retval;
  UserData webdata;
  long int Nlocal;
  
  webdata = (UserData) user_data;
  
  Nlocal = webdata->n_local;

  /* Call rescomm to do inter-processor communication. */
  retval = rescomm(Nlocal, tt, cc, cp, user_data);
  
  /* Call reslocal to calculate the local portion of residual vector. */
  retval = reslocal(Nlocal, tt, cc, cp, rr, user_data);
  
  return(0);
}