コード例 #1
0
static void luzar_correl(int nn,real *time,int nset,real **val,real temp,
			 bool bError,real fit_start,real smooth_tail_start)
{
  const real tol = 1e-8;
  real *kt;
  real weight,d2;
  int  j;
  
  please_cite(stdout,"Spoel2006b");
  
  /* Compute negative derivative k(t) = -dc(t)/dt */
  if (!bError) {
    snew(kt,nn);
    compute_derivative(nn,time,val[0],kt);
    for(j=0; (j<nn); j++)
      kt[j] = -kt[j];
    if (debug) {
      d2 = 0;
      for(j=0; (j<nn); j++)
	d2 += sqr(kt[j] - val[3][j]);
      fprintf(debug,"RMS difference in derivatives is %g\n",sqrt(d2/nn));
    }
    analyse_corr(nn,time,val[0],val[2],kt,NULL,NULL,NULL,fit_start,
		 temp,smooth_tail_start);
    sfree(kt);
  }
  else if (nset == 6) {
    analyse_corr(nn,time,val[0],val[2],val[4],
		 val[1],val[3],val[5],fit_start,temp,smooth_tail_start);
  }
  else {
    printf("Inconsistent input. I need c(t) sigma_c(t) n(t) sigma_n(t) K(t) sigma_K(t)\n");
    printf("Not doing anything. Sorry.\n");
  }
}
コード例 #2
0
ファイル: gluing_equations.c プロジェクト: DamianHeard/orb
void compute_gluing_equations(
	Triangulation	*manifold)
{
	compute_holonomies(manifold);
	compute_edge_angle_sums(manifold);
	initialize_gluing_equations(manifold);
	compute_derivative(manifold);
	compute_rhs(manifold);
}