Example #1
0
int observable_stress_tensor(observable* self) {
  if (!sortPartCfg()) {
    char *errtxt = runtime_error(128);
    ERROR_SPRINTF(errtxt,"{094 could not sort partCfg} ");
    return -1;
  }
  observable_compute_stress_tensor(1,self->last_value,self->n);
  return 0;
}
int observable_stress_tensor_acf_obs(void* params_p, double* A, unsigned int n_A) {
  double stress_tensor[9];
  sortPartCfg();
  observable_compute_stress_tensor(1,stress_tensor,9);
  A[0]=stress_tensor[1];
  A[1]=stress_tensor[5];
  A[2]=stress_tensor[6];
  A[3]=stress_tensor[0]-stress_tensor[4];
  A[4]=stress_tensor[0]-stress_tensor[8];
  A[5]=stress_tensor[4]-stress_tensor[8];
  return 0;
}
Example #3
0
int observable_calc_stress_tensor_acf_obs(observable* self) {
  double* A = self->last_value;
  double stress_tensor[9];
  if (!sortPartCfg()) {
    char *errtxt = runtime_error(128);
    ERROR_SPRINTF(errtxt,"{094 could not sort partCfg} ");
    return -1;
  }
  observable_compute_stress_tensor(1,stress_tensor,9);
  A[0]=stress_tensor[1];
  A[1]=stress_tensor[5];
  A[2]=stress_tensor[6];
  A[3]=stress_tensor[0]-stress_tensor[4];
  A[4]=stress_tensor[0]-stress_tensor[8];
  A[5]=stress_tensor[4]-stress_tensor[8];
  return 0;
}
int observable_stress_tensor(void* params_p, double* A, unsigned int n_A) {
  sortPartCfg();
  observable_compute_stress_tensor(1,A,n_A);
  return 0;
}